hedgewars/GSHandlers.inc
changeset 7294 135e4fb3b095
parent 7283 322ff9418461
child 7293 468cf6d561e5
--- a/hedgewars/GSHandlers.inc	Tue Jun 26 02:14:35 2012 +0400
+++ b/hedgewars/GSHandlers.inc	Tue Jun 26 02:15:50 2012 +0400
@@ -2139,7 +2139,11 @@
                 else sparkles^.Tint:= $FAB22CFF
                 end;
             end;
-        if Gear^.Timer < 1000 then exit;
+        if Gear^.Timer < 1000 then 
+            begin
+            AllInactive:= false;
+            exit
+            end
         end;
 
     if (Gear^.Damage > 0) or exBoom then
@@ -4753,7 +4757,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 procedure doStepFlamethrowerWork(Gear: PGear);
 var 
-    HHGear: PGear;
+    HHGear, flame: PGear;
     rx, ry, speed: hwFloat;
     i, gX, gY: LongInt;
 begin
@@ -4791,14 +4795,18 @@
             ry := rndSign(getRandomf * _0_1);
             speed := _0_5 * (_10 / Gear^.Tag);
     
-            AddGear(gx, gy, gtFlame, gstTmpFlag,
+            flame:= AddGear(gx, gy, gtFlame, gstTmpFlag,
                     SignAs(AngleSin(HHGear^.Angle) * speed, HHGear^.dX) + rx,
                     AngleCos(HHGear^.Angle) * ( - speed) + ry, 0);
+            flame^.CollisionMask:= $FF7F;
             
             if (Gear^.Health mod 30) = 0 then
-                AddGear(gx, gy, gtFlame, 0,
+                begin
+                flame:= AddGear(gx, gy, gtFlame, 0,
                         SignAs(AngleSin(HHGear^.Angle) * speed, HHGear^.dX) + rx,
                         AngleCos(HHGear^.Angle) * ( - speed) + ry, 0);
+                flame^.CollisionMask:= $FF7F;
+                end
             end;
         Gear^.Timer:= Gear^.Tag
         end;
@@ -4834,7 +4842,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 procedure doStepLandGunWork(Gear: PGear);
 var 
-    HHGear: PGear;
+    HHGear, land: PGear;
     rx, ry, speed: hwFloat;
     i, gX, gY: LongInt;
 begin
@@ -4871,9 +4879,10 @@
         ry := rndSign(getRandomf * _0_1);
         speed := (_3 / Gear^.Tag);
 
-        AddGear(gx, gy, gtFlake, gstTmpFlag, 
+        land:= AddGear(gx, gy, gtFlake, gstTmpFlag, 
                 SignAs(AngleSin(HHGear^.Angle) * speed, HHGear^.dX) + rx, 
                 AngleCos(HHGear^.Angle) * ( - speed) + ry, 0);
+        land^.CollisionMask:= $FF7F;
             
         Gear^.Timer:= Gear^.Tag
         end;