hedgewars/uGears.pas
changeset 12938 b075ad6112c9
parent 12928 fa402ce826c2
child 13031 bef97cc310b0
equal deleted inserted replaced
12937:a84a05719454 12938:b075ad6112c9
   540     while t <> nil do
   540     while t <> nil do
   541         begin
   541         begin
   542         t^.PortalCounter:= 0;
   542         t^.PortalCounter:= 0;
   543         if ((GameFlags and gfResetHealth) <> 0) and (t^.Kind = gtHedgehog) and (t^.Health < t^.Hedgehog^.InitialHealth) then
   543         if ((GameFlags and gfResetHealth) <> 0) and (t^.Kind = gtHedgehog) and (t^.Health < t^.Hedgehog^.InitialHealth) then
   544             begin
   544             begin
       
   545             i:= t^.Hedgehog^.InitialHealth - t^.Health;
   545             t^.Health:= t^.Hedgehog^.InitialHealth;
   546             t^.Health:= t^.Hedgehog^.InitialHealth;
       
   547             if i > 0 then
       
   548                 HHHeal(t^.Hedgehog, i, false, $00FF0040);
   546             RenderHealth(t^.Hedgehog^);
   549             RenderHealth(t^.Hedgehog^);
   547             end;
   550             end;
   548         t:= t^.NextGear
   551         t:= t^.NextGear
   549         end;
   552         end;
   550 
   553