diff --git a/include/game/Mobs.h b/include/game/Mobs.h index c09a4cc..9b01a75 100644 --- a/include/game/Mobs.h +++ b/include/game/Mobs.h @@ -114,7 +114,7 @@ public: const Tower* getLastDamageTower() { return m_LastDamage; } void damage(float dmg, const Tower* damager) { m_Health = std::max(0.0f, m_Health - dmg); m_LastDamage = damager; } - void heal(float heal) { m_Health = std::min((float)getStats()->getMaxLife(), m_Health + heal); } + void heal(float heal) { m_Health = std::min(static_cast(getStats()->getMaxLife()), m_Health + heal); } float getX() const { return m_X; } void setX(float x) { m_X = x; } @@ -132,7 +132,7 @@ public: Direction getDirection() const { return m_Direction; } void setDirection(Direction dir) { m_Direction = dir; } protected: - void initHealth() { m_Health = (float)getStats()->getMaxLife(); } + void initHealth() { m_Health = static_cast(getStats()->getMaxLife()); } private: void updateEffects(std::uint64_t delta); EffectDuration& getEffect(EffectType type);