# HG changeset patch # User Wuzzy # Date 1536488723 -7200 # Node ID 2e8b3081cf80f59ad0312d26aa25fd8a5fcb4044 # Parent 9fdb13633bcb74dac031d479a1451d233b4d7e09 Only reset CursorMovement to 0 if command "-cur_*" is called with appropriate direction diff -r 9fdb13633bcb -r 2e8b3081cf80 hedgewars/uCommandHandlers.pas --- a/hedgewars/uCommandHandlers.pas Wed Sep 05 18:07:56 2018 +0200 +++ b/hedgewars/uCommandHandlers.pas Sun Sep 09 12:25:23 2018 +0200 @@ -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);