hedgewars/uGearsList.pas
changeset 15210 f783f5d55717
parent 15146 6b7d92fa4912
child 15222 deaa316af414
equal deleted inserted replaced
15209:fe79f62ef158 15210:f783f5d55717
   871             end;
   871             end;
   872 
   872 
   873         Gear^.Hedgehog^.Gear:= nil;
   873         Gear^.Hedgehog^.Gear:= nil;
   874 
   874 
   875         if Gear^.Hedgehog^.King then
   875         if Gear^.Hedgehog^.King then
       
   876             // If king died, kill the rest of the team
   876             begin
   877             begin
   877             Gear^.Hedgehog^.Team^.hasKing:= false;
   878             with Gear^.Hedgehog^.Team^ do
   878             for i:= 0 to Pred(team^.Clan^.TeamsNumber) do
   879                 begin
   879                 with team^.Clan^.Teams[i]^ do
   880                 Gear^.Hedgehog^.Team^.hasKing:= false;
   880                     for t:= 0 to cMaxHHIndex do
   881                 for t:= 0 to cMaxHHIndex do
   881                         if Hedgehogs[t].Gear <> nil then
   882                     if Hedgehogs[t].Gear <> nil then
   882                             Hedgehogs[t].Gear^.Health:= 0
   883                         Hedgehogs[t].Gear^.Health:= 0
   883                         else if (Hedgehogs[t].GearHidden <> nil) then
   884                     else if (Hedgehogs[t].GearHidden <> nil) then
   884                             Hedgehogs[t].GearHidden^.Health:= 0  // hog is still hidden. if tardis should return though, lua, eh...
   885                         Hedgehogs[t].GearHidden^.Health:= 0  // Hog is still hidden. If tardis should return though, Lua, eh ...
       
   886                 end;
   885             end;
   887             end;
   886 
   888 
   887         // Update passive status of clan
   889         // Update passive status of clan
   888         if (not Gear^.Hedgehog^.Team^.Clan^.Passive) then
   890         if (not Gear^.Hedgehog^.Team^.Clan^.Passive) then
   889             begin
   891             begin