--- a/hedgewars/GSHandlers.inc Tue Jul 03 17:03:41 2007 +0000
+++ b/hedgewars/GSHandlers.inc Tue Jul 03 17:06:18 2007 +0000
@@ -1198,8 +1198,8 @@
th:= CurrentTeam^.CurrHedgehog;
repeat
- CurrentTeam^.CurrHedgehog:= Succ(CurrentTeam^.CurrHedgehog) mod (cMaxHHIndex + 1);
- until (CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog].Gear <> nil) or (CurrentTeam^.CurrHedgehog = th);
+ CurrentTeam^.CurrHedgehog:= Succ(CurrentTeam^.CurrHedgehog) mod (CurrentTeam^.HedgehogsNumber);
+ until (CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog].Gear <> nil);
HHGear:= CurrentTeam^.Hedgehogs[CurrentTeam^.CurrHedgehog].Gear;
HHGear^.State:= State;