hedgewars/uWorld.pas
changeset 14968 b4f83570c514
parent 14967 9939134b566d
child 14996 7ff86274114e
equal deleted inserted replaced
14967:9939134b566d 14968:b4f83570c514
  1584 if (UIDisplay = uiAll) and (isNotHiddenByCinematic) then
  1584 if (UIDisplay = uiAll) and (isNotHiddenByCinematic) then
  1585     RenderTeamsHealth;
  1585     RenderTeamsHealth;
  1586 
  1586 
  1587 // Current hedgehog health in top left corner
  1587 // Current hedgehog health in top left corner
  1588 if ((UIDisplay = uiAll) or (UIDisplay = uiNoTeams)) and (isNotHiddenByCinematic) and
  1588 if ((UIDisplay = uiAll) or (UIDisplay = uiNoTeams)) and (isNotHiddenByCinematic) and
  1589         ((GameFlags and gfInvulnerable) = 0) and
       
  1590         (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) and
  1589         (CurrentHedgehog <> nil) and (CurrentHedgehog^.Gear <> nil) and
  1591         (CurrentHedgehog^.HealthTagTex <> nil) and
  1590         (CurrentHedgehog^.HealthTagTex <> nil) and
  1592         ((CurrentHedgehog^.Gear^.State and gstHHDriven) <> 0) then
  1591         ((CurrentHedgehog^.Gear^.State and gstHHDriven) <> 0) then
  1593     begin
  1592     begin
  1594     t:= 11;
  1593     t:= 11;
  1595     i:= t;
  1594     i:= t;
  1596 {$IFDEF USE_TOUCH_INTERFACE}
  1595 {$IFDEF USE_TOUCH_INTERFACE}
  1597     i:= t + pauseButton.frame.y + pauseButton.frame.h;
  1596     i:= t + pauseButton.frame.y + pauseButton.frame.h;
  1598 {$ENDIF}
  1597 {$ENDIF}
       
  1598 
       
  1599     // Hide health and healh icons in gfInvulnerable mode (except heResurrectable)
       
  1600     if ((GameFlags and gfInvulnerable) = 0) then
       
  1601     begin
       
  1602     // Health tag
  1599     DrawTexture(cScreenWidth div 2 - CurrentHedgehog^.HealthTagTex^.w - 16, i, CurrentHedgehog^.HealthTagTex);
  1603     DrawTexture(cScreenWidth div 2 - CurrentHedgehog^.HealthTagTex^.w - 16, i, CurrentHedgehog^.HealthTagTex);
  1600     inc(t, CurrentHedgehog^.HealthTagTex^.h);
  1604     inc(t, CurrentHedgehog^.HealthTagTex^.h);
  1601     cDemoClockFPSOffsetY:= t;
  1605     cDemoClockFPSOffsetY:= t;
  1602 
  1606 
  1603     t:= SpritesData[sprHealthHud].Width + 18;
  1607     t:= SpritesData[sprHealthHud].Width + 18;
  1634     if cVampiric then
  1638     if cVampiric then
  1635         begin
  1639         begin
  1636         inc(t, SpritesData[sprVampHud].Width + 2);
  1640         inc(t, SpritesData[sprVampHud].Width + 2);
  1637         DrawSprite(sprVampHud, (cScreenWidth div 2 - CurrentHedgehog^.HealthTagTex^.w - t), i, 0);
  1641         DrawSprite(sprVampHud, (cScreenWidth div 2 - CurrentHedgehog^.HealthTagTex^.w - t), i, 0);
  1638         end;
  1642         end;
       
  1643     end
       
  1644     // in gfInvulnerable mode ...
       
  1645     else if (CurrentHedgehog^.Effects[heResurrectable] <> 0) then
       
  1646         // show halo for resurrectable hog
       
  1647         DrawSprite(sprHaloHud, (cScreenWidth div 2 - CurrentHedgehog^.HealthTagTex^.w - t - 2), i, 0);
  1639     end
  1648     end
  1640 else
  1649 else
  1641     cDemoClockFPSOffsetY:= 0;
  1650     cDemoClockFPSOffsetY:= 0;
  1642 
  1651 
  1643 // Wind bar
  1652 // Wind bar