# HG changeset patch
# User nemo
# Date 1417378021 18000
# Node ID dbb77726f0c619c31de9a05ee525be0d672f522b
# Parent  eaccc445c473652cc7d72bf93579977e4dff67c0
add a half-second flighttime delay to flamethrower flames so they can leave the "barrel" of the flamethrower without burning the hog

diff -r eaccc445c473 -r dbb77726f0c6 hedgewars/uGearsHandlersMess.pas
--- a/hedgewars/uGearsHandlersMess.pas	Sun Nov 30 14:41:40 2014 -0500
+++ b/hedgewars/uGearsHandlersMess.pas	Sun Nov 30 15:07:01 2014 -0500
@@ -2131,6 +2131,7 @@
     landPixel: Word;
 begin
     WorldWrap(Gear);
+    if Gear^.FlightTime > 0 then dec(Gear^.FlightTime);
     sticky:= (Gear^.State and gsttmpFlag) <> 0;
     if not sticky then AllInactive := false;
 
@@ -2139,7 +2140,7 @@
         begin
         AllInactive := false;
 
-        if GameTicks and $F = 0 then
+        if (GameTicks and $F = 0) and (Gear^.FlightTime = 0) then
             begin
             Gear^.Radius := 7;
             tdX:= Gear^.dX;
@@ -4769,6 +4770,7 @@
                     SignAs(AngleSin(HHGear^.Angle) * speed, HHGear^.dX) + rx,
                     AngleCos(HHGear^.Angle) * ( - speed) + ry, 0);
             flame^.CollisionMask:= lfNotCurrentMask;
+            flame^.FlightTime:= 500;
 
             if (Gear^.Health mod 30) = 0 then
                 begin
@@ -4776,6 +4778,7 @@
                         SignAs(AngleSin(HHGear^.Angle) * speed, HHGear^.dX) + rx,
                         AngleCos(HHGear^.Angle) * ( - speed) + ry, 0);
                 flame^.CollisionMask:= lfNotCurrentMask;
+		flame^.FlightTime:= 500;
                 end
             end;
         Gear^.Timer:= Gear^.Tag