This commit is contained in:
1 file changed
+1
-1
@@ -48,7 +48,7 @@ void Battling::Creature::ChangeVariant(ArbUt::BorrowedPtr<const Library::Species
|
|||||||
auto prevHealth = GetBoostedStat(CreatureLib::Library::Statistic::Health);
|
auto prevHealth = GetBoostedStat(CreatureLib::Library::Statistic::Health);
|
||||||
RecalculateFlatStats();
|
RecalculateFlatStats();
|
||||||
int32_t diffHealth = GetBoostedStat(CreatureLib::Library::Statistic::Health) - prevHealth;
|
int32_t diffHealth = GetBoostedStat(CreatureLib::Library::Statistic::Health) - prevHealth;
|
||||||
if (_currentHealth < -diffHealth) {
|
if (_currentHealth < static_cast<uint32_t>(INT32_MAX) && static_cast<int32_t>(_currentHealth) < -diffHealth) {
|
||||||
_currentHealth = 0;
|
_currentHealth = 0;
|
||||||
} else {
|
} else {
|
||||||
_currentHealth += diffHealth;
|
_currentHealth += diffHealth;
|
||||||
|
|||||||
Reference in new issue
Block a user