Update opcode data and movement integration docs/code

This commit is contained in:
Kelsi 2026-02-18 03:15:25 -08:00
parent 86127f0ddf
commit bd0ce17794
11 changed files with 41 additions and 15 deletions

View file

@ -3419,6 +3419,20 @@ void Application::spawnOnlineCreature(uint64_t guid, uint32_t displayId, float x
}
}
// Use the entity's latest server-authoritative position rather than the stale spawn
// position. Movement packets (SMSG_MONSTER_MOVE) can arrive while a creature is still
// queued in pendingCreatureSpawns_ and get silently dropped. getLatestX/Y/Z returns
// the movement destination if the entity is mid-move, which is always up-to-date
// regardless of distance culling (unlike getX/Y/Z which requires updateMovement).
if (gameHandler) {
if (auto entity = gameHandler->getEntityManager().getEntity(guid)) {
x = entity->getLatestX();
y = entity->getLatestY();
z = entity->getLatestZ();
orientation = entity->getOrientation();
}
}
// Convert canonical → render coordinates
glm::vec3 renderPos = core::coords::canonicalToRender(glm::vec3(x, y, z));