Browse Source

Use WalkingDistance for GetMinDistance

pull/2113/head
Vladimir Olteanu 5 years ago committed by Anders Jenbo
parent
commit
39bbf07866
  1. 5
      Source/controls/plrctrls.cpp

5
Source/controls/plrctrls.cpp

@ -75,10 +75,7 @@ int GetRotaryDistance(int x, int y)
*/ */
int GetMinDistance(Point position) int GetMinDistance(Point position)
{ {
auto &myPlayer = plr[myplr]; return plr[myplr].position.future.WalkingDistance(position);
Point delta = abs(myPlayer.position.future - position);
return std::max(delta.x, delta.y);
} }
/** /**

Loading…
Cancel
Save