equal
deleted
inserted
replaced
121 Ammoz[a].SkipTurns:= 1; |
121 Ammoz[a].SkipTurns:= 1; |
122 |
122 |
123 if ((GameFlags and gfPlaceHog) <> 0) and |
123 if ((GameFlags and gfPlaceHog) <> 0) and |
124 (a <> amTeleport) and (a <> amSkip) and |
124 (a <> amTeleport) and (a <> amSkip) and |
125 (Ammoz[a].SkipTurns < 10000) then inc(Ammoz[a].SkipTurns,10000); |
125 (Ammoz[a].SkipTurns < 10000) then inc(Ammoz[a].SkipTurns,10000); |
126 if ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then ammos[a]:= AMMO_INFINITE |
126 if ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then ammos[a]:= AMMO_INFINITE |
127 end |
127 end |
128 else ammos[a]:= AMMO_INFINITE; |
128 else ammos[a]:= AMMO_INFINITE; |
129 if ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then |
129 if ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then |
130 InitialCounts[Pred(StoreCnt)][a]:= cnt |
130 InitialCounts[Pred(StoreCnt)][a]:= cnt |
131 else |
131 else |
132 InitialCounts[Pred(StoreCnt)][a]:= ammos[a]; |
132 InitialCounts[Pred(StoreCnt)][a]:= ammos[a]; |
133 end; |
133 end; |
134 FillAmmoStore(StoresList[Pred(StoreCnt)], ammos) |
134 FillAmmoStore(StoresList[Pred(StoreCnt)], ammos) |
135 end; |
135 end; |
136 |
136 |
137 function GetAmmoByNum(num: Longword): PHHAmmo; |
137 function GetAmmoByNum(num: Longword): PHHAmmo; |
206 ammos[ammo]:= cnt; |
206 ammos[ammo]:= cnt; |
207 if ammos[ammo] > AMMO_INFINITE then ammos[ammo]:= AMMO_INFINITE; |
207 if ammos[ammo] > AMMO_INFINITE then ammos[ammo]:= AMMO_INFINITE; |
208 |
208 |
209 FillAmmoStore(hhammo, ammos); |
209 FillAmmoStore(hhammo, ammos); |
210 CurWeapon:= GetAmmoEntry(Hedgehog); |
210 CurWeapon:= GetAmmoEntry(Hedgehog); |
211 with Hedgehog do |
211 with Hedgehog, CurWeapon^ do |
212 begin |
|
213 with CurWeapon^ do |
|
214 if Count = 0 then |
212 if Count = 0 then |
215 begin |
213 begin |
216 PackAmmo(Ammo, Ammoz[AmmoType].Slot); |
214 PackAmmo(Ammo, Ammoz[AmmoType].Slot); |
217 CurAmmoType:= amNothing |
215 CurAmmoType:= amNothing |
218 end |
216 end |
219 end |
|
220 end; |
217 end; |
221 |
218 |
222 procedure PackAmmo(Ammo: PHHAmmo; Slot: LongInt); |
219 procedure PackAmmo(Ammo: PHHAmmo; Slot: LongInt); |
223 var ami: LongInt; |
220 var ami: LongInt; |
224 b: boolean; |
221 b: boolean; |