Skip to content

Commit

Permalink
fix: indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dudantas authored Oct 31, 2024
1 parent cbb89ef commit 3116684
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/creatures/monsters/spawns/spawn_monster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,18 +327,18 @@ void SpawnMonster::scheduleSpawn(uint32_t spawnMonsterId, spawnBlock_t &sb, cons
}

void SpawnMonster::cleanup() {
for (auto it = spawnedMonsterMap.begin(); it != spawnedMonsterMap.end(); ) {
const auto& monster = it->second;
if (!monster || monster->isRemoved()) {
auto spawnIt = spawnMonsterMap.find(it->first);
if (spawnIt != spawnMonsterMap.end()) {
spawnIt->second.lastSpawn = OTSYS_TIME();
}
it = spawnedMonsterMap.erase(it);
} else {
++it;
}
}
for (auto it = spawnedMonsterMap.begin(); it != spawnedMonsterMap.end(); ) {
const auto& monster = it->second;
if (!monster || monster->isRemoved()) {
auto spawnIt = spawnMonsterMap.find(it->first);
if (spawnIt != spawnMonsterMap.end()) {
spawnIt->second.lastSpawn = OTSYS_TIME();
}
it = spawnedMonsterMap.erase(it);
} else {
++it;
}
}
}

const Position &SpawnMonster::getCenterPos() const {
Expand Down

0 comments on commit 3116684

Please sign in to comment.