Bugfix Larger Health Values Break Health UI
This commit is contained in:
parent
38ffd4f339
commit
cf433291a9
BIN
Content/BlueprintAI/AI/AIBruh.uasset
(Stored with Git LFS)
BIN
Content/BlueprintAI/AI/AIBruh.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/BlueprintAI/AI/AIBruh_Boss.uasset
(Stored with Git LFS)
Normal file
BIN
Content/BlueprintAI/AI/AIBruh_Boss.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Blueprints/Combat_UI/CombatCharacter.uasset
(Stored with Git LFS)
BIN
Content/Blueprints/Combat_UI/CombatCharacter.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Levels/Build.umap
(Stored with Git LFS)
BIN
Content/Levels/Build.umap
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Levels/Enemy_Test.umap
(Stored with Git LFS)
BIN
Content/Levels/Enemy_Test.umap
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Levels/Top_layer_level.umap
(Stored with Git LFS)
BIN
Content/Levels/Top_layer_level.umap
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Levels/Tutorial.umap
(Stored with Git LFS)
BIN
Content/Levels/Tutorial.umap
(Stored with Git LFS)
Binary file not shown.
@ -388,7 +388,9 @@ void ATurnBaseCombatV2::DamageEnemy(int Damage, FString DamageType)
|
|||||||
|
|
||||||
void ATurnBaseCombatV2::UpdateProgressBars() const
|
void ATurnBaseCombatV2::UpdateProgressBars() const
|
||||||
{
|
{
|
||||||
EnemyHealthBar->SetPercent(*EnemyHealth / 100.0f);
|
FProperty* MaxHealthProperty = EnemyActor->GetClass()->FindPropertyByName(FName("MaxHealth"));
|
||||||
|
int32* EnemyMaxHealthPtr = MaxHealthProperty->ContainerPtrToValuePtr<int32>(EnemyActor);
|
||||||
|
EnemyHealthBar->SetPercent(static_cast<float>(*EnemyHealth) / static_cast<float>(*EnemyMaxHealthPtr));
|
||||||
}
|
}
|
||||||
|
|
||||||
float ATurnBaseCombatV2::CalculateEscapePercentage() const
|
float ATurnBaseCombatV2::CalculateEscapePercentage() const
|
||||||
|
Loading…
Reference in New Issue
Block a user