Fix warnings
authorunc0rr
Tue, 03 Jul 2007 17:06:18 +0000
changeset 551 86bc0430ba17
parent 550 f6a18d2bab00
child 552 2167020d3bc0
Fix warnings
hedgewars/GSHandlers.inc
hedgewars/uTeams.pas
--- 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;
--- a/hedgewars/uTeams.pas	Tue Jul 03 17:03:41 2007 +0000
+++ b/hedgewars/uTeams.pas	Tue Jul 03 17:06:18 2007 +0000
@@ -48,7 +48,7 @@
              ExtDriven: boolean;
              Binds: TBinds;
              Hedgehogs: array[0..cMaxHHIndex] of THedgehog;
-             CurrHedgehog: LongInt;
+             CurrHedgehog: LongWord;
              NameTag: PSDL_Surface;
              CrosshairSurf: PSDL_Surface;
              GraveRect, HealthRect: TSDL_Rect;
@@ -64,7 +64,7 @@
              Color, AdjColor: Longword;
              Teams: array[0..Pred(cMaxTeams)] of PTeam;
              TeamsNumber: Longword;
-             CurrTeam: LongInt;
+             CurrTeam: LongWord;
              ClanHealth: LongInt;
              ClanIndex: LongInt;
              end;
@@ -132,7 +132,7 @@
 end;
 
 procedure SwitchHedgehog;
-var c: LongInt;
+var c: LongWord;
     t: LongWord;
     g: PGear;
 begin