Initialize slopes before the map loads.

# Conflicts:
#	src/p_setup.c
#	src/p_slopes.h
This commit is contained in:
toaster 2022-03-18 17:53:45 +00:00
parent 134f94474c
commit dd8acd4c61
3 changed files with 9 additions and 5 deletions

View file

@ -4244,8 +4244,7 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
P_MapStart(); // tmthing can be used starting from this point
// init anything that P_SpawnSlopes/P_LoadThings needs to know
P_InitSpecials();
P_InitSlopes(); //Initialize slopes before the map loads.
if (!P_LoadMapFromFile())
return false;

View file

@ -684,9 +684,6 @@ pslope_t *P_SlopeById(UINT16 id)
void P_SpawnSlopes(const boolean fromsave) {
size_t i;
slopelist = NULL;
slopecount = 0;
/// Generates vertex slopes.
SpawnVertexSlopes();
@ -728,6 +725,13 @@ void P_SpawnSlopes(const boolean fromsave) {
}
}
/// Initializes slopes.
void P_InitSlopes(void)
{
slopelist = NULL;
slopecount = 0;
}
// ============================================================================
//
// Various utilities related to slopes

View file

@ -51,6 +51,7 @@ void P_LinkSlopeThinkers (void);
void P_CalculateSlopeNormal(pslope_t *slope);
void P_ReconfigureViaVertexes(pslope_t *slope, const vector3_t v1, const vector3_t v2, const vector3_t v3);
void P_InitSlopes(void);
void P_SpawnSlopes(const boolean fromsave);
//