tweak DrawTunnel call of blowtorch. should fix issues with blowtorch going horizontal when it shouldn't
authorsheepluva
Fri, 04 Nov 2011 12:50:37 +0100
changeset 6278 654eed7c6b97
parent 6276 1e2f8da1860a
child 6279 7f724835ea57
tweak DrawTunnel call of blowtorch. should fix issues with blowtorch going horizontal when it shouldn't
hedgewars/GSHandlers.inc
--- a/hedgewars/GSHandlers.inc	Fri Nov 04 00:38:37 2011 +0100
+++ b/hedgewars/GSHandlers.inc	Fri Nov 04 12:50:37 2011 +0100
@@ -1424,10 +1424,13 @@
         end;
 
     if b then
-        DrawTunnel(HHGear^.X - Gear^.dX * cHHRadius, HHGear^.Y - _4 - Gear^.dY * cHHRadius + hwAbs(
-                   Gear^.dY) * 7,
+    begin
+        DrawTunnel(HHGear^.X + Gear^.dX * cHHRadius,
+        HHGear^.Y + Gear^.dY * cHHRadius - _1 -
+        ((hwAbs(Gear^.dX) / (hwAbs(Gear^.dX) + hwAbs(Gear^.dY))) * _0_5 * 7),
         Gear^.dX, Gear^.dY,
-        cHHRadius * 5, cHHRadius * 2 + 7);
+        cHHStepTicks, cHHRadius * 2 + 7);
+    end;
 
     if (TurnTimeLeft = 0) or (Gear^.Timer = 0) or ((HHGear^.Message and gmAttack) <> 0) then
         begin