From a8a71cc70c1c939ba8183b045d73b15a1079f023 Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 2 Sep 2024 17:05:57 +0200 Subject: [PATCH] Revert "dont access delayremoved thinkers" This reverts commit 7d885f7100ca9d49b752cd60c44d6e8f4f2c8efb. --- src/d_clisrv.c | 8 ++++-- src/d_netcmd.c | 3 +- src/g_game.c | 12 ++------ src/lua_script.c | 5 ---- src/m_cheat.c | 2 -- src/p_enemy.c | 43 ++++------------------------ src/p_inter.c | 4 --- src/p_mobj.c | 23 ++++----------- src/p_polyobj.c | 74 ++++++++++++++++++++++++++++++++++-------------- src/p_saveg.c | 8 ------ src/p_setup.c | 4 --- src/p_spec.c | 6 ---- src/p_tick.c | 4 --- src/p_user.c | 12 -------- src/r_data.c | 3 +- 15 files changed, 72 insertions(+), 139 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 3646ff035..491d98728 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -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)) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index dbb0250b8..808fd3115 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -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); diff --git a/src/g_game.c b/src/g_game.c index 0a55c4ea3..261699898 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -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); diff --git a/src/lua_script.c b/src/lua_script.c index ca78a6377..7440b0731 100644 --- a/src/lua_script.c +++ b/src/lua_script.c @@ -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 diff --git a/src/m_cheat.c b/src/m_cheat.c index 6b93461f3..abada4be5 100644 --- a/src/m_cheat.c +++ b/src/m_cheat.c @@ -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 diff --git a/src/p_enemy.c b/src/p_enemy.c index 9621dc6df..7b3741225 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -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<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; diff --git a/src/p_inter.c b/src/p_inter.c index fc5c18dbe..816230c3a 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -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) diff --git a/src/p_mobj.c b/src/p_mobj.c index 783920d74..de1c59b39 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -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; diff --git a/src/p_polyobj.c b/src/p_polyobj.c index 1e42c8950..887e1c751 100644 --- a/src/p_polyobj.c +++ b/src/p_polyobj.c @@ -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; diff --git a/src/p_saveg.c b/src/p_saveg.c index 3ebaaedc7..5450c6789 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -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; diff --git a/src/p_setup.c b/src/p_setup.c index 394a0b15f..3f7b003a6 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -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); } diff --git a/src/p_spec.c b/src/p_spec.c index f4a2e6199..1a4623dd1 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -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; diff --git a/src/p_tick.c b/src/p_tick.c index 1a1d282d7..613d4dc1b 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -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++; diff --git a/src/p_user.c b/src/p_user.c index c48c1e818..2f9b832d4 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -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; diff --git a/src/r_data.c b/src/r_data.c index 0ad24bbf0..d60cad52f 100644 --- a/src/r_data.c +++ b/src/r_data.c @@ -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++)