HomeWildfire Games

Let entity react on target death directly.


Let entity react on target death directly.

Don't let entities waste a repeat time when they've killed their target.
Done by storing a list of attackers in cmpResistance (since that cmp is obligatory anyway).

Differential revision: https://code.wildfiregames.com/D2129
Comments by: @Angen, @wraitii

Event Timeline

bb raised a concern with this commit.Sep 5 2021, 11:30 PM
bb added a subscriber: bb.
bb added inline comments.

Same concern as reased in rP25465 pops up here: attack a mirage with some ranged units (archers vs cc worked for me) and you will see that the units that arrive first try to capture (since the become idle) other than use the ranged attack (when giving the ranged attack order).

I guess we need to replace the target by the parent in case it is a mirage for the entire function here. Reminds me of rP24005.

This commit now has outstanding concerns.Sep 5 2021, 11:30 PM
Freagarach added inline comments.Sep 9 2021, 6:50 PM

The problem is if you add the attacker to the parent, and the parent dies, the attacker will stop attacking. I guess we need to also mock this function in the mirage and query that?

Freagarach requested verification of this commit.Tue, Oct 12, 5:27 PM
This commit now requires verification by auditors.Tue, Oct 12, 5:27 PM
bb accepted this commit.Tue, Oct 12, 5:29 PM

concern fixed by rP25914

All concerns with this commit have now been addressed.Tue, Oct 12, 5:29 PM