Kill flame if any gears collide.
authornemo
Fri, 16 Oct 2009 14:03:42 +0000
changeset 2489 43f36aea1f55
parent 2488 1e48275a52b6
child 2490 d8e0630087a0
Kill flame if any gears collide.
hedgewars/uGears.pas
--- a/hedgewars/uGears.pas	Fri Oct 16 13:54:57 2009 +0000
+++ b/hedgewars/uGears.pas	Fri Oct 16 14:03:42 2009 +0000
@@ -1677,6 +1677,7 @@
 
 Damage:= modifyDamage(Damage);
 
+if (Ammo^.Kind = gtFlame) and (i > 0) then Ammo^.Health:= 0;
 while i > 0 do
 	begin
 	dec(i);
@@ -1691,7 +1692,6 @@
 			gtTarget,
 			gtCase: begin
 					if (Ammo^.Kind = gtDrill) then begin Ammo^.Timer:= 0; exit; end;
-                    if (Ammo^.Kind = gtFlame) then Ammo^.Health:= 0;
                     if (not Gear^.Invulnerable) then
                         ApplyDamage(Gear, Damage)
                     else