hedgewars/uCommandHandlers.pas
changeset 13812 1f15b0ee8e34
parent 13772 2e8b3081cf80
child 13867 0ecf77e203c0
--- a/hedgewars/uCommandHandlers.pas	Mon Sep 24 11:16:08 2018 -0400
+++ b/hedgewars/uCommandHandlers.pas	Mon Sep 24 11:18:48 2018 -0400
@@ -113,7 +113,7 @@
 if s[byte(s[0])]='"' then
     Delete(s, byte(s[0]), 1);
 cScriptName:= s;
-ScriptLoad(s)
+ScriptLoad(s, true)
 end;
 
 procedure chScriptParam(var s: shortstring);
@@ -131,7 +131,8 @@
 procedure chCurU_m(var s: shortstring);
 begin
 s:= s; // avoid compiler hint
-CursorMovementY:= 0;
+if CursorMovementY < 0 then
+    CursorMovementY:= 0;
 end;
 
 procedure chCurD_p(var s: shortstring);
@@ -143,7 +144,8 @@
 procedure chCurD_m(var s: shortstring);
 begin
 s:= s; // avoid compiler hint
-CursorMovementY:= 0;
+if CursorMovementY > 0 then
+    CursorMovementY:= 0;
 end;
 
 procedure chCurL_p(var s: shortstring);
@@ -155,7 +157,8 @@
 procedure chCurL_m(var s: shortstring);
 begin
 s:= s; // avoid compiler hint
-CursorMovementX:= 0;
+if CursorMovementX < 0 then
+    CursorMovementX:= 0;
 end;
 
 procedure chCurR_p(var s: shortstring);
@@ -167,7 +170,8 @@
 procedure chCurR_m(var s: shortstring);
 begin
 s:= s; // avoid compiler hint
-CursorMovementX:= 0;
+if CursorMovementX > 0 then
+    CursorMovementX:= 0;
 end;
 
 procedure chLeft_p(var s: shortstring);
@@ -536,7 +540,7 @@
     InitStepsFlags:= InitStepsFlags or cifMap
     end;
 cMapName:= s;
-ScriptLoad('Maps/' + s + '/map.lua')
+ScriptLoad('Maps/' + s + '/map.lua', false)
 end;
 
 procedure chSetTheme(var s: shortstring);