HomeWildfire Games

UnitMotion - Additional chasing fixes

Description

UnitMotion - Additional chasing fixes

  • Because units slow down when turning, and JPS paths often begin with a J-shape, chasers can fail to catch up to slower chasee, because the latter don't recompute paths as often. To fix this, ignore the first waypoint if it's close by and the next is accessible.
  • Don't interpolate the target position when interpolation isn't necessary (i.e. when not processing the MT_Update_Motion* message), as that resulted in the "follow known bad path" hack to active un-necessarily.
  • Tweak PathingUpdateNeeded, it will return true when it has no path to follow
  • Remove the direct-range consideration in the "distance uncertainty" calculation.

Refs #5936

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