hedgewars/uWorld.pas
changeset 6706 c4272519b128
parent 6700 e04da46ee43c
child 6710 42504695122d
equal deleted inserted replaced
6705:d2e95dcf2bb0 6706:c4272519b128
  1224         r.h:= HealthTex^.h;
  1224         r.h:= HealthTex^.h;
  1225         DrawFromRect(14, cScreenHeight + DrawHealthY + smallScreenOffset, @r, HealthTex);
  1225         DrawFromRect(14, cScreenHeight + DrawHealthY + smallScreenOffset, @r, HealthTex);
  1226 
  1226 
  1227         // draw health bars right border
  1227         // draw health bars right border
  1228         inc(r.x, cTeamHealthWidth + 2);
  1228         inc(r.x, cTeamHealthWidth + 2);
       
  1229         if TeamHealth = 0 then inc(r.x);
  1229         r.w:= 3;
  1230         r.w:= 3;
  1230         DrawFromRect(TeamHealthBarWidth + 16, cScreenHeight + DrawHealthY + smallScreenOffset, @r, HealthTex);
  1231         DrawFromRect(TeamHealthBarWidth + 16, cScreenHeight + DrawHealthY + smallScreenOffset, @r, HealthTex);
  1231 
  1232 
  1232         if not highlight and not hasGone then
  1233         if not highlight and not hasGone and (TeamHealth > 1) then
  1233             for i:= 0 to cMaxHHIndex do
  1234             for i:= 0 to cMaxHHIndex do
  1234                 if Hedgehogs[i].Gear <> nil then
  1235                 if Hedgehogs[i].Gear <> nil then
  1235                     begin
  1236                     begin
  1236                     inc(h,Hedgehogs[i].Gear^.Health);
  1237                     inc(h,Hedgehogs[i].Gear^.Health);
  1237                     if h < TeamHealth then DrawTexture(15 + h*TeamHealthBarWidth div TeamHealth, cScreenHeight + DrawHealthY + smallScreenOffset + 1, SpritesData[sprSlider].Texture);
  1238                     if h < TeamHealth then DrawTexture(15 + h*TeamHealthBarWidth div TeamHealth, cScreenHeight + DrawHealthY + smallScreenOffset + 1, SpritesData[sprSlider].Texture);