Initialize slopes before the map loads.

This commit is contained in:
Nev3r 2021-06-02 10:57:57 +02:00
parent d040b61edc
commit 8cb62eeca5
3 changed files with 10 additions and 3 deletions

View file

@ -4274,6 +4274,8 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
P_MapStart(); // tmthing can be used starting from this point
P_InitSlopes();
if (!P_LoadMapFromFile())
return false;

View file

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

View file

@ -50,6 +50,7 @@ typedef enum
void P_LinkSlopeThinkers (void);
void P_CalculateSlopeNormal(pslope_t *slope);
void P_InitSlopes(void);
void P_SpawnSlopes(const boolean fromsave);
//