mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-01 22:21:05 +00:00
Initialize slopes before the map loads.
This commit is contained in:
parent
d040b61edc
commit
8cb62eeca5
3 changed files with 10 additions and 3 deletions
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue