# HG changeset patch # User nemo # Date 1242272494 0 # Node ID 1f67933cb620d60b78877b15102312630e093d54 # Parent 949fe7df09b6198ebc690748a85a996c2772108d constrain angle, decrement turn time diff -r 949fe7df09b6 -r 1f67933cb620 hedgewars/GSHandlers.inc --- 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; ////////////////////////////////////////////////////////////////////////////////