# HG changeset patch
# User sheepluva
# Date 1418524331 -3600
# Node ID 4c78eafe76ac824a7c61866869a8f36336e0a5b8
# Parent  a15d57d941a13f8158d603dc9a964941517375dc
Issue 755: Lua API: Add ammo type parameter for onHogAttack

diff -r a15d57d941a1 -r 4c78eafe76ac hedgewars/uGearsHedgehog.pas
--- a/hedgewars/uGearsHedgehog.pas	Sun Dec 14 03:16:40 2014 +0100
+++ b/hedgewars/uGearsHedgehog.pas	Sun Dec 14 03:32:11 2014 +0100
@@ -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;