- 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
|
|
@ -2225,7 +2225,7 @@ void DPusher::Tick ()
|
|||
{
|
||||
int sx = m_X;
|
||||
int sy = m_Y;
|
||||
int dist = P_AproxDistance (thing->x - sx,thing->y - sy);
|
||||
int dist = thing->AproxDistance (sx, sy);
|
||||
int speed = (m_Magnitude - ((dist>>FRACBITS)>>1))<<(FRACBITS-PUSH_FACTOR-1);
|
||||
|
||||
// If speed <= 0, you're outside the effective radius. You also have
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue