equal
deleted
inserted
replaced
105 for slot:= 0 to cMaxSlotIndex do |
105 for slot:= 0 to cMaxSlotIndex do |
106 for ami:= 0 to cMaxSlotAmmoIndex do |
106 for ami:= 0 to cMaxSlotAmmoIndex do |
107 if hhammo^[slot, ami].Count > 0 then |
107 if hhammo^[slot, ami].Count > 0 then |
108 ammos[hhammo^[slot, ami].AmmoType]:= hhammo^[slot, ami].Count; |
108 ammos[hhammo^[slot, ami].AmmoType]:= hhammo^[slot, ami].Count; |
109 |
109 |
110 if ammos[ammo] <> AMMO_INFINITE then inc(ammos[ammo], Ammoz[ammo].NumberInCase); |
110 if ammos[ammo] <> AMMO_INFINITE then |
|
111 begin |
|
112 inc(ammos[ammo], Ammoz[ammo].NumberInCase); |
|
113 if ammos[ammo] > AMMO_INFINITE then ammos[ammo]:= AMMO_INFINITE |
|
114 end; |
|
115 |
111 FillAmmoStore(hhammo, ammos) |
116 FillAmmoStore(hhammo, ammos) |
112 end; |
117 end; |
113 |
118 |
114 procedure PackAmmo(Ammo: PHHAmmo; Slot: LongInt); |
119 procedure PackAmmo(Ammo: PHHAmmo; Slot: LongInt); |
115 var ami: LongInt; |
120 var ami: LongInt; |
149 Slot:= Ammoz[Ammo].Slot; |
154 Slot:= Ammoz[Ammo].Slot; |
150 ami:= 0; |
155 ami:= 0; |
151 while (ami <= cMaxSlotAmmoIndex) do |
156 while (ami <= cMaxSlotAmmoIndex) do |
152 begin |
157 begin |
153 with Hedgehog.Ammo^[Slot, ami] do |
158 with Hedgehog.Ammo^[Slot, ami] do |
154 if (AmmoType = Ammo) and (Count > 0) then exit(true); |
159 if (AmmoType = Ammo) then |
|
160 exit((Count > 0) and (Hedgehog.Team^.Clan^.TurnNumber > Ammoz[AmmoType].SkipTurns)); |
155 inc(ami) |
161 inc(ami) |
156 end; |
162 end; |
157 HHHasAmmo:= false |
163 HHHasAmmo:= false |
158 end; |
164 end; |
159 |
165 |
162 begin |
168 begin |
163 TargetPoint.X:= NoPointX; |
169 TargetPoint.X:= NoPointX; |
164 |
170 |
165 with Hedgehog do |
171 with Hedgehog do |
166 begin |
172 begin |
167 if (Ammo^[CurSlot, CurAmmo].Count = 0)then |
173 if (Ammo^[CurSlot, CurAmmo].Count = 0) then |
168 begin |
174 begin |
169 CurAmmo:= 0; |
175 CurAmmo:= 0; |
170 CurSlot:= 0; |
176 CurSlot:= 0; |
171 while (CurSlot <= cMaxSlotIndex) and (Ammo^[CurSlot, CurAmmo].Count = 0) do inc(CurSlot) |
177 while (CurSlot <= cMaxSlotIndex) and (Ammo^[CurSlot, CurAmmo].Count = 0) do inc(CurSlot) |
172 end; |
178 end; |