mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +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
|
||||
//
|
||||
static void P_LoadThings(lumpnum_t lumpnum)
|
||||
static void P_PrepareThings(lumpnum_t lumpnum)
|
||||
{
|
||||
size_t i;
|
||||
mapthing_t *mt;
|
||||
|
@ -888,6 +888,15 @@ static void P_LoadThings(lumpnum_t lumpnum)
|
|||
}
|
||||
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;
|
||||
numhuntemeralds = 0;
|
||||
for (i = 0; i < nummapthings; i++, mt++)
|
||||
|
@ -2123,7 +2132,8 @@ void P_LoadThingsOnly(void)
|
|||
|
||||
P_LevelInitStuff();
|
||||
|
||||
P_LoadThings(lastloadedmaplumpnum + ML_THINGS);
|
||||
P_PrepareThings(lastloadedmaplumpnum + ML_THINGS);
|
||||
P_LoadThings();
|
||||
|
||||
P_SpawnSecretItems(true);
|
||||
}
|
||||
|
@ -2540,11 +2550,13 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
|
||||
P_MapStart();
|
||||
|
||||
P_PrepareThings(lastloadedmaplumpnum + ML_THINGS);
|
||||
|
||||
#ifdef ESLOPE
|
||||
P_ResetDynamicSlopes();
|
||||
#endif
|
||||
|
||||
P_LoadThings(lastloadedmaplumpnum + ML_THINGS);
|
||||
P_LoadThings();
|
||||
|
||||
P_SpawnSecretItems(loademblems);
|
||||
|
||||
|
|
Loading…
Reference in a new issue