add a half-second flighttime delay to flamethrower flames so they can leave the "barrel" of the flamethrower without burning the hog
--- 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