[refactor] BaseNPC now uses Entity XYZ fields for handling positions

- fixed many references to Entity.appearanceData.i[XYZ] to use the base Entity XYZ values
- BaseNPC::enterIntoViewOf grabs the position from the base Entity XYZ values
- NPCManager::updateNPCPosition updates the base Entity XYZ values
- MobAI.c/deadStep() also sends it's packet based on the Entity XYZ values
This commit is contained in:
2021-04-13 19:57:24 -05:00
parent 48fb510b53
commit 9b84d9dc4d
11 changed files with 80 additions and 74 deletions

View File

@@ -333,9 +333,9 @@ static void nanoRecallRegisterHandler(CNSocket* sock, CNPacketData* data) {
INITSTRUCT(sP_FE2CL_REP_REGIST_RXCOM, response);
response.iMapNum = plr->recallInstance = (int32_t)npc->instanceID; // Never going to recall into a Fusion Lair
response.iX = plr->recallX = npc->appearanceData.iX;
response.iY = plr->recallY = npc->appearanceData.iY;
response.iZ = plr->recallZ = npc->appearanceData.iZ;
response.iX = plr->recallX = npc->x;
response.iY = plr->recallY = npc->y;
response.iZ = plr->recallZ = npc->z;
sock->sendPacket(response, P_FE2CL_REP_REGIST_RXCOM);
}