mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 00:00:13 +00:00
Add bindpoint support and WMO snap fix
This commit is contained in:
parent
132a6ea3c9
commit
189f4a0a58
7 changed files with 94 additions and 0 deletions
|
|
@ -26,6 +26,11 @@ std::optional<float> selectReachableFloor(const std::optional<float>& terrainH,
|
|||
if (terrainH && *terrainH <= refZ + maxStepUp) reachTerrain = terrainH;
|
||||
if (wmoH && *wmoH <= refZ + maxStepUp) reachWmo = wmoH;
|
||||
|
||||
// Avoid snapping up to higher WMO floors when entering buildings.
|
||||
if (reachTerrain && reachWmo && *reachWmo > refZ + 2.0f) {
|
||||
return reachTerrain;
|
||||
}
|
||||
|
||||
if (reachTerrain && reachWmo) {
|
||||
// Both available: prefer the one closest to the player's feet.
|
||||
// This prevents tunnels/caves from snapping the player up to the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue