diff -r 3bff941c035f -r f17df78181d8 hedgewars/hwengine.pas --- a/hedgewars/hwengine.pas Sat Apr 02 10:45:33 2016 +0300 +++ b/hedgewars/hwengine.pas Sat Apr 02 23:32:57 2016 +0300 @@ -457,6 +457,12 @@ procedure initEverything (complete:boolean); begin + PathPrefix:= PathPrefix + #0; + UserPathPrefix:= UserPathPrefix + #0; + uPhysFSLayer.initModule(@PathPrefix[1], @UserPathPrefix[1]); + PathPrefix:= copy(PathPrefix, 1, length(PathPrefix) - 1); + UserPathPrefix:= copy(UserPathPrefix, 1, length(UserPathPrefix) - 1); + uUtils.initModule(complete); // opens the debug file, must be the first uVariables.initModule; // inits all global variables uCommands.initModule; // helps below @@ -466,12 +472,6 @@ uLandPainted.initModule; // computes drawn land uIO.initModule; // sets up sockets - PathPrefix:= PathPrefix + #0; - UserPathPrefix:= UserPathPrefix + #0; - uPhysFSLayer.initModule(@PathPrefix[1], @UserPathPrefix[1]); - PathPrefix:= copy(PathPrefix, 1, length(PathPrefix) - 1); - UserPathPrefix:= copy(UserPathPrefix, 1, length(UserPathPrefix) - 1); - uScript.initModule; if complete then