equal
deleted
inserted
replaced
48 function GetAmmoEntry(var Hedgehog: THedgehog; am: TAmmoType): PAmmo; |
48 function GetAmmoEntry(var Hedgehog: THedgehog; am: TAmmoType): PAmmo; |
49 |
49 |
50 var StoreCnt: LongInt; |
50 var StoreCnt: LongInt; |
51 |
51 |
52 implementation |
52 implementation |
53 uses uVariables, uCommands, uUtils, uCaptions, uDebug; |
53 uses uVariables, uCommands, uUtils, uCaptions, uDebug, uScript; |
54 |
54 |
55 type TAmmoCounts = array[TAmmoType] of Longword; |
55 type TAmmoCounts = array[TAmmoType] of Longword; |
56 TAmmoArray = array[TAmmoType] of TAmmo; |
56 TAmmoArray = array[TAmmoType] of TAmmo; |
57 var StoresList: array[0..Pred(cMaxHHs)] of PHHAmmo; |
57 var StoresList: array[0..Pred(cMaxHHs)] of PHHAmmo; |
58 ammoLoadout, ammoProbability, ammoDelay, ammoReinforcement: shortstring; |
58 ammoLoadout, ammoProbability, ammoDelay, ammoReinforcement: shortstring; |
285 var CurWeapon: PAmmo; |
285 var CurWeapon: PAmmo; |
286 begin |
286 begin |
287 CurWeapon:= GetCurAmmoEntry(Hedgehog); |
287 CurWeapon:= GetCurAmmoEntry(Hedgehog); |
288 with Hedgehog do |
288 with Hedgehog do |
289 begin |
289 begin |
|
290 if CurAmmoType <> amNothing then |
|
291 ScriptCall('onUsedAmmo', ord(CurAmmoType)); |
290 |
292 |
291 MultiShootAttacks:= 0; |
293 MultiShootAttacks:= 0; |
292 with CurWeapon^ do |
294 with CurWeapon^ do |
293 if Count <> AMMO_INFINITE then |
295 if Count <> AMMO_INFINITE then |
294 begin |
296 begin |