hedgewars/GSHandlers.inc
changeset 2052 1f67933cb620
parent 2042 905c554d62e6
child 2058 5c2b52755141
--- a/hedgewars/GSHandlers.inc	Wed May 13 19:53:45 2009 +0000
+++ b/hedgewars/GSHandlers.inc	Thu May 14 03:41:34 2009 +0000
@@ -471,7 +471,7 @@
     begin
     cLaserSighting:= true;
     HHGear^.Message:= 0;
-    dec(HHGear^.Angle,32)
+    if(HHGear^.Angle - 32 >= 0) then dec(HHGear^.Angle,32)
     end;
 
 if (HHGear^.Message and gm_Attack) <> 0 then
@@ -484,9 +484,14 @@
     end
 else
     if (GameTicks mod 32) = 0 then
-        if (GameTicks mod 4096) < 2048 then inc(HHGear^.Angle)
-        else dec(HHGear^.Angle);
+        if (GameTicks mod 4096) < 2048 then 
+            begin
+            if(HHGear^.Angle + 1 <= cMaxAngle) then inc(HHGear^.Angle)
+            end
+        else
+            if(HHGear^.Angle - 1 >= 0) then dec(HHGear^.Angle);
 
+if (TurnTimeLeft > 0) then dec(TurnTimeLeft)
 end;
 
 ////////////////////////////////////////////////////////////////////////////////