diff --git a/src/p_mobj.c b/src/p_mobj.c index 9ec667346..7a089a956 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -10882,6 +10882,9 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type, ...) // increment mobj reference, so we don't get a dangling reference in case MobjSpawn calls P_RemoveMobj mobj->thinker.references++; + if (!(mobj->flags & MF_NOTHINK)) + P_AddThinker(THINK_MOBJ, &mobj->thinker); + // DANGER! This can cause P_SpawnMobj to return NULL! // Avoid using P_RemoveMobj on the newly created mobj in "MobjSpawn" Lua hooks! status = LUA_HookMobj(mobj, MOBJ_HOOK(MobjSpawn));