mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-29 12:40:40 +00:00
Limit turning so mouselook doesn't let you turn too fast
Still could have the very slight advantage of letting you start your turns faster, but it's too cumbersome to really bother with
This commit is contained in:
parent
7ad34f172c
commit
42d541f6df
1 changed files with 17 additions and 1 deletions
18
src/g_game.c
18
src/g_game.c
|
@ -1267,6 +1267,12 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
|
|||
}
|
||||
else
|
||||
{
|
||||
// limit turning to angleturn[1] to stop mouselook letting you look too fast
|
||||
if (cmd->angleturn > angleturn[1])
|
||||
cmd->angleturn = angleturn[1];
|
||||
else if (cmd->angleturn < -angleturn[1])
|
||||
cmd->angleturn = -angleturn[1];
|
||||
|
||||
cmd->angleturn = K_GetKartTurnValue(player, cmd->angleturn);
|
||||
|
||||
// SRB2kart - no additional angle if not moving
|
||||
|
@ -1605,8 +1611,18 @@ void G_BuildTiccmd2(ticcmd_t *cmd, INT32 realtics)
|
|||
}
|
||||
else
|
||||
{
|
||||
// limit turning to angleturn[1] to stop mouselook letting you look too fast
|
||||
if (cmd->angleturn > angleturn[1])
|
||||
cmd->angleturn = angleturn[1];
|
||||
else if (cmd->angleturn < -angleturn[1])
|
||||
cmd->angleturn = -angleturn[1];
|
||||
|
||||
cmd->angleturn = K_GetKartTurnValue(player, cmd->angleturn);
|
||||
localangle2 += (cmd->angleturn<<16);
|
||||
|
||||
// SRB2kart - no additional angle if not moving
|
||||
if ((player->mo && player->speed > 0) || (leveltime > 140 && (cmd->buttons & BT_ACCELERATE) && (cmd->buttons & BT_BRAKE)))
|
||||
localangle2 += (cmd->angleturn<<16);
|
||||
|
||||
cmd->angleturn = (INT16)(localangle2 >> 16);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue