diff --git a/src/spawn.cpp b/src/spawn.cpp index 3c153b38..6b8eb699 100644 --- a/src/spawn.cpp +++ b/src/spawn.cpp @@ -267,11 +267,6 @@ bool Spawn::findPlayer(const Position& pos) return false; } -bool Spawn::isInSpawnZone(const Position& pos) -{ - return Spawns::isInZone(centerPos, radius, pos); -} - bool Spawn::spawnMonster(uint32_t spawnId, spawnBlock_t sb, bool startup/* = false*/) { bool isBlocked = !startup && findPlayer(sb.pos); @@ -388,14 +383,10 @@ void Spawn::cleanup() { auto it = spawnedMap.begin(); while (it != spawnedMap.end()) { - uint32_t spawnId = it->first; Monster* monster = it->second; if (monster->isRemoved()) { monster->decrementReferenceCounter(); it = spawnedMap.erase(it); - } else if (!isInSpawnZone(monster->getPosition()) && spawnId != 0) { - spawnedMap.insert({0, monster}); - it = spawnedMap.erase(it); } else { ++it; } diff --git a/src/spawn.h b/src/spawn.h index ee7c2e26..d3eab8b9 100644 --- a/src/spawn.h +++ b/src/spawn.h @@ -39,12 +39,10 @@ class Spawn uint32_t getInterval() const { return interval; } + void startup(); - void startSpawnCheck(); void stopEvent(); - - bool isInSpawnZone(const Position& pos); void cleanup(); private: