hedgewars/PascalExports.pas
changeset 6825 aca4a6807ecc
parent 6700 e04da46ee43c
child 6925 1fbf9266ba52
equal deleted inserted replaced
6824:617a861b7750 6825:aca4a6807ecc
   268 procedure HW_setGrenadeTime(time: LongInt); cdecl; export;
   268 procedure HW_setGrenadeTime(time: LongInt); cdecl; export;
   269 begin
   269 begin
   270     ParseCommand('/timer ' + inttostr(time), true);
   270     ParseCommand('/timer ' + inttostr(time), true);
   271 end;
   271 end;
   272 
   272 
       
   273 function HW_getGrenadeTime: LongInt; cdecl; export;
       
   274 var CurWeapon: PAmmo;
       
   275     res: LongInt = 3;
       
   276 begin
       
   277     if HW_isWeaponTimerable then
       
   278     begin
       
   279         CurWeapon:= GetAmmoEntry(CurrentHedgehog^);
       
   280         res:= CurWeapon^.Timer div 1000;
       
   281     end;
       
   282     exit(res);
       
   283 end;
       
   284 
   273 procedure HW_setPianoSound(snd: LongInt); cdecl; export;
   285 procedure HW_setPianoSound(snd: LongInt); cdecl; export;
   274 begin
   286 begin
   275     // this most likely won't work in network game
   287     // this most likely won't work in network game
   276     if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Ammo <> nil) and (CurrentHedgehog^.BotLevel = 0)
   288     if (CurrentHedgehog <> nil) and (CurrentHedgehog^.Ammo <> nil) and (CurrentHedgehog^.BotLevel = 0)
   277         and (CurrentHedgehog^.CurAmmoType = amPiano) then
   289         and (CurrentHedgehog^.CurAmmoType = amPiano) then