Changes between Initial Version and Version 1 of Ticket #1958, comment 2


Ignore:
Timestamp:
Jun 2, 2013, 12:17:57 PM (11 years ago)
Author:
wraitii

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1958, comment 2

    initial v1  
    55I have no idea what we use m_Speed for. A comment suggest that m_Speed is "typically walkspeed but not always". Only it is. I think it might just be a relic from an older time. Relying on WalkSpeed and RunSpeed should be enough, since the movement uses temporary variables to decide which it wants anyway (basicSpeed).
    66Also, given it's asked for pretty often I think (at least once per "Move()"), I actually suggest using a couple of variables: m_InitWalkSpeed and m_WalkSpeed, same with running.
     7
     8Edit: wait, I'm wrong. The JS actually changes m_Speed, apparently mostly for formations (UnitAI only switches from running to walking, which could use a specific function). I think it'd be safer to call if m_FormationSpeed or something. And make sure we only use it for formation members.
     9Which also means that in a formation we will have to recompute the minimal speed in the JS when a technology is researched.