Skip to content

Commit

Permalink
Fix refill energy/health not giving full resources right after increa…
Browse files Browse the repository at this point in the history
…sing maximum.
  • Loading branch information
MunWolf committed Nov 22, 2023
1 parent 766aba0 commit 2d28fe6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions projects/Core/api/game/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ namespace core::api::game::player {
if (sein && stats) {
stats->fields.m_maxHealth = value;
Moon::uberSerializationWisp::PlayerUberStateStats::RunSetDirtyCallback(stats);
sein->fields.Mortality->fields.Health->fields.m_baseMaxHealthDirty = true;
sein->fields.Mortality->fields.Health->fields.m_maxHealthDirty = true;
sein->fields.Mortality->fields.Health->fields.m_actualMaxHealthDirty = true;
}
}
Expand All @@ -146,6 +148,8 @@ namespace core::api::game::player {
if (sein && stats) {
stats->fields.m_maxEnergy = value;
Moon::uberSerializationWisp::PlayerUberStateStats::RunSetDirtyCallback(stats);
sein->fields.Energy->fields.m_baseMaxEnergyDirty = true;
sein->fields.Energy->fields.m_maxEnergyDirty = true;
sein->fields.Energy->fields.m_actualMaxEnergyDirty = true;
}
}
Expand Down

0 comments on commit 2d28fe6

Please sign in to comment.