From 6ee50e803b0cb4137b611e62aa4d81559dc2c157 Mon Sep 17 00:00:00 2001 From: JTE Date: Thu, 21 May 2015 19:55:22 -0400 Subject: [PATCH] Wrapped Lua MapLoad hook in P_MapStart / P_MapEnd. This fixes a crash if a script tries to use a MapLoad hook to immediately edit the map in some way the moment it finishes loading. --- src/p_setup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/p_setup.c b/src/p_setup.c index f2b0c49d8..c071fa62b 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -2786,7 +2786,9 @@ boolean P_SetupLevel(boolean skipprecip) } P_PreTicker(2); #ifdef HAVE_BLUA + P_MapStart(); LUAh_MapLoad(); + P_MapEnd(); #endif }