mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-07-31 18:00:46 -04:00
The third merge-blocking issue Kelsidavis flagged in review of PR #96: unconditionally preferring any WMO/M2 floor over terrain fixed underground landings (terrain has no notion of being underground - a WMO tunnel beneath a mountain, like Ironforge's flight point, reports the outdoor mountain surface far above the correct tunnel floor), but could just as easily snap an outdoor landing down onto an unrelated structure sitting underneath it. Now captures the character's render-position Z the moment the landing clamp arms (WorldEntryCallbackHandler::taxiLandingReferenceZ_) - wherever the taxi flight simulation itself left the player, before terrain/WMO streaming has a chance to move things around - and picks whichever candidate (terrain/WMO/M2) is numerically closest to that reference, rather than preferring non-terrain sources outright. Still correctly picks the WMO tunnel floor for Ironforge (the flight lands right at it, ~0 distance, vs. ~267 units to the terrain surface above) while no longer able to prefer a distant WMO/M2 floor under an outdoor landing over the much-closer terrain surface.