hedgewars/uGearsHedgehog.pas
branchqmlfrontend
changeset 10748 dc587913987c
parent 10714 70f71fac37a3
child 10789 acbf69e2e5cf
--- a/hedgewars/uGearsHedgehog.pas	Thu Dec 18 00:03:53 2014 +0300
+++ b/hedgewars/uGearsHedgehog.pas	Sat Jan 03 23:46:26 2015 +0300
@@ -505,9 +505,11 @@
             end
         else
             Message:= Message and (not gmAttack);
-    end;
+
+    ScriptCall('onHogAttack', ord(CurAmmoType));
+    end; // of with Gear^, Gear^.Hedgehog^ do
+
     TargetPoint.X := NoPointX;
-    ScriptCall('onHogAttack');
 end;
 
 procedure AfterAttack;
@@ -832,7 +834,9 @@
 
     Gear^.Hedgehog^.visStepPos:= (Gear^.Hedgehog^.visStepPos + 1) and 7;
 
-    if (not cArtillery) and ((Gear^.Message and gmPrecise) = 0) then
+    if (not cArtillery or
+           ((CurAmmoGear <> nil) and (CurAmmoGear^.Kind = gtBlowTorch))) and
+       ((Gear^.Message and gmPrecise) = 0) then
         MakeHedgehogsStep(Gear);
 
     SetAllHHToActive(false);