mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 13:41:05 +00:00
- moved all code that deletes some data from P_SetupLevel to P_FreeLevelData so that P_Shutdown can also call it.
This is particularly important for camera textures which otherwise would not be taken down before a restart.
This commit is contained in:
parent
3131c08640
commit
94d5d6848e
1 changed files with 11 additions and 10 deletions
|
@ -3423,6 +3423,17 @@ extern polyblock_t **PolyBlockMap;
|
|||
|
||||
void P_FreeLevelData ()
|
||||
{
|
||||
MapThingsConverted.Clear();
|
||||
MapThingsUserDataIndex.Clear();
|
||||
MapThingsUserData.Clear();
|
||||
linemap.Clear();
|
||||
FCanvasTextureInfo::EmptyList();
|
||||
R_FreePastViewers();
|
||||
P_ClearUDMFKeys();
|
||||
|
||||
// [RH] Clear all ThingID hash chains.
|
||||
AActor::ClearTIDHashes();
|
||||
|
||||
P_FreeMapDataBackup();
|
||||
interpolator.ClearInterpolations(); // [RH] Nothing to interpolate on a fresh level.
|
||||
Renderer->CleanLevelData();
|
||||
|
@ -3575,14 +3586,6 @@ void P_SetupLevel (const char *lumpname, int position)
|
|||
level.maptype = MAPTYPE_UNKNOWN;
|
||||
wminfo.partime = 180;
|
||||
|
||||
MapThingsConverted.Clear();
|
||||
MapThingsUserDataIndex.Clear();
|
||||
MapThingsUserData.Clear();
|
||||
linemap.Clear();
|
||||
FCanvasTextureInfo::EmptyList ();
|
||||
R_FreePastViewers ();
|
||||
P_ClearUDMFKeys();
|
||||
|
||||
if (!savegamerestore)
|
||||
{
|
||||
for (i = 0; i < MAXPLAYERS; ++i)
|
||||
|
@ -3612,8 +3615,6 @@ void P_SetupLevel (const char *lumpname, int position)
|
|||
|
||||
// Make sure all sounds are stopped before Z_FreeTags.
|
||||
S_Start ();
|
||||
// [RH] Clear all ThingID hash chains.
|
||||
AActor::ClearTIDHashes ();
|
||||
|
||||
// [RH] clear out the mid-screen message
|
||||
C_MidPrint (NULL, NULL);
|
||||
|
|
Loading…
Reference in a new issue