Possible fix for chunking desyncs + CHUNKPOS macro

This commit is contained in:
Gent S
2020-11-14 18:36:04 -05:00
parent cc74b01f72
commit b22ba781c8
7 changed files with 42 additions and 35 deletions

View File

@@ -185,7 +185,7 @@ void NPCManager::updateNPCPosition(int32_t id, int X, int Y, int Z) {
npc->appearanceData.iY = Y;
npc->appearanceData.iZ = Z;
std::tuple<int, int, uint64_t> newPos = ChunkManager::grabChunk(X, Y, npc->instanceID);
CHUNKPOS newPos = ChunkManager::grabChunk(X, Y, npc->instanceID);
// nothing to be done (but we should also update currentChunks to add/remove stale chunks)
if (newPos == npc->chunkPos) {