mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-24 02:01:17 +00:00
Remove redundant P_CyclePlayerMobjState function
This commit is contained in:
parent
5d79cf674c
commit
8f388ef9ae
1 changed files with 2 additions and 26 deletions
26
src/p_mobj.c
26
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,9 +10313,6 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
}
|
||||
|
||||
// Can end up here if a player dies.
|
||||
if (mobj->player)
|
||||
P_CyclePlayerMobjState(mobj);
|
||||
else
|
||||
P_CycleMobjState(mobj);
|
||||
|
||||
if (P_MobjWasRemoved(mobj))
|
||||
|
|
Loading…
Reference in a new issue