mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-11-30 12:30:06 +00:00
Delete instances with no players
This commit is contained in:
@@ -85,7 +85,8 @@ void ChunkManager::destroyChunk(std::tuple<int, int, uint64_t> chunkPos) {
|
||||
Chunk* chunk = chunks[chunkPos];
|
||||
|
||||
// unspawn all of the mobs/npcs
|
||||
for (uint32_t id : chunk->NPCs) {
|
||||
std::set npcIDs(chunk->NPCs);
|
||||
for (uint32_t id : npcIDs) {
|
||||
NPCManager::destroyNPC(id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user