move P_MapEnd call in P_LoadLevel further down, so that the P_MapStart/End pair also encloses cached actions and the MapLoad Lua hook

This commit is contained in:
Monster Iestyn 2021-05-28 18:42:19 +01:00
parent 75938e2dfa
commit 07801a2a18

View file

@ -4223,7 +4223,7 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
P_ResetWaypoints();
P_MapStart();
P_MapStart(); // tmthing can be used starting from this point
if (!P_LoadMapFromFile())
return false;
@ -4276,8 +4276,6 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
// clear special respawning que
iquehead = iquetail = 0;
P_MapEnd();
// Remove the loading shit from the screen
if (rendermode != render_none && !(titlemapinaction || reloadinggamestate))
F_WipeColorFill(levelfadecol);
@ -4323,6 +4321,8 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate)
LUAh_MapLoad();
}
P_MapEnd(); // tmthing is no longer needed from this point onwards
// No render mode or reloading gamestate, stop here.
if (rendermode == render_none || reloadinggamestate)
return true;