hedgewars/uGearsList.pas
changeset 14616 4638aa2ea8f2
parent 14398 87562a68c41f
child 14734 e57c8ace7d96
equal deleted inserted replaced
14615:c3c0f94a5333 14616:4638aa2ea8f2
   864                             Hedgehogs[t].Gear^.Health:= 0
   864                             Hedgehogs[t].Gear^.Health:= 0
   865                         else if (Hedgehogs[t].GearHidden <> nil) then
   865                         else if (Hedgehogs[t].GearHidden <> nil) then
   866                             Hedgehogs[t].GearHidden^.Health:= 0  // hog is still hidden. if tardis should return though, lua, eh...
   866                             Hedgehogs[t].GearHidden^.Health:= 0  // hog is still hidden. if tardis should return though, lua, eh...
   867             end;
   867             end;
   868 
   868 
       
   869         // Update passive status of clan
       
   870         if (not Gear^.Hedgehog^.Team^.Clan^.Passive) then
       
   871             begin
       
   872             Gear^.Hedgehog^.Team^.Clan^.Passive:= true;
       
   873             for i:= 0 to Pred(team^.Clan^.TeamsNumber) do
       
   874                 begin
       
   875                 with team^.Clan^.Teams[i]^ do
       
   876                     if (not Passive) then
       
   877                         for t:= 0 to cMaxHHIndex do
       
   878                             if (Hedgehogs[t].Gear <> nil) or (Hedgehogs[t].GearHidden <> nil) then
       
   879                                 begin
       
   880                                 Gear^.Hedgehog^.Team^.Clan^.Passive:= false;
       
   881                                 break;
       
   882                                 end;
       
   883                 if (not Gear^.Hedgehog^.Team^.Clan^.Passive) then
       
   884                     break;
       
   885                 end;
       
   886             end;
       
   887 
   869         // should be not CurrentHedgehog, but hedgehog of the last gear which caused damage to this hog
   888         // should be not CurrentHedgehog, but hedgehog of the last gear which caused damage to this hog
   870         // same stand for CheckHHDamage
   889         // same stand for CheckHHDamage
   871         if (Gear^.LastDamage <> nil) and (CurrentHedgehog <> nil) then
   890         if (Gear^.LastDamage <> nil) and (CurrentHedgehog <> nil) then
   872             uStats.HedgehogDamaged(Gear, Gear^.LastDamage, 0, true)
   891             uStats.HedgehogDamaged(Gear, Gear^.LastDamage, 0, true)
   873         else if CurrentHedgehog <> nil then
   892         else if CurrentHedgehog <> nil then