Remove bit of debug code from prior, don't switch weapons on end of turn (stick with whatever the last weapon was)
--- a/hedgewars/uAmmos.pas Mon Oct 11 11:36:47 2010 -0400
+++ b/hedgewars/uAmmos.pas Mon Oct 11 12:13:06 2010 -0400
@@ -147,9 +147,7 @@
else ammos[a]:= AMMO_INFINITE;
InitialCounts[Pred(StoreCnt)][a]:= ammos[a];
end;
-FillAmmoStore(StoresList[Pred(StoreCnt)], ammos);
-for cnt:= 0 to cMaxSlotIndex do
- PackAmmo(StoresList[Pred(StoreCnt)], cnt)
+FillAmmoStore(StoresList[Pred(StoreCnt)], ammos)
end;
function GetAmmoByNum(num: Longword): PHHAmmo;
--- a/hedgewars/uTeams.pas Mon Oct 11 11:36:47 2010 -0400
+++ b/hedgewars/uTeams.pas Mon Oct 11 12:13:06 2010 -0400
@@ -231,6 +231,8 @@
procedure AfterSwitchHedgehog;
var g: PGear;
i, t: LongInt;
+ CurWeapon: PAmmo;
+
begin
if PlacingHogs then
begin
@@ -250,7 +252,8 @@
inc(CurrentTeam^.Clan^.TurnNumber);
-SwitchNotHeldAmmo(CurrentHedgehog^);
+CurWeapon:= GetAmmoEntry(CurrentHedgehog^);
+if CurWeapon^.Count = 0 then CurrentHedgehog^.CurAmmoType:= amNothing;
with CurrentHedgehog^ do
begin