diff options
| author | Rozelette <Rozelette@users.noreply.github.com> | 2025-06-11 16:37:34 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-11 14:37:34 -0700 |
| commit | dbc2ff09b5bfe845055161e28ca6510649aad3ef (patch) | |
| tree | 8dcb63a073dc56aef41fd98a5609faec05edf806 /soh/src/code/z_parameter.c | |
| parent | abb0a93945b1888f3c2d322d5c9890fb6d19d33d (diff) | |
Convert actor health bars to use ObjectExtension (#5565)
Diffstat (limited to 'soh/src/code/z_parameter.c')
| -rw-r--r-- | soh/src/code/z_parameter.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c index cc6245241..0fc923070 100644 --- a/soh/src/code/z_parameter.c +++ b/soh/src/code/z_parameter.c @@ -24,6 +24,7 @@ #include "soh/OTRGlobals.h" #include "soh/ResourceManagerHelpers.h" #include "soh/Enhancements/gameplaystats.h" +#include "soh/ObjectExtension/ActorMaximumHealth.h" #include "message_data_static.h" extern MessageTableEntry* sNesMessageEntryTablePtr; @@ -3643,7 +3644,7 @@ void Interface_DrawEnemyHealthBar(TargetContext* targetCtx, PlayState* play) { f32 scaleY = -0.75f; f32 scaledHeight = -texHeight * scaleY; f32 halfBarWidth = endTexWidth + ((f32)healthbar_fillWidth / 2); - s16 healthBarFill = ((f32)actor->colChkInfo.health / actor->maximumHealth) * healthbar_fillWidth; + s16 healthBarFill = ((f32)actor->colChkInfo.health / GetActorMaximumHealth(actor)) * healthbar_fillWidth; if (anchorType == ENEMYHEALTH_ANCHOR_ACTOR) { // Get actor projected position |
