From fd6ec7746fe13ba6bb64cf41492229cbf5e24ded Mon Sep 17 00:00:00 2001 From: NepDisk <16447892+NepDisk@users.noreply.github.com> Date: Thu, 8 Aug 2024 19:14:32 -0400 Subject: [PATCH] remove more unused DI code --- src/d_player.h | 2 -- src/lua_playerlib.c | 8 -------- src/p_inter.c | 5 ----- src/p_saveg.c | 6 ------ src/p_user.c | 5 ----- 5 files changed, 26 deletions(-) diff --git a/src/d_player.h b/src/d_player.h index e1a5e9f33..982f1b7b7 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -401,8 +401,6 @@ typedef struct player_s UINT8 instashield; // Instashield no-damage animation timer UINT8 wipeoutslow; // Timer before you slowdown when getting wiped out UINT8 justbumped; // Prevent players from endlessly bumping into each other - UINT8 justDI; // Turn-lockout timer to briefly prevent unintended turning after DI, resets when actionable or no input - boolean flipDI; // Bananas flip the DI direction. Was a bug, but it made bananas much more interesting. SINT8 drift; // (-5 to 5) - Drifting Left or Right, plus a bigger counter = sharper turn fixed_t driftcharge; // Charge your drift so you can release a burst of speed diff --git a/src/lua_playerlib.c b/src/lua_playerlib.c index fc6d075dd..bc6bc51ec 100644 --- a/src/lua_playerlib.c +++ b/src/lua_playerlib.c @@ -236,10 +236,6 @@ static int player_get(lua_State *L) lua_pushinteger(L, plr->wipeoutslow); else if (fastcmp(field,"justbumped")) lua_pushinteger(L, plr->justbumped); - else if (fastcmp(field,"justDI")) - lua_pushinteger(L, plr->justDI); - else if (fastcmp(field,"flipDI")) - lua_pushboolean(L, plr->flipDI); else if (fastcmp(field,"drift")) lua_pushinteger(L, plr->drift); else if (fastcmp(field,"driftcharge")) @@ -564,10 +560,6 @@ static int player_set(lua_State *L) plr->wipeoutslow = luaL_checkinteger(L, 3); else if (fastcmp(field,"justbumped")) plr->justbumped = luaL_checkinteger(L, 3); - else if (fastcmp(field,"justDI")) - plr->justDI = luaL_checkinteger(L, 3); - else if (fastcmp(field,"flipDI")) - plr->flipDI = luaL_checkboolean(L, 3); else if (fastcmp(field,"drift")) plr->drift = luaL_checkinteger(L, 3); else if (fastcmp(field,"driftcharge")) diff --git a/src/p_inter.c b/src/p_inter.c index b298dd3e2..eb389f45d 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -2167,11 +2167,6 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da player->instashield = 15; - if (inflictor && !P_MobjWasRemoved(inflictor) && inflictor->type == MT_BANANA) - { - player->flipDI = true; - } - return true; } } diff --git a/src/p_saveg.c b/src/p_saveg.c index b862df202..8ce41c0c1 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -262,9 +262,6 @@ static void P_NetArchivePlayers(void) WRITEUINT8(save_p, players[i].wipeoutslow); WRITEUINT8(save_p, players[i].justbumped); - WRITEUINT8(save_p, players[i].justDI); - WRITEUINT8(save_p, players[i].flipDI); - WRITESINT8(save_p, players[i].drift); WRITEFIXED(save_p, players[i].driftcharge); WRITEUINT8(save_p, players[i].driftboost); @@ -539,9 +536,6 @@ static void P_NetUnArchivePlayers(void) players[i].wipeoutslow = READUINT8(save_p); players[i].justbumped = READUINT8(save_p); - players[i].justDI = READUINT8(save_p); - players[i].flipDI = (boolean)READUINT8(save_p); - players[i].drift = READSINT8(save_p); players[i].driftcharge = READFIXED(save_p); players[i].driftboost = READUINT8(save_p); diff --git a/src/p_user.c b/src/p_user.c index baba9d81d..b0dcd5ea8 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -2164,11 +2164,6 @@ void P_MovePlayer(player_t *player) P_3dMovement(player); - if (cmd->turning == 0) - { - player->justDI = 0; - } - if (player->squishedtimer > 0) { P_SetPlayerMobjState(player->mo, S_KART_SPINOUT);