From 527e436d57d7d2bdd3175e4734692a270f88d005 Mon Sep 17 00:00:00 2001 From: Alug Date: Sat, 9 Mar 2024 14:06:18 +0100 Subject: [PATCH] Revert "stuffs" This reverts commit 60ede73ff821ad3a9bb94c715457d376759152ca. --- src/d_netcmd.c | 3 +-- src/g_game.c | 9 --------- src/lua_script.c | 4 ---- src/m_cheat.c | 3 --- src/p_enemy.c | 36 ------------------------------------ src/p_inter.c | 6 ------ src/p_mobj.c | 26 +------------------------- src/p_polyobj.c | 3 --- src/p_saveg.c | 5 +---- src/p_setup.c | 3 --- src/p_spec.c | 15 --------------- src/p_tick.c | 6 ------ src/p_user.c | 17 +---------------- src/r_data.c | 3 +-- 14 files changed, 5 insertions(+), 134 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 45dfc1602..89c2dc85a 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -5760,8 +5760,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 82bbbf957..42cde4b0e 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2959,9 +2959,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)) @@ -5627,9 +5624,6 @@ 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; @@ -8099,9 +8093,6 @@ 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; diff --git a/src/lua_script.c b/src/lua_script.c index 5a0c5f565..5a0ddc8dd 100644 --- a/src/lua_script.c +++ b/src/lua_script.c @@ -1590,8 +1590,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"); @@ -1628,8 +1626,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 e330e4e70..abada4be5 100644 --- a/src/m_cheat.c +++ b/src/m_cheat.c @@ -907,9 +907,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 if (!mo->spawnpoint) diff --git a/src/p_enemy.c b/src/p_enemy.c index 68d0ac529..7ebfce4ed 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -2636,9 +2636,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) goto bossjustdie; // other boss not dead - just go straight to dying! @@ -2697,9 +2694,6 @@ bossjustdie: 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_BOSSFLYPOINT) @@ -5307,9 +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; if (mo2 == actor) // Don't explode yourself! Endless loop! @@ -6878,9 +6869,6 @@ 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 && mo2->spawnpoint && mo2->spawnpoint->angle == actor->threshold) { @@ -7318,9 +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; if (mo2->type == (mobjtype_t)locvar1) @@ -7385,9 +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; if (mo2->type == (mobjtype_t)locvar1) @@ -7930,9 +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; if (mo2->type == (mobjtype_t)locvar1) @@ -8711,9 +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,9 +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; if (mo2->type != MT_REAPERWAYPOINT) @@ -8882,9 +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; if (mo2->type != MT_REAPERWAYPOINT) @@ -9060,9 +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; if (mo2->type == (mobjtype_t)loc2lw) @@ -9685,9 +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; if (mo2->type == (mobjtype_t)loc1up) diff --git a/src/p_inter.c b/src/p_inter.c index 98ca53b8c..14c712033 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -1210,9 +1210,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) { @@ -2371,9 +2368,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 6d3c41d2f..7df63f474 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -4018,9 +4018,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) @@ -4113,9 +4110,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 == MT_BOSS3WAYPOINT && mo2->spawnpoint && mo2->spawnpoint->angle == mobj->threshold) { @@ -4737,9 +4731,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) { @@ -4795,9 +4786,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) { @@ -4921,9 +4909,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) { @@ -5358,9 +5343,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; if (mo2->type == MT_AXIS) @@ -10350,10 +10332,7 @@ void P_RespawnSpecials(void) mobj_t *box; mobj_t *newmobj; - if (th->function.acp1 != (actionf_p1)P_MobjThinker) - continue; - - if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed) + if (th->function.acp1 != (actionf_p1)P_MobjThinker) // not a mobj continue; box = (mobj_t *)th; @@ -11500,9 +11479,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; if (mo2 == mobj) diff --git a/src/p_polyobj.c b/src/p_polyobj.c index ecddca52f..f614d6c1f 100644 --- a/src/p_polyobj.c +++ b/src/p_polyobj.c @@ -1516,9 +1516,6 @@ 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; diff --git a/src/p_saveg.c b/src/p_saveg.c index 9ecceb5aa..a698bff32 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -1897,8 +1897,7 @@ 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) continue; @@ -3476,8 +3475,6 @@ void P_SaveNetGame(void) { 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 d1dacb15a..1014d6806 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -832,9 +832,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; if (mo->type == MT_HOOPCENTER) diff --git a/src/p_spec.c b/src/p_spec.c index 225897c69..5e64f4422 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -4104,9 +4104,6 @@ DoneSection2: 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_TUBEWAYPOINT) @@ -4186,9 +4183,6 @@ DoneSection2: 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_TUBEWAYPOINT) @@ -4411,9 +4405,6 @@ DoneSection2: 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_TUBEWAYPOINT) @@ -4452,9 +4443,6 @@ DoneSection2: 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_TUBEWAYPOINT) @@ -4482,9 +4470,6 @@ DoneSection2: 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_TUBEWAYPOINT) diff --git a/src/p_tick.c b/src/p_tick.c index 3d7eba1d9..5ad66c679 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -151,9 +151,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++; } @@ -174,9 +171,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 e14a6fa14..730bc8221 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1144,9 +1144,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; if (shieldobj->type == orbtype && shieldobj->target == player->mo) @@ -1875,9 +1872,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; if (mo2 == player->mo) @@ -2630,10 +2624,7 @@ static void P_DoZoomTube(player_t *player) // Find next waypoint for (th = thinkercap.next; th != &thinkercap; th = th->next) { - if (th->function.acp1 != (actionf_p1)P_MobjThinker) - continue; - - if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed) + if (th->function.acp1 != (actionf_p1)P_MobjThinker) // Not a mobj thinker continue; mo2 = (mobj_t *)th; @@ -2936,9 +2927,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) { @@ -4635,9 +4623,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; if (!(mo2->type == MT_NIGHTSWING || mo2->type == MT_RING || mo2->type == MT_COIN diff --git a/src/r_data.c b/src/r_data.c index 5a4794ac2..17b5fb743 100644 --- a/src/r_data.c +++ b/src/r_data.c @@ -1772,8 +1772,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++)