hedgewars/uTeams.pas
changeset 4391 de9e1a5102b4
parent 4377 43945842da0c
child 4393 883b979697e4
--- a/hedgewars/uTeams.pas	Sat Nov 20 23:55:00 2010 +0300
+++ b/hedgewars/uTeams.pas	Sun Nov 21 01:08:43 2010 -0500
@@ -122,6 +122,19 @@
         InsertGearToList(Gear)
         end
     end;
+// Try to make the ammo menu viewed when not your turn be a bit more useful for per-hog-ammo mode
+with CurrentTeam^ do
+    if ((GameFlags and gfPerHogAmmo) <> 0) and (not ExtDriven) and (CurrentHedgehog^.BotLevel = 0) then
+        begin
+        c:= CurrHedgehog;
+        repeat
+            begin
+            inc(c);
+            if c > cMaxHHIndex then c:= 0
+            end
+        until (c = CurrHedgehog) or (Hedgehogs[c].Gear <> nil);
+        LocalAmmo:= Hedgehogs[c].AmmoStore
+        end;
 
 c:= CurrentTeam^.Clan^.ClanIndex;
 repeat