Fix Turbines taking away ring boost, rotate player sprite without setting spinouttimer

This commit is contained in:
James R 2025-05-26 20:14:51 -07:00
parent 5ed7b13ddb
commit cac7903bdf
2 changed files with 12 additions and 4 deletions

View file

@ -237,7 +237,6 @@ void Obj_playerWPZTurbine(player_t *p)
if (mode && !distreached)
p->turbineangle = (INT32)R_PointToAngle2(t->x, t->y, pmo->x, pmo->y);
p->spinouttimer = TICRATE;
pmo->pitch = 0;
// determine target x/y/z
@ -344,7 +343,6 @@ void Obj_playerWPZTurbine(player_t *p)
pmo->momy = (pmo->momy*17)/10;
}
p->spinouttimer = 0;
pmo->flags &= ~MF_NOCLIP;
}
}

View file

@ -2539,9 +2539,19 @@ void P_MovePlayer(player_t *player)
player->glanceDir = 0;
player->pflags &= ~PF_GAINAX;
}
else if ((player->pflags & PF_FAULT) || (player->spinouttimer > 0))
else if ((player->pflags & PF_FAULT) || (player->spinouttimer > 0) || (player->turbine && (player->mo->flags & MF_NOCLIP)))
{
UINT16 speed = ((player->pflags & PF_FAULT) ? player->nocontrol : player->spinouttimer)/8;
tic_t timer = 0;
if ((player->pflags & PF_FAULT))
timer = player->nocontrol;
else if (player->spinouttimer > 0)
timer = player->spinouttimer;
else if (player->turbine && (player->mo->flags & MF_NOCLIP))
timer = TICRATE;
UINT16 speed = timer / 8;
if (speed > 8)
speed = 8;
else if (speed < 1)