- replaced all uses of P_ThrustMobj with the already implemented AActor::Thrust method and deleted this function.
- for quakes, making a distinction between circular and elliptic thrust is pointless, so the checks were removed and both paths consolidated. The elliptic code will do exactly the same for circles and there isn't even a performance difference.
This commit is contained in:
parent
a43dccaa86
commit
a4f5846c7c
14 changed files with 35 additions and 68 deletions
|
|
@ -1621,20 +1621,6 @@ bool AActor::FloorBounceMissile (secplane_t &plane)
|
|||
return false;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
// PROC P_ThrustMobj
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
void P_ThrustMobj (AActor *mo, angle_t _angle, fixed_t _move)
|
||||
{
|
||||
DAngle angle = ANGLE2DBL(_angle);
|
||||
double move = FIXED2DBL(_move);
|
||||
|
||||
mo->Vel += angle.ToVector(move);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
//
|
||||
// FUNC P_FaceMobj
|
||||
|
|
@ -1785,7 +1771,7 @@ fixed_t P_XYMovement (AActor *mo, fixed_t scrollx, fixed_t scrolly)
|
|||
player_t *player;
|
||||
fixed_t xmove, ymove;
|
||||
const secplane_t * walkplane;
|
||||
static const int windTab[3] = {2048*5, 2048*10, 2048*25};
|
||||
static const double windTab[3] = { 5 / 32., 10 / 32., 25 / 32. };
|
||||
int steps, step, totalsteps;
|
||||
fixed_t startx, starty;
|
||||
fixed_t oldfloorz = mo->floorz;
|
||||
|
|
@ -1800,16 +1786,16 @@ fixed_t P_XYMovement (AActor *mo, fixed_t scrollx, fixed_t scrolly)
|
|||
switch (special)
|
||||
{
|
||||
case 40: case 41: case 42: // Wind_East
|
||||
P_ThrustMobj (mo, 0, windTab[special-40]);
|
||||
mo->Thrust(0., windTab[special-40]);
|
||||
break;
|
||||
case 43: case 44: case 45: // Wind_North
|
||||
P_ThrustMobj (mo, ANG90, windTab[special-43]);
|
||||
mo->Thrust(90., windTab[special-43]);
|
||||
break;
|
||||
case 46: case 47: case 48: // Wind_South
|
||||
P_ThrustMobj (mo, ANG270, windTab[special-46]);
|
||||
mo->Thrust(270., windTab[special-46]);
|
||||
break;
|
||||
case 49: case 50: case 51: // Wind_West
|
||||
P_ThrustMobj (mo, ANG180, windTab[special-49]);
|
||||
mo->Thrust(180., windTab[special-49]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue