hedgewars/uGears.pas
changeset 4978 0ef650ea3b12
parent 4976 088d40d8aba2
child 5013 04789ba3f200
equal deleted inserted replaced
4977:c89cca0a8785 4978:0ef650ea3b12
  1003 begin
  1003 begin
  1004   if Damage = 0 then exit; // nothing to apply
  1004   if Damage = 0 then exit; // nothing to apply
  1005 
  1005 
  1006     if (Gear^.Kind = gtHedgehog) then
  1006     if (Gear^.Kind = gtHedgehog) then
  1007     begin
  1007     begin
       
  1008     Gear^.Hedgehog^.Team^.Clan^.Flawless:= false;
  1008     uStats.HedgehogDamaged(Gear, AttackerHog);
  1009     uStats.HedgehogDamaged(Gear, AttackerHog);
  1009     HHHurt(Gear^.Hedgehog, Source);
  1010     HHHurt(Gear^.Hedgehog, Source);
  1010     AddDamageTag(hwRound(Gear^.X), hwRound(Gear^.Y), Damage, Gear^.Hedgehog^.Team^.Clan^.Color);
  1011     AddDamageTag(hwRound(Gear^.X), hwRound(Gear^.Y), Damage, Gear^.Hedgehog^.Team^.Clan^.Color);
  1011     tmpDmg:= min(Damage, max(0,Gear^.Health-Gear^.Damage));
  1012     tmpDmg:= min(Damage, max(0,Gear^.Health-Gear^.Damage));
  1012     if (Gear <> CurrentHedgehog^.Gear) and (CurrentHedgehog^.Gear <> nil) and (tmpDmg >= 1) then
  1013     if (Gear <> CurrentHedgehog^.Gear) and (CurrentHedgehog^.Gear <> nil) and (tmpDmg >= 1) then