Fixed comparing int32_t with uint32_t.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
c8314d6018
commit
3358bf7378
|
@ -48,7 +48,7 @@ void Battling::Creature::ChangeVariant(ArbUt::BorrowedPtr<const Library::Species
|
|||
auto prevHealth = GetBoostedStat(CreatureLib::Library::Statistic::Health);
|
||||
RecalculateFlatStats();
|
||||
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;
|
||||
} else {
|
||||
_currentHealth += diffHealth;
|
||||
|
|
Loading…
Reference in New Issue