Update p_user.c

This commit is contained in:
Jaime Passos 2019-10-28 15:37:26 -03:00
parent a22af36305
commit f6e8226c4e

View file

@ -6993,8 +6993,6 @@ static void P_NiGHTSMovement(player_t *player)
UINT16 visangle;
#ifdef ROTSPRITE
angle_t rollangle = 0;
UINT8 turningstate = 0;
UINT8 turndiff = 24;
#endif
player->pflags &= ~PF_DRILLING;
@ -7503,15 +7501,6 @@ static void P_NiGHTSMovement(player_t *player)
flystate = S_PLAY_NIGHTS_FLY0;
if (player->pflags & PF_DRILLING)
flystate++; // shift to S_PLAY_NIGHTS_DRILL0-C
else
{
if ((visangle >= (90-turndiff) && visangle <= (90+turndiff))
|| (visangle >= (270-turndiff) && visangle <= (270+turndiff)))
{
turningstate = 3;
flystate = S_PLAY_NIGHTS_DRILL0;
}
}
if (player->flyangle >= 90 && player->flyangle <= 270)
{
@ -7524,7 +7513,7 @@ static void P_NiGHTSMovement(player_t *player)
}
rollangle = FixedAngle(visangle*FRACUNIT);
#endif // ROTSPRITE
#endif
}
if (player->mo->state != &states[flystate])
@ -7532,14 +7521,7 @@ static void P_NiGHTSMovement(player_t *player)
#ifdef ROTSPRITE
player->mo->rollangle = rollangle;
if (turningstate)
{
player->mo->frame = turningstate;
player->mo->tics = -1;
}
else if (player->mo->tics == -1)
player->mo->tics = states[flystate].tics;
#endif // ROTSPRITE
#endif
if (player == &players[consoleplayer])
localangle = player->mo->angle;