Add bindpoint support and WMO snap fix

This commit is contained in:
Kelsi 2026-02-08 03:32:00 -08:00
parent 132a6ea3c9
commit 189f4a0a58
7 changed files with 94 additions and 0 deletions

View file

@ -645,6 +645,15 @@ void Application::setupUICallbacks() {
cc->reset();
});
// Bind point update (innkeeper)
gameHandler->setBindPointCallback([this](uint32_t mapId, float x, float y, float z) {
if (!renderer || !renderer->getCameraController()) return;
glm::vec3 canonical(x, y, z);
glm::vec3 renderPos = core::coords::canonicalToRender(canonical);
renderer->getCameraController()->setDefaultSpawn(renderPos, 0.0f, 15.0f);
LOG_INFO("Bindpoint set: mapId=", mapId, " pos=(", x, ", ", y, ", ", z, ")");
});
// Faction hostility map is built in buildFactionHostilityMap() when character enters world
// Creature spawn callback (online mode) - spawn creature models