diff --git a/src/p_local.h b/src/p_local.h index 254705ad6..1d5e7e36c 100644 --- a/src/p_local.h +++ b/src/p_local.h @@ -65,6 +65,7 @@ typedef enum{ THINK_POLYOBJ, THINK_MAIN, + THINK_MOBJ, NUM_THINKERLISTS } thinklistnum_t; /**< Thinker lists. */ extern thinker_t thlist[]; diff --git a/src/p_mobj.c b/src/p_mobj.c index ff07e2f2a..737b99e67 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -9047,7 +9047,7 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type) } if (!(mobj->flags & MF_NOTHINK)) - P_AddThinker(THINK_MAIN, &mobj->thinker); + P_AddThinker(THINK_MOBJ, &mobj->thinker); // Call action functions when the state is set if (st->action.acp1 && (mobj->flags & MF_RUNSPAWNFUNC)) @@ -9122,7 +9122,7 @@ static precipmobj_t *P_SpawnPrecipMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype mobj->momz = mobjinfo[type].speed; mobj->thinker.function.acp1 = (actionf_p1)P_NullPrecipThinker; - P_AddThinker(THINK_MAIN, &mobj->thinker); + P_AddThinker(THINK_MOBJ, &mobj->thinker); CalculatePrecipFloor(mobj); @@ -9246,7 +9246,7 @@ void P_RemoveMobj(mobj_t *mobj) else { // Add thinker just to delay removing it until refrences are gone. mobj->flags &= ~MF_NOTHINK; - P_AddThinker(THINK_MAIN, (thinker_t *)mobj); + P_AddThinker(THINK_MOBJ, (thinker_t *)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)); diff --git a/src/p_polyobj.c b/src/p_polyobj.c index 05c2c9a65..c04f57723 100644 --- a/src/p_polyobj.c +++ b/src/p_polyobj.c @@ -1508,7 +1508,7 @@ void Polyobj_InitLevel(void) // run down the thinker list, count the number of spawn points, and save // the mobj_t pointers on a queue for use below. - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 == (actionf_p1)P_MobjThinker) { @@ -1816,7 +1816,7 @@ void T_PolyObjWaypoint(polywaypoint_t *th) // Find out target first. // We redo this each tic to make savegame compatibility easier. - for (wp = thlist[THINK_MAIN].next; wp != &thlist[THINK_MAIN]; wp = wp->next) + for (wp = thlist[THINK_MOBJ].next; wp != &thlist[THINK_MOBJ]; wp = wp->next) { if (wp->function.acp1 != (actionf_p1)P_MobjThinker) // Not a mobj thinker continue; @@ -1897,7 +1897,7 @@ void T_PolyObjWaypoint(polywaypoint_t *th) CONS_Debug(DBG_POLYOBJ, "Looking for next waypoint...\n"); // Find next waypoint - for (wp = thlist[THINK_MAIN].next; wp != &thlist[THINK_MAIN]; wp = wp->next) + for (wp = thlist[THINK_MOBJ].next; wp != &thlist[THINK_MOBJ]; wp = wp->next) { if (wp->function.acp1 != (actionf_p1)P_MobjThinker) // Not a mobj thinker continue; @@ -1936,7 +1936,7 @@ void T_PolyObjWaypoint(polywaypoint_t *th) th->stophere = true; } - for (wp = thlist[THINK_MAIN].next; wp != &thlist[THINK_MAIN]; wp = wp->next) + for (wp = thlist[THINK_MOBJ].next; wp != &thlist[THINK_MOBJ]; wp = wp->next) { if (wp->function.acp1 != (actionf_p1)P_MobjThinker) // Not a mobj thinker continue; @@ -1973,7 +1973,7 @@ void T_PolyObjWaypoint(polywaypoint_t *th) if (!th->continuous) th->comeback = false; - for (wp = thlist[THINK_MAIN].next; wp != &thlist[THINK_MAIN]; wp = wp->next) + for (wp = thlist[THINK_MOBJ].next; wp != &thlist[THINK_MOBJ]; wp = wp->next) { if (wp->function.acp1 != (actionf_p1)P_MobjThinker) // Not a mobj thinker continue; @@ -2524,7 +2524,7 @@ INT32 EV_DoPolyObjWaypoint(polywaypointdata_t *pwdata) th->stophere = false; // Find the first waypoint we need to use - for (wp = thlist[THINK_MAIN].next; wp != &thlist[THINK_MAIN]; wp = wp->next) + for (wp = thlist[THINK_MOBJ].next; wp != &thlist[THINK_MOBJ]; wp = wp->next) { if (wp->function.acp1 != (actionf_p1)P_MobjThinker) // Not a mobj thinker continue; @@ -2595,7 +2595,7 @@ INT32 EV_DoPolyObjWaypoint(polywaypointdata_t *pwdata) // Find the actual target movement waypoint target = first; - /*for (wp = thlist[THINK_MAIN].next; wp != &thlist[THINK_MAIN]; wp = wp->next) + /*for (wp = thlist[THINK_MOBJ].next; wp != &thlist[THINK_MOBJ]; wp = wp->next) { if (wp->function.acp1 != (actionf_p1)P_MobjThinker) // Not a mobj thinker continue; diff --git a/src/p_saveg.c b/src/p_saveg.c index b72b055ae..bccf9dbe4 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -2381,7 +2381,7 @@ mobj_t *P_FindNewPosition(UINT32 oldposition) thinker_t *th; mobj_t *mobj; - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) continue; @@ -3636,7 +3636,7 @@ static inline void P_FinishMobjs(void) mobj_t *mobj; // put info field there real value - for (currentthinker = thlist[THINK_MAIN].next; currentthinker != &thlist[THINK_MAIN]; + for (currentthinker = thlist[THINK_MOBJ].next; currentthinker != &thlist[THINK_MOBJ]; currentthinker = currentthinker->next) { if (currentthinker->function.acp1 == (actionf_p1)P_MobjThinker) @@ -3654,7 +3654,7 @@ static void P_RelinkPointers(void) UINT32 temp; // use info field (value = oldposition) to relink mobjs - for (currentthinker = thlist[THINK_MAIN].next; currentthinker != &thlist[THINK_MAIN]; + for (currentthinker = thlist[THINK_MOBJ].next; currentthinker != &thlist[THINK_MOBJ]; currentthinker = currentthinker->next) { if (currentthinker->function.acp1 == (actionf_p1)P_MobjThinker) @@ -4035,7 +4035,7 @@ void P_SaveNetGame(void) P_NetArchiveMisc(); // Assign the mobjnumber for pointer tracking - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 == (actionf_p1)P_MobjThinker) { diff --git a/src/p_setup.c b/src/p_setup.c index 61389a131..876ca85a5 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -814,7 +814,7 @@ void P_ReloadRings(void) mapthing_t *mt = mapthings; // scan the thinkers to find rings/spheres/hoops to unset - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) continue; @@ -883,7 +883,7 @@ void P_SwitchSpheresBonusMode(boolean bonustime) #endif // scan the thinkers to find spheres to switch - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) continue; @@ -2298,7 +2298,7 @@ void P_LoadThingsOnly(void) } - for (think = thlist[THINK_MAIN].next; think != &thlist[THINK_MAIN]; think = think->next) + for (think = thlist[THINK_MOBJ].next; think != &thlist[THINK_MOBJ]; think = think->next) { if (think->function.acp1 != (actionf_p1)P_MobjThinker) continue; // not a mobj thinker diff --git a/src/p_spec.c b/src/p_spec.c index 2c54eb2ab..45027822c 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -3972,7 +3972,7 @@ void P_SetupSignExit(player_t *player) // didn't find any signposts in the exit sector. // spin all signposts in the level then. - for (think = thlist[THINK_MAIN].next; think != &thlist[THINK_MAIN]; think = think->next) + for (think = thlist[THINK_MOBJ].next; think != &thlist[THINK_MOBJ]; think = think->next) { if (think->function.acp1 != (actionf_p1)P_MobjThinker) continue; // not a mobj thinker @@ -4004,7 +4004,7 @@ boolean P_IsFlagAtBase(mobjtype_t flag) mobj_t *mo; INT32 specialnum = 0; - for (think = thlist[THINK_MAIN].next; think != &thlist[THINK_MAIN]; think = think->next) + for (think = thlist[THINK_MOBJ].next; think != &thlist[THINK_MOBJ]; think = think->next) { if (think->function.acp1 != (actionf_p1)P_MobjThinker) continue; // not a mobj thinker @@ -4437,7 +4437,7 @@ void P_ProcessSpecialSector(player_t *player, sector_t *sector, sector_t *rovers // Find the center of the Eggtrap and release all the pretty animals! // The chimps are my friends.. heeheeheheehehee..... - LouisJM - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) continue; @@ -4743,7 +4743,7 @@ DoneSection2: // scan the thinkers // to find the first waypoint - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) continue; @@ -4822,7 +4822,7 @@ DoneSection2: // scan the thinkers // to find the last waypoint - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) continue; @@ -4974,7 +4974,7 @@ DoneSection2: // scan the thinkers // to find the first waypoint - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) continue; @@ -5012,7 +5012,7 @@ DoneSection2: } // Find waypoint before this one (waypointlow) - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) continue; @@ -5039,7 +5039,7 @@ DoneSection2: } // Find waypoint after this one (waypointhigh) - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) continue; @@ -8451,7 +8451,7 @@ static void Add_ColormapFader(sector_t *sector, extracolormap_t *source_exc, ext } sector->fadecolormapdata = d; - P_AddThinker(THINK_MAIN, &d->thinker); // add thinker + P_AddThinker(THINK_MAIN, &d->thinker); } void T_FadeColormap(fadecolormap_t *d) diff --git a/src/p_tick.c b/src/p_tick.c index f4f73aa3d..4a71e3cd5 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -139,7 +139,7 @@ void Command_CountMobjs_f(void) count = 0; - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) continue; @@ -159,7 +159,7 @@ void Command_CountMobjs_f(void) { count = 0; - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) continue; @@ -298,7 +298,7 @@ static inline void P_RunThinkers(void) size_t i; for (i = 0; i < NUM_THINKERLISTS; i++) { - //CONS_Printf("Running thinker list %d.\n", i); + CONS_Printf("Running thinker list %d.\n", i); for (currentthinker = thlist[i].next; currentthinker != &thlist[i]; currentthinker = currentthinker->next) { if (currentthinker->function.acp1) diff --git a/src/p_user.c b/src/p_user.c index fa5b0f502..26d62f62a 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -343,7 +343,7 @@ UINT8 P_FindLowestMare(void) // scan the thinkers // to find the egg capsule with the lowest mare - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) continue; @@ -392,7 +392,7 @@ boolean P_TransferToNextMare(player_t *player) // scan the thinkers // to find the closest axis point - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) continue; @@ -443,7 +443,7 @@ static mobj_t *P_FindAxis(INT32 mare, INT32 axisnum) // scan the thinkers // to find the closest axis point - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) continue; @@ -476,7 +476,7 @@ static mobj_t *P_FindAxisTransfer(INT32 mare, INT32 axisnum, mobjtype_t type) // scan the thinkers // to find the closest axis point - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) continue; @@ -515,7 +515,7 @@ void P_TransferToAxis(player_t *player, INT32 axisnum) // scan the thinkers // to find the closest axis point - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) continue; @@ -615,7 +615,7 @@ static void P_DeNightserizePlayer(player_t *player) } // Check to see if the player should be killed. - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) continue; @@ -1567,7 +1567,7 @@ void P_SpawnShieldOrb(player_t *player) } // blaze through the thinkers to see if an orb already exists! - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) continue; @@ -4438,7 +4438,7 @@ void P_Telekinesis(player_t *player, fixed_t thrust, fixed_t range) if (player->powers[pw_super]) // increase range when super range *= 2; - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) continue; @@ -5635,7 +5635,7 @@ static void P_NightsTransferPoints(player_t *player, fixed_t xspeed, fixed_t rad fixed_t truexspeed = xspeed*(!(player->pflags & PF_TRANSFERTOCLOSEST) && player->mo->target->flags2 & MF2_AMBUSH ? -1 : 1); // Find next waypoint - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) // Not a mobj thinker continue; @@ -5671,7 +5671,7 @@ static void P_NightsTransferPoints(player_t *player, fixed_t xspeed, fixed_t rad // Look for a wrapper point. if (!transfer1) { - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) // Not a mobj thinker continue; @@ -5699,7 +5699,7 @@ static void P_NightsTransferPoints(player_t *player, fixed_t xspeed, fixed_t rad } if (!transfer2) { - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) // Not a mobj thinker continue; @@ -6406,7 +6406,7 @@ static void P_NiGHTSMovement(player_t *player) // scan the thinkers // to find the closest axis point - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) continue; @@ -7216,7 +7216,7 @@ static void P_MovePlayer(player_t *player) thinker_t *th; mobj_t *mo2; - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) continue; @@ -8124,7 +8124,7 @@ static void P_DoZoomTube(player_t *player) CONS_Debug(DBG_GAMELOGIC, "Looking for next waypoint...\n"); // Find next waypoint - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) // Not a mobj thinker continue; @@ -8258,7 +8258,7 @@ static void P_DoRopeHang(player_t *player) CONS_Debug(DBG_GAMELOGIC, "Looking for next waypoint...\n"); // Find next waypoint - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) // Not a mobj thinker continue; @@ -8283,7 +8283,7 @@ static void P_DoRopeHang(player_t *player) CONS_Debug(DBG_GAMELOGIC, "Next waypoint not found, wrapping to start...\n"); // Wrap around back to first waypoint - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) // Not a mobj thinker continue; @@ -8349,7 +8349,7 @@ static void P_NukeAllPlayers(player_t *player) mobj_t *mo; thinker_t *think; - for (think = thlist[THINK_MAIN].next; think != &thlist[THINK_MAIN]; think = think->next) + for (think = thlist[THINK_MOBJ].next; think != &thlist[THINK_MOBJ]; think = think->next) { if (think->function.acp1 != (actionf_p1)P_MobjThinker) continue; // not a mobj thinker @@ -8397,7 +8397,7 @@ void P_NukeEnemies(mobj_t *inflictor, mobj_t *source, fixed_t radius) } } - for (think = thlist[THINK_MAIN].next; think != &thlist[THINK_MAIN]; think = think->next) + for (think = thlist[THINK_MOBJ].next; think != &thlist[THINK_MOBJ]; think = think->next) { if (think->function.acp1 != (actionf_p1)P_MobjThinker) continue; // not a mobj thinker @@ -8448,7 +8448,7 @@ mobj_t *P_LookForEnemies(player_t *player, boolean nonenemies, boolean bullet) const angle_t span = (bullet ? ANG30 : ANGLE_90); fixed_t dist, closestdist = 0; - for (think = thlist[THINK_MAIN].next; think != &thlist[THINK_MAIN]; think = think->next) + for (think = thlist[THINK_MOBJ].next; think != &thlist[THINK_MOBJ]; think = think->next) { if (think->function.acp1 != (actionf_p1)P_MobjThinker) continue; // not a mobj thinker @@ -8587,7 +8587,7 @@ void P_FindEmerald(void) // scan the remaining thinkers // to find all emeralds - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) continue; @@ -10013,7 +10013,7 @@ void P_PlayerThink(player_t *player) fixed_t y = player->mo->y; fixed_t z = player->mo->z; - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) continue; diff --git a/src/r_data.c b/src/r_data.c index dbbc615fc..755cc7bcd 100644 --- a/src/r_data.c +++ b/src/r_data.c @@ -2242,7 +2242,7 @@ void R_PrecacheLevel(void) spritepresent = calloc(numsprites, sizeof (*spritepresent)); if (spritepresent == NULL) I_Error("%s: Out of memory looking up sprites", "R_PrecacheLevel"); - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) if (th->function.acp1 == (actionf_p1)P_MobjThinker) spritepresent[((mobj_t *)th)->sprite] = 1; diff --git a/src/st_stuff.c b/src/st_stuff.c index a946bf516..007363b03 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -2289,7 +2289,7 @@ static void ST_doItemFinderIconsAndSound(void) return; // Scan thinkers to find emblem mobj with these ids - for (th = thlist[THINK_MAIN].next; th != &thlist[THINK_MAIN]; th = th->next) + for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 != (actionf_p1)P_MobjThinker) continue;