simplify this

This commit is contained in:
Alug committed 2025-01-03 19:35:29 +01:00
1 parent d705bd3fb7
commit 7687e6effc
1 file changed
+3 -4
+3 -4
View File
@@ -846,8 +846,7 @@ static void G_BuildLocalTiccmd(ticcmd_t *cmd, UINT8 ssplayer)
{
boolean moveinput = false;
INT32 axis = 0;
const UINT8 forplayer = (ssplayer-1);
const boolean usejoystick = (cv_usejoystick[forplayer].value);
const boolean usejoystick = (cv_usejoystick[(ssplayer-1)].value);
moveinput = (InputDown(gc_turnleft, ssplayer) || InputDown(gc_turnright, ssplayer)
|| InputDown(gc_aimforward, ssplayer) || InputDown(gc_aimbackward, ssplayer) ||
@@ -912,8 +911,8 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
else
player = &players[displayplayers[forplayer]];
if (ssplayer == 2)
thiscam = (player->bot == 2 ? &camera[0] : &camera[forplayer]);
if ((ssplayer == 2) && (player->bot == 2))
thiscam = &camera[0];
else
thiscam = &camera[forplayer];