hedgewars/uGearsHandlersMess.pas
changeset 9470 9ed07a96349d
parent 9385 dca86192d773
child 9473 a51a69094c24
--- a/hedgewars/uGearsHandlersMess.pas	Fri Sep 27 12:58:21 2013 +0400
+++ b/hedgewars/uGearsHandlersMess.pas	Fri Sep 27 21:52:21 2013 -0400
@@ -5117,11 +5117,12 @@
     begin
     cnt:= 0;
     for j:= 0 to Pred(HH^.Team^.Clan^.TeamsNumber) do
-        for i:= 0 to Pred(HH^.Team^.Clan^.Teams[j]^.HedgehogsNumber) do
-            if (HH^.Team^.Clan^.Teams[j]^.Hedgehogs[i].Gear <> nil)
-            and ((HH^.Team^.Clan^.Teams[j]^.Hedgehogs[i].Gear^.State and gstDrowning) = 0)
-            and (HH^.Team^.Clan^.Teams[j]^.Hedgehogs[i].Gear^.Health > HH^.Team^.Clan^.Teams[j]^.Hedgehogs[i].Gear^.Damage) then
-                inc(cnt);
+        with HH^.Team^.Clan^.Teams[j]^ do
+            for i:= 0 to Pred(HedgehogsNumber) do
+                if (Hedgehogs[i].Gear <> nil)
+                and ((Hedgehogs[i].Gear^.State and gstDrowning) = 0)
+                and (Hedgehogs[i].Gear^.Health > Hedgehogs[i].Gear^.Damage) then
+                    inc(cnt);
     if (cnt = 0) or SuddenDeathDmg or (Gear^.Timer = 0) then
         begin
         if HH^.GearHidden <> nil then