Fix slider positions
authornemo
Mon, 06 Feb 2012 19:46:46 -0500
changeset 6644 b86a50569238
parent 6642 863459db5432
child 6645 9ff40cf44827
Fix slider positions
hedgewars/uWorld.pas
--- a/hedgewars/uWorld.pas	Mon Feb 06 23:21:04 2012 +0100
+++ b/hedgewars/uWorld.pas	Mon Feb 06 19:46:46 2012 -0500
@@ -1144,8 +1144,8 @@
             for i:= 0 to cMaxHHIndex do
                 if Hedgehogs[i].Gear <> nil then
                     begin
-                    inc(h,round(Hedgehogs[i].Gear^.Health*(TeamHealthBarWidth/TeamHealth)));
-                    if h < TeamHealthBarWidth-1 then DrawTexture(14 + h, cScreenHeight + DrawHealthY + smallScreenOffset + 1, SpritesData[sprSlider].Texture);
+                    inc(h,Hedgehogs[i].Gear^.Health);
+                    if h < TeamHealth then DrawTexture(14 + round(h*TeamHealthBarWidth/TeamHealth), cScreenHeight + DrawHealthY + smallScreenOffset + 1, SpritesData[sprSlider].Texture);
                     end;
 
         // draw ai kill counter for gfAISurvival