Fixed unit stats bars not being interpolated

This commit is contained in:
Anuken
2018-06-22 15:48:38 -04:00
parent fc058476ed
commit 57d5628750
5 changed files with 17 additions and 12 deletions
@@ -156,16 +156,11 @@ public class OverlayRenderer {
}
if((!debug || showUI) && Settings.getBool("healthbars")){
for(TeamData ally : (debug ? state.teams.getTeams() : state.teams.getTeams(true))){
for(Unit e : unitGroups[ally.team.ordinal()].all()){
drawStats(e);
}
renderer.drawAndInterpolate(unitGroups[ally.team.ordinal()], u -> !u.isDead(), this::drawStats);
}
for(Unit e : playerGroup.all()){
drawStats(e);
}
renderer.drawAndInterpolate(playerGroup, u -> !u.isDead(), this::drawStats);
}
}
@@ -182,7 +177,7 @@ public class OverlayRenderer {
drawEncloser(x, y - 8f, 2f);
drawBar(Palette.healthstats, x, y - 8f, unit.healthf());
drawBar(Palette.ammo, x, y - 9f, unit.inventory.totalAmmo() / (float) unit.inventory.ammoCapacity());
drawBar(Palette.ammo, x, y - 9f, unit.getAmmoFraction());
}
void drawBar(Color color, float x, float y, float finion){