View Issue Details

IDProjectCategoryLast Update
0021523AI War 2Gameplay IssueAug 26, 2019 10:59 am
ReporterRocketAssistedPuffin Assigned ToChris_McElligottPark  
Status resolvedResolutionfixed 
Product Version0.882-0.883 Research and Reconquest 
Fixed in Version0.884 The Helping Hat 
Summary0021523: When player stack loses a unit, it is deselected.
DescriptionTo reproduce:

Load save. There are a few stacked units near a group of AI Vanguards. Simply select them and send them in to die. When a unit in a stack dies, the stack is deselected entirely.
TagsNo tags attached.

Activities

RocketAssistedPuffin

Aug 22, 2019 9:21 pm

reporter  

StackDeselect.save (357,737 bytes)

BadgerBadger

Aug 22, 2019 9:40 pm

manager   ~0052601

I believe the fix for this is to add the following to
EjectEntireStackFromMyselfIfPresent

                    //if this was selected before, keep the new one selected
                    if ( this.GetIsSelected() )
                        newSquad.Select(true);

And then to call
            this.EjectEntireStackFromMyselfIfPresent( Context );
at the beginning of DoOnDeathInCombat() instead of at the end, since the other OnDeath code deselects the unit. That seemed to work for some simple tests.

That said, I've never grokked the selection logic so I don't want to just push this as a fix.

Chris_McElligottPark

Aug 26, 2019 10:59 am

administrator   ~0052616

Thanks!

* Fixed a bug where stacked units would be unselected when one of them was killed and the stack thus got smaller. Have not tested this yet, but should work.

Issue History

Date Modified Username Field Change
Aug 22, 2019 9:21 pm RocketAssistedPuffin New Issue
Aug 22, 2019 9:21 pm RocketAssistedPuffin File Added: StackDeselect.save
Aug 22, 2019 9:40 pm BadgerBadger Note Added: 0052601
Aug 23, 2019 9:43 am BadgerBadger Assigned To => Chris_McElligottPark
Aug 23, 2019 9:43 am BadgerBadger Status new => assigned
Aug 26, 2019 10:59 am Chris_McElligottPark Status assigned => resolved
Aug 26, 2019 10:59 am Chris_McElligottPark Resolution open => fixed
Aug 26, 2019 10:59 am Chris_McElligottPark Fixed in Version => 0.884 The Helping Hat
Aug 26, 2019 10:59 am Chris_McElligottPark Note Added: 0052616