Fix two cursor bugs
authorunc0rr
Mon, 12 Jan 2009 14:55:30 +0000
changeset 1645 f010d68adbb7
parent 1644 1e51e80c383c
child 1646 19b3784ac9d2
Fix two cursor bugs
hedgewars/HHHandlers.inc
hedgewars/hwengine.dpr
--- a/hedgewars/HHHandlers.inc	Mon Jan 12 14:50:22 2009 +0000
+++ b/hedgewars/HHHandlers.inc	Mon Jan 12 14:55:30 2009 +0000
@@ -499,13 +499,14 @@
    Gear^.Message:= 0;
 
 if (TurnTimeLeft = 0) or (Gear^.Damage > 0) then
-   begin
-   TurnTimeLeft:= 0;
-   Gear^.State:= Gear^.State and not (gstHHDriven or gstAnimation);
-   if Gear^.Damage > 0 then
-      Gear^.State:= Gear^.State and not (gstHHJumping or gstHHHJump);
-   exit
-   end;
+	begin
+	TurnTimeLeft:= 0;
+	isCursorVisible:= false;
+	Gear^.State:= Gear^.State and not (gstHHDriven or gstAnimation);
+	if Gear^.Damage > 0 then
+		Gear^.State:= Gear^.State and not (gstHHJumping or gstHHHJump);
+	exit
+	end;
 
 if (Gear^.State and gstAnimation) <> 0 then
 	begin
--- a/hedgewars/hwengine.dpr	Mon Jan 12 14:50:22 2009 +0000
+++ b/hedgewars/hwengine.dpr	Mon Jan 12 14:55:30 2009 +0000
@@ -93,8 +93,8 @@
 			end;
 	gsConfirm,
 	gsGame: begin
+			DrawWorld(Lag); // never place between ProcessKbd and DoGameTick - bugs due to /put cmd and isCursorVisible
 			ProcessKbd;
-			DrawWorld(Lag);
 			DoGameTick(Lag);
 			ProcessVisualGears(Lag);
 			end;