Don't apply team bonuses to defeated players, counterpart to rP19093 / D12.
From Differential_Revision: https://code.wildfiregames.com/D1426
Reviewed By: temple
Comments By: fatherbushido
Don't apply team bonuses to defeated players, counterpart to rP19093 / D12.
Description
Details
Event TimelineComment Actions For any android reading that: The idea is not to "Don't apply team bonuses to defeated players". Comment Actions Unit tests: Test 1 After defeat of player 2, GetAffectedPlayers still returns [1] --> OK Test 2 After defeat of player 2, GetAffectedPlayers still returns [1,2] --> Not OK Code: Affected players are calculated on init and on clean. Something like what is below could do it: if (!Engine.QueryInterface(this.entity, IID_Player)) (where HasPlayerAura() is to add) If one want to see it, wonder aura should show that or better giving the ptolemian team bonus aura to a cc for example. (though I don't exactly know what the state of those things is). Comment Actions I hope the eggs still came out palatable.
The global subscribtion is needed so that team bonuses of non-defeated players are cleaned too, no?
I couldnt reproduce an issue. Unit and structure entity auras affecting player entities are still cleaned on defeat in the onOwnershipChange clean call, no? Index: binaries/data/mods/public/simulation/templates/template_structure_civic_civil_centre.xml =================================================================== --- binaries/data/mods/public/simulation/templates/template_structure_civic_civil_centre.xml (revision 21730) +++ binaries/data/mods/public/simulation/templates/template_structure_civic_civil_centre.xml (working copy) @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <Entity parent="template_structure_civic"> + <Auras datatype="tokens"> + teambonuses/ptol_player_teambonus + </Auras> <AlertRaiser> <List datatype="tokens">FemaleCitizen</List> <RaiseAlertRange>140</RaiseAlertRange> When starting the game we can see the food count increasing if and only if there is an ally with a CC. Edit: Nevermind, got it. The defeated player still receives the trickle because the CC of the non-defeated player wasn't cleaned. |