HomeWildfire Games

UnitMotion - remove m_PathState, which is redundant with other variables.

Description

UnitMotion - remove m_PathState, which is redundant with other variables.

m_PathState kept 3 pieces of information that can be deduced using other variables:

    • whether the entity was following a path. This can be better deduced by checking if the entity has short/long waypoints.
  • whether a path is currently being requested. This can be better deduced by checking the value of m_ExpectedPathTicket
  • whether the requested path is long or short. This can be stored directly alonside the path request ticket number, making it more obvious why it exists.

With these changes, m_PathState can be removed.

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

Details