hedgewars/GSHandlers.inc
changeset 6011 519f8a58c021
parent 6002 7f790689205c
child 6081 537bbd5c1a62
--- a/hedgewars/GSHandlers.inc	Sat Sep 24 17:12:46 2011 +0200
+++ b/hedgewars/GSHandlers.inc	Sat Sep 24 22:16:49 2011 +0400
@@ -509,6 +509,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 procedure doStepMolotov(Gear: PGear);
 var 
+	s: Longword;
     i, gX, gY: LongInt;
     dX, dY: hwFloat;
     Fire: PGear;
@@ -520,8 +521,8 @@
     CalcRotationDirAngle(Gear);
 
     // let's add some smoke depending on speed
-    i:= max(32,152 - hwRound(Distance(Gear^.dX,Gear^.dY)*120))+random(10);
-    if (GameTicks mod i) = 0 then
+    s:= max(32,152 - hwRound(Distance(Gear^.dX,Gear^.dY)*120))+random(10);
+    if (GameTicks mod s) = 0 then
         begin
         // adjust angle to match the texture
         if Gear^.dX.isNegative then i:= 130 else i:= 50;
@@ -4809,7 +4810,7 @@
         i := hwRound(Gear^.X) - HitGear^.Radius + 2;
         ei := hwRound(Gear^.X) + HitGear^.Radius - 2;
         for j := 1 to 4 do DrawExplosion(i - GetRandom(5), hwRound(Gear^.Y) + 6*j, 3);
-        for j := 1 to 4 do DrawExplosion(ei + GetRandom(5), hwRound(Gear^.Y) + 6*j, 3);
+        for j := 1 to 4 do DrawExplosion(ei + LongInt(GetRandom(5)), hwRound(Gear^.Y) + 6*j, 3);
         while i <= ei do
             begin
             for j := 1 to 11 do DrawExplosion(i, hwRound(Gear^.Y) + 3*j, 3);