Revert "dont access delayremoved thinkers"

This reverts commit 7d885f7100.
This commit is contained in:
Alug committed 2024-09-02 17:05:57 +02:00
1 parent f95c751ff2
commit a8a71cc70c
15 files changed
+72 -139

No files matched your search

+5 -3
View File
@@ -5813,6 +5813,11 @@ static INT16 Consistancy(void)
ret += P_GetRandSeed();
#ifdef MOBJCONSISTANCY
if (!thinkercap.next)
{
DEBFILE(va("Consistancy = %u\n", ret));
return ret;
}
if (gamestate == GS_LEVEL)
{
for (th = thinkercap.next; th != &thinkercap; th = th->next)
@@ -5820,9 +5825,6 @@ static INT16 Consistancy(void)
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo = (mobj_t *)th;
if (mo->flags & (MF_SPECIAL | MF_SOLID | MF_PUSHABLE | MF_BOSS | MF_MISSILE | MF_SPRING | MF_MONITOR | MF_FIRE | MF_ENEMY | MF_PAIN | MF_STICKY))
+1 -2
View File
@@ -5820,8 +5820,7 @@ static void Command_Archivetest_f(void)
i = 1;
for (th = thinkercap.next; th != &thinkercap; th = th->next)
if (th->function.acp1 == (actionf_p1)P_MobjThinker)
if (th->function.acp1 != (actionf_p1)P_RemoveThinkerDelayed)
((mobj_t *)th)->mobjnum = i++;
((mobj_t *)th)->mobjnum = i++;
// allocate buffer
buf = save_p = ZZ_Alloc(1024);
+2 -10
View File
@@ -3062,9 +3062,6 @@ void G_ChangePlayerReferences(mobj_t *oldmo, mobj_t *newmo)
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)th;
if (!(mo2->flags & MF_MISSILE))
@@ -5669,13 +5666,11 @@ void G_ConsGhostTic(INT32 playernum)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mobj = (mobj_t *)th;
if (mobj->type == (mobjtype_t)type && mobj->x == x && mobj->y == y && mobj->z == z)
break;
}
if ((th != &thinkercap && th->function.acp1 != (actionf_p1)P_MobjThinker) && mobj->health != health) // Wasn't damaged?! This is desync! Fix it!
if (mobj && mobj->health != health) // Wasn't damaged?! This is desync! Fix it!
{
if (demosynced)
CONS_Alert(CONS_WARNING, M_GetText("Demo playback has desynced!\n"));
@@ -8193,14 +8188,11 @@ void G_DoPlayMetal(void)
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo = (mobj_t *)th;
if (mo->type == MT_METALSONIC_RACE)
break;
}
if (th == &thinkercap && th->function.acp1 == (actionf_p1)P_MobjThinker)
if (!mo)
{
CONS_Alert(CONS_ERROR, M_GetText("Failed to find bot entity.\n"));
Z_Free(metalbuffer);
-5
View File
@@ -1655,9 +1655,6 @@ void LUA_Archive(void)
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
// archive function will determine when to skip mobjs,
// and write mobjnum in otherwise.
ArchiveExtVars(th, "mobj");
@@ -1694,8 +1691,6 @@ void LUA_UnArchive(void)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
if (((mobj_t *)th)->mobjnum != mobjnum) // find matching mobj
continue;
UnArchiveExtVars(th); // apply variables
-2
View File
@@ -906,8 +906,6 @@ static mapthing_t *OP_CreateNewMapThing(player_t *player, UINT16 type, boolean c
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo = (mobj_t *)th;
// get offset from mt, which points to old mapthings, then add new location
+6 -37
View File
@@ -2635,8 +2635,6 @@ void A_BossDeath(mobj_t *mo)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)th;
if (mo2 != mo && (mo2->flags & MF_BOSS) && mo2->health > 0)
@@ -2695,8 +2693,6 @@ bossjustdie:
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)th;
@@ -5305,8 +5301,6 @@ void A_RingExplode(mobj_t *actor)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)th;
@@ -6875,23 +6869,13 @@ void A_Boss3Path(mobj_t *actor)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)th;
if (mo2->type != MT_BOSS3WAYPOINT)
continue;
if(!mo2->spawnpoint)
continue;
if (mo2->spawnpoint->angle != actor->threshold)
continue;
P_SetTarget(&actor->target, mo2);
break;
if (mo2->type == MT_BOSS3WAYPOINT && mo2->spawnpoint && mo2->spawnpoint->angle == actor->threshold)
{
P_SetTarget(&actor->target, mo2);
break;
}
}
if (!actor->target) // Should NEVER happen
@@ -7322,8 +7306,6 @@ void A_FindTarget(mobj_t *actor)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)th;
@@ -7388,8 +7370,6 @@ void A_FindTracer(mobj_t *actor)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)th;
@@ -7932,8 +7912,6 @@ void A_RemoteAction(mobj_t *actor)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)th;
@@ -8712,8 +8690,6 @@ void A_MementosTPParticles(mobj_t *actor)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)th;
if (mo2->type == MT_MEMENTOSTP && mo2 != actor)
@@ -8813,8 +8789,6 @@ void A_ReaperThinker(mobj_t *actor)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)th;
@@ -8871,6 +8845,7 @@ void A_ReaperThinker(mobj_t *actor)
// Waypoint behavior.
if (actor->target->type == MT_REAPERWAYPOINT)
{
if (R_PointToDist2(actor->x, actor->y, actor->target->x, actor->target->y) < 22<<FRACBITS)
{
P_SetTarget(&actor->target, NULL); // remove target so we can default back to first waypoint if things go ham.
@@ -8880,8 +8855,6 @@ void A_ReaperThinker(mobj_t *actor)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)th;
@@ -9057,8 +9030,6 @@ void A_SetObjectTypeState(mobj_t *actor)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)th;
@@ -9681,8 +9652,6 @@ void A_CheckThingCount(mobj_t *actor)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)th;
-4
View File
@@ -1055,8 +1055,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)th;
if (mo2->type == MT_KOOPA)
@@ -1951,8 +1949,6 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo = (mobj_t *)th;
if (mo->type == (mobjtype_t)target->info->mass && mo->tracer == target)
+5 -18
View File
@@ -3227,8 +3227,6 @@ void P_DestroyRobots(void)
{
if (think->function.acp1 != (actionf_p1)P_MobjThinker)
continue; // not a mobj thinker
if (think->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo = (mobj_t *)think;
if (mo->health <= 0 || !(mo->flags & MF_ENEMY || mo->flags & MF_BOSS))
@@ -4061,8 +4059,6 @@ static void P_Boss3Thinker(mobj_t *mobj)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)th;
if (mo2->type == (mobjtype_t)mobj->info->mass && mo2->tracer == mobj)
@@ -4154,8 +4150,6 @@ static void P_Boss3Thinker(mobj_t *mobj)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)th;
@@ -4790,8 +4784,6 @@ static void P_Boss7Thinker(mobj_t *mobj)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)th;
if (mo2->type == MT_BOSS3WAYPOINT && mo2->spawnpoint)
@@ -4847,8 +4839,6 @@ static void P_Boss7Thinker(mobj_t *mobj)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)th;
if (mo2->type == MT_BOSS3WAYPOINT && mo2->spawnpoint && (mo2->spawnpoint->options & 7) == waypointNum)
@@ -4972,8 +4962,6 @@ static void P_Boss9Thinker(mobj_t *mobj)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)th;
if (mo2->type == MT_BOSS9GATHERPOINT)
@@ -5434,8 +5422,6 @@ mobj_t *P_GetClosestAxis(mobj_t *source)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)th;
@@ -10125,6 +10111,11 @@ void P_RemoveMobj(mobj_t *mobj)
R_RemoveMobjInterpolator(mobj);
#ifdef SCRAMBLE_REMOVED
// Invalidate mobj_t data to cause crashes if accessed!
memset((UINT8 *)mobj + sizeof(thinker_t), 0xff, sizeof(mobj_t) - sizeof(thinker_t));
#endif
// free block
if (!mobj->thinker.next)
{ // Uh-oh, the mobj doesn't think, P_RemoveThinker would never go through!
@@ -10455,8 +10446,6 @@ void P_RespawnSpecials(void)
if (th->function.acp1 != (actionf_p1)P_MobjThinker) // not a mobj
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
box = (mobj_t *)th;
@@ -11610,8 +11599,6 @@ ML_NOCLIMB : Direction not controllable
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)th;
+52 -22
View File
@@ -1553,29 +1553,28 @@ void Polyobj_InitLevel(void)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mobj_t *mo = (mobj_t *)th;
if (mo->info->doomednum == POLYOBJ_SPAWN_DOOMEDNUM ||
mo->info->doomednum == POLYOBJ_SPAWNCRUSH_DOOMEDNUM)
{
++numPolyObjects;
mobj_t *mo = (mobj_t *)th;
qitem = malloc(sizeof(mobjqitem_t));
memset(qitem, 0, sizeof(mobjqitem_t));
qitem->mo = mo;
M_QueueInsert(&(qitem->mqitem), &spawnqueue);
}
else if (mo->info->doomednum == POLYOBJ_ANCHOR_DOOMEDNUM)
{
++numAnchors;
if (mo->info->doomednum == POLYOBJ_SPAWN_DOOMEDNUM ||
mo->info->doomednum == POLYOBJ_SPAWNCRUSH_DOOMEDNUM)
{
++numPolyObjects;
qitem = malloc(sizeof(mobjqitem_t));
memset(qitem, 0, sizeof(mobjqitem_t));
qitem->mo = mo;
M_QueueInsert(&(qitem->mqitem), &anchorqueue);
qitem = malloc(sizeof(mobjqitem_t));
memset(qitem, 0, sizeof(mobjqitem_t));
qitem->mo = mo;
M_QueueInsert(&(qitem->mqitem), &spawnqueue);
}
else if (mo->info->doomednum == POLYOBJ_ANCHOR_DOOMEDNUM)
{
++numAnchors;
qitem = malloc(sizeof(mobjqitem_t));
memset(qitem, 0, sizeof(mobjqitem_t));
qitem->mo = mo;
M_QueueInsert(&(qitem->mqitem), &anchorqueue);
}
}
}
@@ -1616,6 +1615,39 @@ void Polyobj_InitLevel(void)
Polyobj_linkToBlockmap(&PolyObjects[i]);
}
#if 0
// haleyjd 02/22/06: temporary debug
printf("DEBUG: numPolyObjects = %d\n", numPolyObjects);
for (i = 0; i < numPolyObjects; ++i)
{
INT32 j;
polyobj_t *po = &PolyObjects[i];
printf("polyobj %d:\n", i);
printf("id = %d, first = %d, next = %d\n", po->id, po->first, po->next);
printf("segCount = %d, numSegsAlloc = %d\n", po->segCount, po->numSegsAlloc);
for (j = 0; j < po->segCount; ++j)
printf("\tseg %d: %p\n", j, po->segs[j]);
printf("numVertices = %d, numVerticesAlloc = %d\n", po->numVertices, po->numVerticesAlloc);
for (j = 0; j < po->numVertices; ++j)
{
printf("\tvtx %d: (%d, %d) / orig: (%d, %d)\n",
j, po->vertices[j]->x>>FRACBITS, po->vertices[j]->y>>FRACBITS,
po->origVerts[j].x>>FRACBITS, po->origVerts[j].y>>FRACBITS);
}
printf("numLines = %d, numLinesAlloc = %d\n", po->numLines, po->numLinesAlloc);
for (j = 0; j < po->numLines; ++j)
printf("\tline %d: %p\n", j, po->lines[j]);
printf("spawnSpot = (%d, %d)\n", po->spawnSpot.x >> FRACBITS, po->spawnSpot.y >> FRACBITS);
printf("centerPt = (%d, %d)\n", po->centerPt.x >> FRACBITS, po->centerPt.y >> FRACBITS);
printf("attached = %d, linked = %d, validcount = %d, isBad = %d\n",
po->attached, po->linked, po->validcount, po->isBad);
printf("blockbox: [%d, %d, %d, %d]\n",
po->blockbox[BOXLEFT], po->blockbox[BOXRIGHT], po->blockbox[BOXBOTTOM],
po->blockbox[BOXTOP]);
}
#endif
// done with mobj queues
M_QueueFree(&spawnqueue);
M_QueueFree(&anchorqueue);
@@ -1832,8 +1864,6 @@ void T_PolyObjWaypoint(polywaypoint_t *th)
{
if (wp->function.acp1 != (actionf_p1)P_MobjThinker) // Not a mobj thinker
continue;
if (wp->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)wp;
-8
View File
@@ -1903,8 +1903,6 @@ mobj_t *P_FindNewPosition(UINT32 oldposition)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mobj = (mobj_t *)th;
if (mobj->mobjnum != oldposition)
@@ -3028,8 +3026,6 @@ static inline void P_FinishMobjs(void)
{
if (currentthinker->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (currentthinker->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mobj = (mobj_t *)currentthinker;
mobj->info = &mobjinfo[mobj->type];
}
@@ -3047,8 +3043,6 @@ static void P_RelinkPointers(void)
{
if (currentthinker->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (currentthinker->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mobj = (mobj_t *)currentthinker;
@@ -3509,8 +3503,6 @@ void P_SaveNetGame(boolean resending)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mobj = (mobj_t *)th;
if (mobj->type == MT_HOOP || mobj->type == MT_HOOPCOLLIDE || mobj->type == MT_HOOPCENTER)
continue;
-4
View File
@@ -869,8 +869,6 @@ void P_ReloadRings(void)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo = (mobj_t *)th;
@@ -2326,8 +2324,6 @@ void P_LoadThingsOnly(void)
{
if (think->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (think->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
P_RemoveMobj((mobj_t *)think);
}
-6
View File
@@ -3000,8 +3000,6 @@ void P_SetupSignExit(player_t *player)
{
if (think->function.acp1 != (actionf_p1)P_MobjThinker)
continue; // not a mobj thinker
if (think->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
thing = (mobj_t *)think;
if (thing->type != MT_SIGN)
@@ -3051,8 +3049,6 @@ boolean P_IsFlagAtBase(mobjtype_t flag)
{
if (think->function.acp1 != (actionf_p1)P_MobjThinker)
continue; // not a mobj thinker
if (think->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo = (mobj_t *)think;
@@ -3487,8 +3483,6 @@ void P_ProcessSpecialSector(player_t *player, sector_t *sector, sector_t *rovers
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)th;
-4
View File
@@ -145,8 +145,6 @@ void Command_CountMobjs_f(void)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
if (((mobj_t *)th)->type == i)
count++;
@@ -167,8 +165,6 @@ void Command_CountMobjs_f(void)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
if (((mobj_t *)th)->type == i)
count++;
-12
View File
@@ -1124,8 +1124,6 @@ void P_SpawnShieldOrb(player_t *player)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
shieldobj = (mobj_t *)th;
@@ -1854,8 +1852,6 @@ void P_Telekinesis(player_t *player, fixed_t thrust, fixed_t range)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)th;
@@ -2678,8 +2674,6 @@ void P_NukeEnemies(mobj_t *inflictor, mobj_t *source, fixed_t radius)
{
if (think->function.acp1 != (actionf_p1)P_MobjThinker)
continue; // not a mobj thinker
if (think->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo = (mobj_t *)think;
@@ -2760,8 +2754,6 @@ boolean P_LookForEnemies(player_t *player)
{
if (think->function.acp1 != (actionf_p1)P_MobjThinker)
continue; // not a mobj thinker
if (think->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo = (mobj_t *)think;
if (!(mo->flags & (MF_ENEMY|MF_BOSS|MF_MONITOR|MF_SPRING)))
@@ -2887,8 +2879,6 @@ void P_FindEmerald(void)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)th;
if (mo2->type == MT_EMERHUNT)
@@ -4687,8 +4677,6 @@ void P_PlayerThink(player_t *player)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed)
continue;
mo2 = (mobj_t *)th;
+1 -2
View File
@@ -1785,8 +1785,7 @@ void R_PrecacheLevel(void)
for (th = thinkercap.next; th != &thinkercap; th = th->next)
if (th->function.acp1 == (actionf_p1)P_MobjThinker)
if (th->function.acp1 != (actionf_p1)P_RemoveThinkerDelayed)
spritepresent[((mobj_t *)th)->sprite] = 1;
spritepresent[((mobj_t *)th)->sprite] = 1;
spritememory = 0;
for (i = 0; i < numsprites; i++)