Fix tunnel camera, dismount buff clear, and ground sampling

Use WMO-aware floor detection for camera clearance so tunnels don't
push the camera up to terrain. Clear permanent auras on dismount via
mount display field. Use center-only sampling for terrain/WMO floors
to prevent offset probes from snapping to terrain above tunnels.
This commit is contained in:
Kelsi 2026-02-08 00:18:47 -08:00
parent 2b771ec92e
commit ed2a8a4e0a
2 changed files with 47 additions and 33 deletions

View file

@ -1456,6 +1456,10 @@ void GameHandler::handleUpdateObject(network::Packet& packet) {
uint32_t old = currentMountDisplayId_;
currentMountDisplayId_ = val;
if (val != old && mountCallback_) mountCallback_(val);
if (old != 0 && val == 0) {
for (auto& a : playerAuras)
if (!a.isEmpty() && a.maxDurationMs < 0) a = AuraSlot{};
}
}
unit->setMountDisplayId(val);
break;
@ -1628,6 +1632,10 @@ void GameHandler::handleUpdateObject(network::Packet& packet) {
uint32_t old = currentMountDisplayId_;
currentMountDisplayId_ = val;
if (val != old && mountCallback_) mountCallback_(val);
if (old != 0 && val == 0) {
for (auto& a : playerAuras)
if (!a.isEmpty() && a.maxDurationMs < 0) a = AuraSlot{};
}
}
unit->setMountDisplayId(val);
break;