Move sidecar lua load to prior to script load. This should let the script use it for dependencies.
authornemo
Mon, 24 Apr 2017 09:59:10 -0400
changeset 12316 d09eba2e1dd8
parent 12315 0f98d45204d7
child 12317 b81a1d1497c4
Move sidecar lua load to prior to script load. This should let the script use it for dependencies.
hedgewars/uScript.pas
--- a/hedgewars/uScript.pas	Mon Apr 24 13:53:34 2017 +0200
+++ b/hedgewars/uScript.pas	Mon Apr 24 09:59:10 2017 -0400
@@ -2979,6 +2979,8 @@
 if f = nil then
     exit;
 
+hedgewarsMountPackage(Str2PChar(copy(s, 1, length(s)-4)+'.hwp'));
+
 physfsReaderSetBuffer(@buf);
 ret:= lua_load(luaState, @physfsReader, f, Str2PChar(s));
 pfsClose(f);
@@ -2995,7 +2997,6 @@
     lua_pcall(luaState, 0, 0, 0);
     ScriptLoaded:= true
     end;
-hedgewarsMountPackage(Str2PChar(copy(s, 1, length(s)-4)+'.hwp'));
 end;
 
 procedure SetGlobals;