hedgewars/uGearsUtils.pas
changeset 15195 7d41e7889123
parent 15181 d13a38548112
child 15220 ceb289e8a582
equal deleted inserted replaced
15194:a6cf13eebb14 15195:7d41e7889123
   281     if (Gear^.Kind = gtHedgehog) then
   281     if (Gear^.Kind = gtHedgehog) then
   282         begin
   282         begin
   283         Gear^.LastDamage := AttackerHog;
   283         Gear^.LastDamage := AttackerHog;
   284 
   284 
   285         Gear^.Hedgehog^.Team^.Clan^.Flawless:= false;
   285         Gear^.Hedgehog^.Team^.Clan^.Flawless:= false;
   286         HHHurt(Gear^.Hedgehog, Source, Damage);
   286 
   287         AddDamageTag(hwRound(Gear^.X), hwRound(Gear^.Y), Damage, Gear^.Hedgehog^.Team^.Clan^.Color);
   287         if (Gear^.State and gstHHDeath) <> 0 then
       
   288             // If hog took damage while dying, explode hog instantly (see doStepHedgehogDead)
       
   289             Gear^.Timer:= 1
       
   290         else
       
   291             begin
       
   292             HHHurt(Gear^.Hedgehog, Source, Damage);
       
   293             AddDamageTag(hwRound(Gear^.X), hwRound(Gear^.Y), Damage, Gear^.Hedgehog^.Team^.Clan^.Color);
       
   294             end;
       
   295 
   288         tmpDmg:= min(Damage, max(0,Gear^.Health-Gear^.Damage));
   296         tmpDmg:= min(Damage, max(0,Gear^.Health-Gear^.Damage));
   289         if (Gear <> CurrentHedgehog^.Gear) and (CurrentHedgehog^.Gear <> nil) and (tmpDmg >= 1) then
   297         if (Gear <> CurrentHedgehog^.Gear) and (CurrentHedgehog^.Gear <> nil) and (tmpDmg >= 1) then
   290             begin
   298             begin
   291             if cVampiric then
   299             if cVampiric then
   292                 begin
   300                 begin