--- a/hedgewars/uAmmos.pas Mon Nov 15 04:30:11 2010 +0100
+++ b/hedgewars/uAmmos.pas Mon Nov 15 14:39:58 2010 -0500
@@ -68,20 +68,7 @@
begin
TryDo(mi[Ammoz[a].Slot] <= cMaxSlotAmmoIndex, 'Ammo slot overflow', true);
Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]]:= Ammoz[a].Ammo;
- with Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]] do
- begin
- Count:= cnts[a];
- if (TotalRounds < 0) and ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then Count:= AMMO_INFINITE;
- end;
- inc(mi[Ammoz[a].Slot])
- end
- else if (TotalRounds < 0) and ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then
- begin
- TryDo(mi[Ammoz[a].Slot] <= cMaxSlotAmmoIndex, 'Ammo slot overflow', true);
- Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]]:= Ammoz[a].Ammo;
-
- Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]].Count:= AMMO_INFINITE;
-
+ with Ammo^[Ammoz[a].Slot, mi[Ammoz[a].Slot]] do Count:= cnts[a];
inc(mi[Ammoz[a].Slot])
end
end
@@ -134,10 +121,14 @@
if ((GameFlags and gfPlaceHog) <> 0) and
(a <> amTeleport) and (a <> amSkip) and
- (Ammoz[a].SkipTurns < 10000) then inc(Ammoz[a].SkipTurns,10000)
+ (Ammoz[a].SkipTurns < 10000) then inc(Ammoz[a].SkipTurns,10000);
+ if ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then ammos[a]:= AMMO_INFINITE
end
else ammos[a]:= AMMO_INFINITE;
- InitialCounts[Pred(StoreCnt)][a]:= ammos[a];
+ if ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then
+ InitialCounts[Pred(StoreCnt)][a]:= cnt
+ else
+ InitialCounts[Pred(StoreCnt)][a]:= ammos[a];
end;
FillAmmoStore(StoresList[Pred(StoreCnt)], ammos)
end;