mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-22 21:40:05 +00:00
fixed NPC spawning bug
This commit is contained in:
parent
8f84c4c2f8
commit
874479d1cf
@ -22,8 +22,7 @@ public:
|
|||||||
appearanceData.iBarkerType = 0;
|
appearanceData.iBarkerType = 0;
|
||||||
appearanceData.iNPC_ID = id;
|
appearanceData.iNPC_ID = id;
|
||||||
|
|
||||||
chunkPos = ChunkManager::grabChunk(x, y);
|
chunkPos = std::pair<int, int>(0, 0);
|
||||||
currentChunks = ChunkManager::grabChunks(chunkPos);
|
|
||||||
};
|
};
|
||||||
BaseNPC(int x, int y, int z, int type, int id, NPCClass classType) : BaseNPC(x, y, z, type, id) {
|
BaseNPC(int x, int y, int z, int type, int id, NPCClass classType) : BaseNPC(x, y, z, type, id) {
|
||||||
npcClass = classType;
|
npcClass = classType;
|
||||||
|
@ -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);
|
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);
|
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) {
|
void NPCManager::npcWarpHandler(CNSocket* sock, CNPacketData* data) {
|
||||||
|
Loading…
Reference in New Issue
Block a user