Fix chunk desync on NPC warp

This commit is contained in:
Gent S 2020-11-25 17:42:46 -05:00
parent 717e5eb78f
commit 71d9cab72e

View File

@ -543,6 +543,7 @@ void NPCManager::handleWarp(CNSocket* sock, int32_t warpId) {
resp.eIL = 4; // do not take away any items resp.eIL = 4; // do not take away any items
plr->instanceID = INSTANCE_OVERWORLD; plr->instanceID = INSTANCE_OVERWORLD;
sock->sendPacket((void*)&resp, P_FE2CL_REP_PC_WARP_USE_NPC_SUCC, sizeof(sP_FE2CL_REP_PC_WARP_USE_NPC_SUCC)); sock->sendPacket((void*)&resp, P_FE2CL_REP_PC_WARP_USE_NPC_SUCC, sizeof(sP_FE2CL_REP_PC_WARP_USE_NPC_SUCC));
ChunkManager::updatePlayerChunk(sock, plr->chunkPos, std::make_tuple(0, 0, 0)); // force player to reload chunks
PlayerManager::updatePlayerPosition(sock, resp.iX, resp.iY, resp.iZ, INSTANCE_OVERWORLD, plr->angle); PlayerManager::updatePlayerPosition(sock, resp.iX, resp.iY, resp.iZ, INSTANCE_OVERWORLD, plr->angle);
} }
} }