diff --git a/src/p_local.h b/src/p_local.h index 3b29fb06f00d821631302c6448da6589eba82cd0..c8ca08d8197d7a3e64899e5cc94bfd7590dff853 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -289,7 +289,6 @@ void P_RecalcPrecipInSector(sector_t *sector); void P_PrecipitationEffects(void); void P_RemoveMobj(mobj_t *th); -static inline boolean P_MobjWasRemoved(mobj_t *th); void P_RemoveSavegameMobj(mobj_t *th); boolean P_SetMobjState(mobj_t *mobj, statenum_t state); void P_RunShields(void); @@ -301,6 +300,12 @@ boolean P_CheckSkyHit(mobj_t *mo, line_t *line); void P_PushableThinker(mobj_t *mobj); void P_SceneryThinker(mobj_t *mobj); +// This does not need to be added to Lua. +// To test it in Lua, check mobj.valid +static inline boolean P_MobjWasRemoved(mobj_t *mobj) +{ + return mobj == NULL || mobj->thinker.function.acp1 != (actionf_p1)P_MobjThinker; +} fixed_t P_MobjFloorZ(sector_t *sector, sector_t *boundsec, fixed_t x, fixed_t y, fixed_t radius, line_t *line, boolean lowest, boolean perfect); fixed_t P_MobjCeilingZ(sector_t *sector, sector_t *boundsec, fixed_t x, fixed_t y, fixed_t radius, line_t *line, boolean lowest, boolean perfect); diff --git a/src/p_mobj.c b/src/p_mobj.c index b07e0163b4f00b6fe18f21a9eb1356142478a2bd..9ddc7fd8e6e67d812526219a8989594dc019f625 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -11273,15 +11273,6 @@ void P_RemoveMobj(mobj_t *mobj) #endif } -// This does not need to be added to Lua. -// To test it in Lua, check mobj.valid -static inline boolean P_MobjWasRemoved(mobj_t *mobj) -{ - if (mobj && mobj->thinker.function.acp1 == (actionf_p1)P_MobjThinker) - return false; - return true; -} - void P_RemovePrecipMobj(precipmobj_t *mobj) { // unlink from sector and block lists