Skip to content

Commit

Permalink
KOTORBASE: Add hostile hud health bar coloring
Browse files Browse the repository at this point in the history
  • Loading branch information
Nostritius authored and DrMcCoy committed May 26, 2019
1 parent 13c3538 commit 0bcca67
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/engines/kotorbase/gui/hud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,10 @@ void HUD::updateTargetInformation(KotORBase::Object *object, float x, float y) {
_targetHealthBackground->setPosition(x - 100, elementY, -FLT_MAX);

if (_targetHealth) {
if (object->isEnemy())
_targetHealth->setProgressFill("redfill");
else
_targetHealth->setProgressFill("bluefill");
_targetHealth->setPosition(x - 100, elementY, -FLT_MAX);

_targetHealth->setMaxValue(object->getMaxHitPoints());
Expand Down

0 comments on commit 0bcca67

Please sign in to comment.