mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-16 01:31:30 +00:00
Remove some jankiness from spectators.
This commit is contained in:
parent
317259a459
commit
a0cf28671c
1 changed files with 6 additions and 5 deletions
11
src/p_user.c
11
src/p_user.c
|
@ -5207,16 +5207,16 @@ static void P_SpectatorMovement(player_t *player)
|
|||
if (!(cmd->angleturn & TICCMD_RECEIVED))
|
||||
ticmiss++;
|
||||
|
||||
if (player->mo->z > player->mo->ceilingz - player->mo->height)
|
||||
player->mo->z = player->mo->ceilingz - player->mo->height;
|
||||
if (player->mo->z < player->mo->floorz)
|
||||
player->mo->z = player->mo->floorz;
|
||||
|
||||
if (cmd->buttons & BT_JUMP)
|
||||
player->mo->z += FRACUNIT*16;
|
||||
else if (cmd->buttons & BT_USE)
|
||||
player->mo->z -= FRACUNIT*16;
|
||||
|
||||
if (player->mo->z > player->mo->ceilingz - player->mo->height)
|
||||
player->mo->z = player->mo->ceilingz - player->mo->height;
|
||||
if (player->mo->z < player->mo->floorz)
|
||||
player->mo->z = player->mo->floorz;
|
||||
|
||||
// Aiming needed for SEENAMES, etc.
|
||||
// We may not need to fire as a spectator, but this is still handy!
|
||||
player->aiming = cmd->aiming<<FRACBITS;
|
||||
|
@ -6752,6 +6752,7 @@ static void P_MovePlayer(player_t *player)
|
|||
|
||||
if (player->spectator)
|
||||
{
|
||||
player->mo->eflags &= ~MFE_VERTICALFLIP; // deflip...
|
||||
P_SpectatorMovement(player);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue