equal
deleted
inserted
replaced
75 function AddTeam: PTeam; |
75 function AddTeam: PTeam; |
76 procedure ApplyAmmoChanges(var Hedgehog: THedgehog); |
76 procedure ApplyAmmoChanges(var Hedgehog: THedgehog); |
77 procedure SwitchHedgehog; |
77 procedure SwitchHedgehog; |
78 procedure InitTeams; |
78 procedure InitTeams; |
79 procedure OnUsedAmmo(Ammo: PHHAmmo); |
79 procedure OnUsedAmmo(Ammo: PHHAmmo); |
|
80 function HHHasAmmo(Hedgehog: PHedgehog; Ammo: TAmmoType): boolean; |
80 function TeamSize(p: PTeam): Longword; |
81 function TeamSize(p: PTeam): Longword; |
81 procedure RecountTeamHealth(team: PTeam); |
82 procedure RecountTeamHealth(team: PTeam); |
82 procedure RestoreTeamsFromSave; |
83 procedure RestoreTeamsFromSave; |
83 |
84 |
84 implementation |
85 implementation |
284 if Count = 0 then PackAmmo(Ammo, CurSlot) |
285 if Count = 0 then PackAmmo(Ammo, CurSlot) |
285 end |
286 end |
286 end |
287 end |
287 end; |
288 end; |
288 |
289 |
|
290 function HHHasAmmo(Hedgehog: PHedgehog; Ammo: TAmmoType): boolean; |
|
291 var slot, ami: integer; |
|
292 begin |
|
293 Slot:= Ammoz[Ammo].Slot; |
|
294 ami:= 0; |
|
295 Result:= false; |
|
296 while (not Result) and (ami <= cMaxSlotAmmoIndex) do |
|
297 begin |
|
298 with Hedgehog.Ammo[Slot, ami] do |
|
299 if (AmmoType = Ammo) and (Count > 0) then Result:= true; |
|
300 inc(ami) |
|
301 end |
|
302 end; |
|
303 |
289 function TeamSize(p: PTeam): Longword; |
304 function TeamSize(p: PTeam): Longword; |
290 var i: Longword; |
305 var i: Longword; |
291 begin |
306 begin |
292 Result:= 0; |
307 Result:= 0; |
293 for i:= 0 to cMaxHHIndex do |
308 for i:= 0 to cMaxHHIndex do |