Issue 755: Lua API: Add ammo type parameter for onHogAttack
authorsheepluva
Sun, 14 Dec 2014 03:32:11 +0100
changeset 10669 4c78eafe76ac
parent 10668 a15d57d941a1
child 10670 638af9cb922b
issue #755: Lua API: Add ammo type parameter for onHogAttack
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;