mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'invalid-settargets' into 'master'
P_InitThinkers: Centralise/tidy global mobj pointer handling See merge request KartKrew/Kart!1263
This commit is contained in:
commit
f86cf71aca
7 changed files with 17 additions and 19 deletions
|
|
@ -435,6 +435,8 @@ struct altview_t
|
|||
INT32 tics;
|
||||
};
|
||||
|
||||
extern altview_t titlemapcam;
|
||||
|
||||
// ========================================================================
|
||||
// PLAYER STRUCTURE
|
||||
// ========================================================================
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -4528,16 +4528,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++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
17
src/p_tick.c
17
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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue