# HG changeset patch # User nemo # Date 1286761402 14400 # Node ID d14ecff9502b4f979977384a57b150c5c2f06fea # Parent ae3583ad6ea9f807b5384ba1e50f175848758203 You win fillammostore diff -r ae3583ad6ea9 -r d14ecff9502b hedgewars/uAmmos.pas --- a/hedgewars/uAmmos.pas Sun Oct 10 21:14:58 2010 -0400 +++ b/hedgewars/uAmmos.pas Sun Oct 10 21:43:22 2010 -0400 @@ -418,20 +418,17 @@ // Restore indefinitely disabled weapons and initial weapon counts. Only used for hog placement right now procedure ResetWeapons; -var i, slot, a: Longword; - t: TAmmoType; +var i, t: Longword; + a: TAmmoType; begin -for i:= 0 to Pred(StoreCnt) do - for slot:= 0 to cMaxSlotIndex do - begin - for a:= 0 to cMaxSlotAmmoIndex do - with StoresList[i]^[slot, a] do - if AmmoType <> amNothing then Count:= InitialCounts[i][AmmoType]; +for t:= 0 to Pred(TeamsCount) do + with TeamsArray[t]^ do + for i:= 0 to cMaxHHIndex do + if Hedgehogs[i].Gear <> nil then + FillAmmoStore(Hedgehogs[i].Ammo, InitialCounts[Hedgehogs[i].AmmoStore]); - PackAmmo(StoresList[i], slot) - end; -for t:= Low(TAmmoType) to High(TAmmoType) do - if Ammoz[t].SkipTurns >= 10000 then dec(Ammoz[t].SkipTurns,10000); +for a:= Low(TAmmoType) to High(TAmmoType) do + if Ammoz[a].SkipTurns >= 10000 then dec(Ammoz[a].SkipTurns,10000) end; procedure initModule;