[-] Fixed life bar drawing bug for extremly low values

This commit is contained in:
cybermind 2013-05-05 11:45:42 +06:00
parent 2901ead35c
commit f7a5a173f7

View file

@ -153,7 +153,7 @@ static void UiDrawLifeBar(const CUnit &unit, int x, int y)
}
f = (f * (unit.Type->Icon.Icon->G->Width)) / 100;
Video.FillRectangleClip(color, x + 1, y + 1, f - 2, 5);
Video.FillRectangleClip(color, x + 1, y + 1, f > 1 ? f - 2 : 0, 5);
}
}