From 53848bd5faf2a8bfcf194af93c9294fc75cf1250 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Mon, 23 Sep 2019 08:51:49 -0400 Subject: [PATCH] commit throwdir fix I did a bunch of other demo-related cleanup in this branch so I'm throwing it in here too --- src/g_game.c | 14 -------------- src/p_tick.c | 11 ----------- src/p_user.c | 3 --- 3 files changed, 28 deletions(-) diff --git a/src/g_game.c b/src/g_game.c index fb0654c8e..cf2378d09 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2368,21 +2368,7 @@ void G_Ticker(boolean run) if (playeringame[i]) { - //@TODO all this throwdir stuff shouldn't be here! But it stays for now to maintain 1.0.4 compat... - // Remove for 1.1! - - // SRB2kart - // Save the dir the player is holding - // to allow items to be thrown forward or backward. - if (cmd->buttons & BT_FORWARD) - players[i].kartstuff[k_throwdir] = 1; - else if (cmd->buttons & BT_BACKWARD) - players[i].kartstuff[k_throwdir] = -1; - else - players[i].kartstuff[k_throwdir] = 0; - G_CopyTiccmd(cmd, &netcmds[buf][i], 1); - // Use the leveltime sent in the player's ticcmd to determine control lag cmd->latency = modeattacking ? 0 : min(((leveltime & 0xFF) - cmd->latency) & 0xFF, MAXPREDICTTICS-1); //@TODO add a cvar to allow setting this max } diff --git a/src/p_tick.c b/src/p_tick.c index 8312afe81..02a532bc1 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -620,18 +620,7 @@ void P_Ticker(boolean run) G_ReadDemoExtraData(); for (i = 0; i < MAXPLAYERS; i++) if (playeringame[i]) - { - //@TODO all this throwdir stuff shouldn't be here! But it's added to maintain 1.0.4 compat for now... - // Remove for 1.1! - if (players[i].cmd.buttons & BT_FORWARD) - players[i].kartstuff[k_throwdir] = 1; - else if (players[i].cmd.buttons & BT_BACKWARD) - players[i].kartstuff[k_throwdir] = -1; - else - players[i].kartstuff[k_throwdir] = 0; - G_ReadDemoTiccmd(&players[i].cmd, i); - } } for (i = 0; i < MAXPLAYERS; i++) diff --git a/src/p_user.c b/src/p_user.c index 8932a49c8..d5d7dc6fd 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -8136,8 +8136,6 @@ void P_PlayerThink(player_t *player) cmd = &player->cmd; - //@TODO This fixes a one-tic latency on direction handling, AND makes behavior consistent while paused, but is not BC with 1.0.4. Do this for 1.1! -#if 0 // SRB2kart // Save the dir the player is holding // to allow items to be thrown forward or backward. @@ -8147,7 +8145,6 @@ void P_PlayerThink(player_t *player) player->kartstuff[k_throwdir] = -1; else player->kartstuff[k_throwdir] = 0; -#endif // Add some extra randomization. if (cmd->forwardmove)