Fix goof in turn check
This commit is contained in:
parent
65f992fda8
commit
8df4f4966b
1 changed files with 22 additions and 11 deletions
33
src/p_user.c
33
src/p_user.c
|
|
@ -1954,20 +1954,31 @@ static void P_3dMovement(player_t *player)
|
|||
|
||||
boolean P_CanPlayerTurn(player_t *player, ticcmd_t *cmd)
|
||||
{
|
||||
if (player->spectator || objectplacing) // Spectators come first.
|
||||
if (player->spectator || objectplacing)
|
||||
{
|
||||
// Spectators come first.
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!(gametyperules & GTR_FREEROAM) && !(leveltime > starttime)) // You can't move yet.
|
||||
return false;
|
||||
|
||||
if ((cmd->buttons & BT_ACCELERATE) && (cmd->buttons & BT_BRAKE)) // You are rubberburn turning.
|
||||
return true;
|
||||
|
||||
if (player->respawn) // You are Respawning.
|
||||
return true;
|
||||
|
||||
if (player->mo && player->speed == 0) // You need to be moving.
|
||||
if (((gametyperules & GTR_FREEROAM) || (leveltime > starttime))
|
||||
&& (cmd->buttons & BT_ACCELERATE)
|
||||
&& (cmd->buttons & BT_BRAKE))
|
||||
{
|
||||
// You are rubberburn turning.
|
||||
return true;
|
||||
}
|
||||
|
||||
if (player->respawn)
|
||||
{
|
||||
// You are Respawning.
|
||||
return true;
|
||||
}
|
||||
|
||||
if (player->mo && player->speed == 0)
|
||||
{
|
||||
// You need to be moving.
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue