refatcor: changed check isAlive to isDead

This commit is contained in:
2021-11-09 19:35:57 +01:00
parent 692d68c7fd
commit 2cf878d6ad

View File

@@ -244,7 +244,7 @@ bool World::CanPlaceBigTower(const glm::vec2& worldPos, PlayerID playerID) const
void World::cleanDeadMobs() { void World::cleanDeadMobs() {
for (std::size_t i = 0; i < m_Mobs.size(); i++) { for (std::size_t i = 0; i < m_Mobs.size(); i++) {
MobPtr mob = m_Mobs[i]; MobPtr mob = m_Mobs[i];
if (!mob->isAlive()) { if (mob->isDead()) {
mob->OnDeath(this); mob->OnDeath(this);
//reward players //reward players