mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Separate P_LoadThings into two functions to make the next commit cleaner
This commit is contained in:
parent
14ea936f74
commit
c7b6cd705f
1 changed files with 15 additions and 3 deletions
|
@ -850,7 +850,7 @@ void P_ScanThings(INT16 mapnum, INT16 wadnum, INT16 lumpnum)
|
||||||
//
|
//
|
||||||
// P_LoadThings
|
// P_LoadThings
|
||||||
//
|
//
|
||||||
static void P_LoadThings(lumpnum_t lumpnum)
|
static void P_PrepareThings(lumpnum_t lumpnum)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
mapthing_t *mt;
|
mapthing_t *mt;
|
||||||
|
@ -888,6 +888,15 @@ static void P_LoadThings(lumpnum_t lumpnum)
|
||||||
}
|
}
|
||||||
Z_Free(datastart);
|
Z_Free(datastart);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
static void P_LoadThings(void)
|
||||||
|
{
|
||||||
|
size_t i;
|
||||||
|
mapthing_t *mt;
|
||||||
|
|
||||||
|
// Loading the things lump itself into memory is now handled in P_PrepareThings, above
|
||||||
|
|
||||||
mt = mapthings;
|
mt = mapthings;
|
||||||
numhuntemeralds = 0;
|
numhuntemeralds = 0;
|
||||||
for (i = 0; i < nummapthings; i++, mt++)
|
for (i = 0; i < nummapthings; i++, mt++)
|
||||||
|
@ -2123,7 +2132,8 @@ void P_LoadThingsOnly(void)
|
||||||
|
|
||||||
P_LevelInitStuff();
|
P_LevelInitStuff();
|
||||||
|
|
||||||
P_LoadThings(lastloadedmaplumpnum + ML_THINGS);
|
P_PrepareThings(lastloadedmaplumpnum + ML_THINGS);
|
||||||
|
P_LoadThings();
|
||||||
|
|
||||||
P_SpawnSecretItems(true);
|
P_SpawnSecretItems(true);
|
||||||
}
|
}
|
||||||
|
@ -2540,11 +2550,13 @@ boolean P_SetupLevel(boolean skipprecip)
|
||||||
|
|
||||||
P_MapStart();
|
P_MapStart();
|
||||||
|
|
||||||
|
P_PrepareThings(lastloadedmaplumpnum + ML_THINGS);
|
||||||
|
|
||||||
#ifdef ESLOPE
|
#ifdef ESLOPE
|
||||||
P_ResetDynamicSlopes();
|
P_ResetDynamicSlopes();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
P_LoadThings(lastloadedmaplumpnum + ML_THINGS);
|
P_LoadThings();
|
||||||
|
|
||||||
P_SpawnSecretItems(loademblems);
|
P_SpawnSecretItems(loademblems);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue