hedgewars/PascalExports.pas
changeset 6825 aca4a6807ecc
parent 6700 e04da46ee43c
child 6925 1fbf9266ba52
--- a/hedgewars/PascalExports.pas	Mon Mar 26 03:57:14 2012 +0200
+++ b/hedgewars/PascalExports.pas	Mon Mar 26 03:58:03 2012 +0200
@@ -270,6 +270,18 @@
     ParseCommand('/timer ' + inttostr(time), true);
 end;
 
+function HW_getGrenadeTime: LongInt; cdecl; export;
+var CurWeapon: PAmmo;
+    res: LongInt = 3;
+begin
+    if HW_isWeaponTimerable then
+    begin
+        CurWeapon:= GetAmmoEntry(CurrentHedgehog^);
+        res:= CurWeapon^.Timer div 1000;
+    end;
+    exit(res);
+end;
+
 procedure HW_setPianoSound(snd: LongInt); cdecl; export;
 begin
     // this most likely won't work in network game