fixed NPC spawning bug

This commit is contained in:
CPunch 2020-09-24 21:32:14 -05:00
parent 8f84c4c2f8
commit 874479d1cf
2 changed files with 1 additions and 3 deletions

View File

@ -22,8 +22,7 @@ public:
appearanceData.iBarkerType = 0;
appearanceData.iNPC_ID = id;
chunkPos = ChunkManager::grabChunk(x, y);
currentChunks = ChunkManager::grabChunks(chunkPos);
chunkPos = std::pair<int, int>(0, 0);
};
BaseNPC(int x, int y, int z, int type, int id, NPCClass classType) : BaseNPC(x, y, z, type, id) {
npcClass = classType;

View File

@ -530,7 +530,6 @@ void NPCManager::npcSummonHandler(CNSocket* sock, CNPacketData* data) {
NPCs[resp.NPCAppearanceData.iNPC_ID] = new BaseNPC(plr->x, plr->y, plr->z, req->iNPCType, resp.NPCAppearanceData.iNPC_ID);
updateNPCPosition(resp.NPCAppearanceData.iNPC_ID, plr->x, plr->y, plr->z);
ChunkManager::addNPC(plr->x, plr->y, resp.NPCAppearanceData.iNPC_ID);
}
void NPCManager::npcWarpHandler(CNSocket* sock, CNPacketData* data) {