Explicit handler deinitizliation in P_Shutdown and P_FreeLevelData

This commit is contained in:
ZZYZX 2017-02-03 13:01:15 +02:00
commit b45af599c5
3 changed files with 19 additions and 14 deletions

View file

@ -3424,6 +3424,8 @@ extern polyblock_t **PolyBlockMap;
void P_FreeLevelData ()
{
// [ZZ] delete per-map event handlers
E_Shutdown(true);
P_FreeMapDataBackup();
interpolator.ClearInterpolations(); // [RH] Nothing to interpolate on a fresh level.
Renderer->CleanLevelData();
@ -4189,6 +4191,8 @@ void P_Init ()
static void P_Shutdown ()
{
// [ZZ] delete global event handlers
E_Shutdown(false);
R_DeinitSpriteData ();
P_DeinitKeyMessages ();
P_FreeLevelData ();