Page MenuHomeWildfire Games

Don't try to damage ghosts
ClosedPublic

Authored by bb on Aug 28 2020, 3:47 PM.
Tags
None
Referenced Files
F5233013: D2979.diff
Fri, Sep 27, 6:25 PM
Unknown Object (File)
Sun, Sep 22, 8:30 PM
Unknown Object (File)
Sat, Sep 21, 6:39 PM
Unknown Object (File)
Sun, Sep 15, 10:51 PM
Unknown Object (File)
Tue, Sep 10, 10:47 AM
Subscribers

Details

Summary

When attacking an entity from outside the FoW, the target does not get damaged, since its mirage is targeted and not the real entity. Instead we should test collision with the real entity.

Note that D2759, should hide this issue, since the query for nearby entities should find the real entity. However the completely redundant check for targetPosition (should have been removed in rP23680), still blocks it. Removed the check here.

Test Plan

Attack an entity from outside the FoW (use hills or the maur archer range tech if required) and see damage is now actually dealt.
Agree we shouldn't try damaging ghosts, but instead try the parent entity.

Event Timeline

bb requested review of this revision.Aug 28 2020, 3:52 PM
Freagarach added a subscriber: Freagarach.

Entities should indeed attack the mirage but damage the parent.
Even when the parent is dead the entities will still fire and damage any entity the projectile hits.

A test would really be nice ;)

binaries/data/mods/public/simulation/components/DelayedDamage.js
63

ghosts -> mirages?

This revision is now accepted and ready to land.Aug 28 2020, 4:49 PM
binaries/data/mods/public/simulation/components/tests/test_Damage.js
435 ↗(On Diff #13327)

attack -> damage?

Even better with the test :)