hedgewars/PascalExports.pas
changeset 3650 ec90e573f47a
parent 3649 bc35f8fee587
child 3651 7058ca178f3b
--- a/hedgewars/PascalExports.pas	Sat Jul 17 16:35:14 2010 +0200
+++ b/hedgewars/PascalExports.pas	Sun Jul 18 03:26:15 2010 +0200
@@ -23,7 +23,7 @@
 var xx, yy: LongInt;
 
 // retrieve protocol information
-procedure HW_versionInfo(netProto: PShortInt; versionStr: Ppchar); cdecl; export;
+procedure HW_versionInfo(netProto: PShortInt; versionStr: PPChar); cdecl; export;
 begin
 // http://bugs.freepascal.org/view.php?id=16156
     if netProto <> nil then netProto^:= cNetProtoVersion;
@@ -212,6 +212,19 @@
     exit( (CurrentHedgehog^.Gear^.State and gstHHChooseTarget) <> 0 )
 end;
 
+function HW_isWeaponTimerable: boolean; cdecl; export;
+var CurSlot, CurAmmo: LongWord;
+begin
+    CurSlot:= CurrentHedgehog^.CurSlot;
+    CurAmmo:= CurrentHedgehog^.CurAmmo;
+    exit( (CurrentHedgehog^.Ammo^[CurSlot, CurAmmo].Propz and ammoprop_Timerable) <> 0)
+end;
+
+procedure HW_setGrenadeTime(time: LongInt); cdecl; export;
+begin
+    ParseCommand('/timer ' + inttostr(time), true);
+end;
+
 //amSwitch
 {$ENDIF}