- some refactoring of P_AproxDistance calls into newly defined AActor method AproxDistance.
The main reason here is to reduce the number of instances where AActor::x and AActor::y are being referenced.
This commit is contained in:
parent
1f34372abc
commit
1e2ce9a622
25 changed files with 1293 additions and 1286 deletions
|
|
@ -1479,8 +1479,7 @@ static fixed_t PlayersRangeFromSpot (FPlayerStart *spot)
|
|||
if (!playeringame[i] || !players[i].mo || players[i].health <= 0)
|
||||
continue;
|
||||
|
||||
distance = P_AproxDistance (players[i].mo->x - spot->x,
|
||||
players[i].mo->y - spot->y);
|
||||
distance = players[i].mo->AproxDistance (spot->x, spot->y);
|
||||
|
||||
if (distance < closest)
|
||||
closest = distance;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue