mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
P_SetupSpawnedMapThing: Catch more P_MobjWasRemoved
This commit is contained in:
parent
3612c1afa8
commit
9eacdb4be4
1 changed files with 10 additions and 1 deletions
11
src/p_mobj.c
11
src/p_mobj.c
|
|
@ -13420,6 +13420,9 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean
|
|||
break;
|
||||
}
|
||||
|
||||
if (P_MobjWasRemoved(mobj))
|
||||
return false;
|
||||
|
||||
if (mobj->flags & MF_BOSS)
|
||||
{
|
||||
if (mthing->args[1]) // No egg trap for this boss
|
||||
|
|
@ -13441,7 +13444,12 @@ static mobj_t *P_SpawnMobjFromMapThing(mapthing_t *mthing, fixed_t x, fixed_t y,
|
|||
mobj->destscale = FixedMul(mobj->destscale, mthing->scale);
|
||||
|
||||
if (!P_SetupSpawnedMapThing(mthing, mobj, &doangle))
|
||||
{
|
||||
if (P_MobjWasRemoved(mobj))
|
||||
return NULL;
|
||||
|
||||
return mobj;
|
||||
}
|
||||
|
||||
if (doangle)
|
||||
{
|
||||
|
|
@ -13669,7 +13677,8 @@ static void P_SpawnItemRow(mapthing_t *mthing, mobjtype_t *itemtypes, UINT8 numi
|
|||
y + FixedMul(length, FINESINE(fineangle)),
|
||||
z, MT_LOOPCENTERPOINT);
|
||||
|
||||
Obj_LinkLoopAnchor(loopanchor, loopcenter, mthing->args[0]);
|
||||
if (!P_MobjWasRemoved(loopanchor))
|
||||
Obj_LinkLoopAnchor(loopanchor, loopcenter, mthing->args[0]);
|
||||
}
|
||||
|
||||
for (r = 0; r < numitems; r++)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue