diff --git a/src/d_player.h b/src/d_player.h index e6e306537..975bc010b 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -435,6 +435,8 @@ struct altview_t INT32 tics; }; +extern altview_t titlemapcam; + // ======================================================================== // PLAYER STRUCTURE // ======================================================================== diff --git a/src/f_finale.c b/src/f_finale.c index aef80562e..14011b1c9 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -1848,7 +1848,6 @@ void F_StartTitleScreen(void) gamestate_t prevwipegamestate = wipegamestate; titlemapinaction = true; - P_SetTarget(&titlemapcam.mobj, NULL); gamemap = titleMapNum+1; maptol = mapheaderinfo[titleMapNum]->typeoflevel; diff --git a/src/f_finale.h b/src/f_finale.h index 4149f111c..56691a847 100644 --- a/src/f_finale.h +++ b/src/f_finale.h @@ -105,9 +105,6 @@ extern UINT16 tttics; extern boolean ttavailable[6]; // Current menu parameters - -extern altview_t titlemapcam; - extern char curbgname[9]; extern SINT8 curfadevalue; extern INT32 curbgcolor; diff --git a/src/k_podium.c b/src/k_podium.c index 46de1eb79..f21196fd3 100644 --- a/src/k_podium.c +++ b/src/k_podium.c @@ -247,8 +247,6 @@ boolean K_StartCeremony(void) && mapheaderinfo[podiumMapNum] && mapheaderinfo[podiumMapNum]->lumpnum != LUMPERROR) { - P_SetTarget(&titlemapcam.mobj, NULL); - gamemap = podiumMapNum+1; maptol = mapheaderinfo[gamemap-1]->typeoflevel; diff --git a/src/p_saveg.c b/src/p_saveg.c index ca03c667f..29a60da87 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -4526,16 +4526,8 @@ static void P_NetUnArchiveThinkers(savebuffer_t *save) } // we don't want the removed mobjs to come back - iquetail = iquehead = 0; P_InitThinkers(); - // Oh my god don't blast random memory with our reference counts. - waypointcap = trackercap = NULL; - for (i = 0; i <= 15; i++) - { - skyboxcenterpnts[i] = skyboxviewpnts[i] = NULL; - } - // clear sector thinker pointers so they don't point to non-existant thinkers for all of eternity for (i = 0; i < numsectors; i++) { diff --git a/src/p_setup.c b/src/p_setup.c index 4153f889a..3df1bd163 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -8291,9 +8291,6 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate) K_InitDirector(); } - // clear special respawning que - iquehead = iquetail = 0; - // Initialize ACS scripts if (!fromnetsave) { diff --git a/src/p_tick.c b/src/p_tick.c index 7ac0f7742..da4cc46da 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -213,10 +213,23 @@ void Command_CountMobjs_f(void) void P_InitThinkers(void) { UINT8 i; + + for (i = 0; i < NUM_THINKERLISTS; i++) + { + thlist[i].prev = thlist[i].next = &thlist[i]; + } + + iquehead = iquetail = 0; + waypointcap = NULL; trackercap = NULL; - for (i = 0; i < NUM_THINKERLISTS; i++) - thlist[i].prev = thlist[i].next = &thlist[i]; + + titlemapcam.mobj = NULL; + + for (i = 0; i <= 15; i++) + { + skyboxcenterpnts[i] = skyboxviewpnts[i] = NULL; + } } // Adds a new thinker at the end of the list.