mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
- SW: clear pointer holding variables in TerminateLevel.
Some survive the level transition and would point to invalid data.
This commit is contained in:
parent
a4ff7e5bd4
commit
ae622274bd
1 changed files with 5 additions and 1 deletions
|
@ -507,8 +507,11 @@ void TerminateLevel(void)
|
|||
Track[ndx].FreeTrackPoints();
|
||||
}
|
||||
|
||||
// Clear the tracks
|
||||
// Clear the tracks and other arrays holding pointers into the level data.
|
||||
memset(Track, 0, sizeof(Track));
|
||||
memset(SineWaveFloor, 0, sizeof(SineWaveFloor));
|
||||
memset(SineWall, 0, sizeof(SineWall));
|
||||
memset(SpringBoard, 0, sizeof(SpringBoard));
|
||||
|
||||
StopFX();
|
||||
|
||||
|
@ -542,6 +545,7 @@ void TerminateLevel(void)
|
|||
// Free panel sprites for players
|
||||
pClearSpriteList(pp);
|
||||
|
||||
pp->LadderSector = nullptr;
|
||||
pp->cookieTime = 0;
|
||||
memset(pp->cookieQuote, 0, sizeof(pp->cookieQuote));
|
||||
pp->DoPlayerAction = nullptr;
|
||||
|
|
Loading…
Reference in a new issue