From 8f388ef9ae775651304d0fe205546c358fe73761 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustaf=20Alh=C3=A4ll?= Date: Sun, 19 Jan 2025 18:03:35 +0100 Subject: [PATCH] Remove redundant P_CyclePlayerMobjState function --- src/p_mobj.c | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index aa846a93c..5a508e008 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -178,27 +178,6 @@ static void P_CycleMobjState(mobj_t *mobj) } } -// -// P_CycleMobjState for players. -// -static void P_CyclePlayerMobjState(mobj_t *mobj) -{ - // state animations - P_CycleStateAnimation(mobj); - - // cycle through states, - // calling action functions at transitions - if (mobj->tics != -1) - { - mobj->tics--; - - // you can cycle through multiple states in a tic - if (!mobj->tics && mobj->state) - if (!P_SetMobjState(mobj, mobj->state->nextstate)) - return; // freed itself - } -} - // // P_SetPlayerMobjState // Returns true if the mobj is still present. @@ -3803,7 +3782,7 @@ static void P_PlayerMobjThinker(mobj_t *mobj) } animonly: - P_CyclePlayerMobjState(mobj); + P_CycleMobjState(mobj); } static void CalculatePrecipFloor(precipmobj_t *mobj) @@ -10334,10 +10313,7 @@ void P_MobjThinker(mobj_t *mobj) } // Can end up here if a player dies. - if (mobj->player) - P_CyclePlayerMobjState(mobj); - else - P_CycleMobjState(mobj); + P_CycleMobjState(mobj); if (P_MobjWasRemoved(mobj)) return;