Opened 3 years ago

Closed 3 years ago

#5939 closed defect (fixed)

Target height is not computed correctly for targets moving on a slope

Reported by: wraitii Owned by: wraitii
Priority: Should Have Milestone: Alpha 24
Component: Core engine Keywords:
Cc: Patch: Phab:D3425

Description (last modified by wraitii)

Per the title.

Units currently aim at the foot of their target, and this can miss if the target is moving up, since the projectile will land in the ground.

NB: this is visual only, projectiles are "teleported" where they needed to be anyways.

Change History (4)

comment:1 by Silier, 3 years ago

Owner: set to wraitii

comment:2 by wraitii, 3 years ago

Description: modified (diff)

comment:3 by wraitii, 3 years ago

Priority: Must HaveShould Have

comment:4 by wraitii, 3 years ago

Resolution: fixed
Status: newclosed

In 24766:

Fix target height computation when launching projectiles.

The Y coordinate at which to fire a projectile is currently assumed to be the target's current Y, which is incorrect if the target is moving on a slope.
This fixes that.

Note that this was purely visual, since projectiles still hit the target regardless, as the height component is totally ignored, even if the projectile is underground (in fact, the projectile's position is not known in DelayedDamage::MissileHit, which just assumes it lands where it said it would when fired).

As noted by bb in rP24701

Fixes #5939

Differential Revision: https://code.wildfiregames.com/D3425

Note: See TracTickets for help on using tickets.