hedgewars/uTeams.pas
changeset 3697 d5b30d6373fc
parent 3663 8c28abf427f5
child 3770 f54e8cb9a12b
equal deleted inserted replaced
3695:c11abf387a7d 3697:d5b30d6373fc
   170 TryDo(CurrentTeam <> nil, 'nil Team', true);
   170 TryDo(CurrentTeam <> nil, 'nil Team', true);
   171 with CurrentHedgehog^ do
   171 with CurrentHedgehog^ do
   172     if (PreviousTeam <> nil) and PlacingHogs and Unplaced then
   172     if (PreviousTeam <> nil) and PlacingHogs and Unplaced then
   173         begin
   173         begin
   174         Unplaced:= false;
   174         Unplaced:= false;
   175         if Gear <> nil then 
   175         if Gear <> nil then
   176            begin
   176            begin
   177            DeleteCI(Gear);
   177            DeleteCI(Gear);
   178            FindPlace(Gear, false, 0, LAND_WIDTH);
   178            FindPlace(Gear, false, 0, LAND_WIDTH);
   179            if Gear <> nil then AddGearCI(Gear)
   179            if Gear <> nil then AddGearCI(Gear)
   180            end
   180            end
   230 if PlacingHogs then
   230 if PlacingHogs then
   231    begin
   231    begin
   232    PlacingHogs:= false;
   232    PlacingHogs:= false;
   233    for t:= 0 to Pred(TeamsCount) do
   233    for t:= 0 to Pred(TeamsCount) do
   234       for i:= 0 to cMaxHHIndex do
   234       for i:= 0 to cMaxHHIndex do
   235           if (TeamsArray[t]^.Hedgehogs[i].Gear <> nil) and (TeamsArray[t]^.Hedgehogs[i].Unplaced) then 
   235           if (TeamsArray[t]^.Hedgehogs[i].Gear <> nil) and (TeamsArray[t]^.Hedgehogs[i].Unplaced) then
   236              PlacingHogs:= true;
   236              PlacingHogs:= true;
   237 
   237 
   238    if not PlacingHogs then // Reset  various things I mucked with
   238    if not PlacingHogs then // Reset  various things I mucked with
   239       begin
   239       begin
   240       for i:= 0 to ClansCount do
   240       for i:= 0 to ClansCount do