mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-04 22:40:05 +00:00
Clean up redundant forced chunk updates for NPCs
This commit is contained in:
parent
c5fa397724
commit
665f28313a
@ -459,8 +459,6 @@ void ChunkManager::createInstance(uint64_t instanceID) {
|
||||
}
|
||||
NPCManager::updateNPCPosition(newID, baseNPC->appearanceData.iX, baseNPC->appearanceData.iY, baseNPC->appearanceData.iZ,
|
||||
instanceID, baseNPC->appearanceData.iAngle);
|
||||
// force chunk update
|
||||
updateNPCChunk(newID, std::make_tuple(0, 0, 0), chunkPosAt(baseNPC->appearanceData.iX, baseNPC->appearanceData.iY, instanceID));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -483,8 +483,6 @@ void NPCManager::npcSummonHandler(CNSocket* sock, CNPacketData* data) {
|
||||
NPCs[id] = new BaseNPC(plr->x, plr->y, plr->z, 0, plr->instanceID, req->iNPCType, id);
|
||||
|
||||
updateNPCPosition(id, plr->x, plr->y, plr->z, plr->instanceID, 0);
|
||||
// force chunk update
|
||||
ChunkManager::updateNPCChunk(id, std::make_tuple(0, 0, 0), ChunkManager::chunkPosAt(plr->x, plr->y, plr->instanceID));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -44,7 +44,6 @@ void TableData::init() {
|
||||
|
||||
NPCManager::NPCs[nextId] = tmp;
|
||||
NPCManager::updateNPCPosition(nextId, npc["x"], npc["y"], npc["z"], instanceID, npc["angle"]);
|
||||
ChunkManager::updateNPCChunk(nextId, std::make_tuple(0, 0, 0), ChunkManager::chunkPosAt(npc["x"], npc["y"], instanceID));
|
||||
nextId++;
|
||||
|
||||
if (npc["id"] == 641 || npc["id"] == 642)
|
||||
@ -212,7 +211,6 @@ void TableData::init() {
|
||||
NPCManager::NPCs[nextId] = tmp;
|
||||
MobManager::Mobs[nextId] = (Mob*)NPCManager::NPCs[nextId];
|
||||
NPCManager::updateNPCPosition(nextId, npc["iX"], npc["iY"], npc["iZ"], instanceID, npc["iAngle"]);
|
||||
ChunkManager::updateNPCChunk(nextId, std::make_tuple(0, 0, 0), ChunkManager::chunkPosAt(npc["iX"], npc["iY"], instanceID));
|
||||
|
||||
nextId++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user