diff --git a/include/pipeline/adt_loader.hpp b/include/pipeline/adt_loader.hpp index cca28de1..75ca5f53 100644 --- a/include/pipeline/adt_loader.hpp +++ b/include/pipeline/adt_loader.hpp @@ -21,9 +21,10 @@ struct ADTCoord { */ struct HeightMap { std::array heights; // 9x9 outer + 8x8 inner vertices + bool loaded = false; float getHeight(int x, int y) const; - bool isLoaded() const { return heights[0] != 0.0f || heights[1] != 0.0f; } + bool isLoaded() const { return loaded; } }; /** diff --git a/src/pipeline/adt_loader.cpp b/src/pipeline/adt_loader.cpp index 662655e6..292c4031 100644 --- a/src/pipeline/adt_loader.cpp +++ b/src/pipeline/adt_loader.cpp @@ -377,6 +377,7 @@ void ADTLoader::parseMCVT(const uint8_t* data, size_t size, MapChunk& chunk) { if (height < minHeight) minHeight = height; if (height > maxHeight) maxHeight = height; } + chunk.heightMap.loaded = true; // Log height range for first chunk only static bool logged = false; diff --git a/src/rendering/wmo_renderer.cpp b/src/rendering/wmo_renderer.cpp index 4087e0bb..2d3b44a1 100644 --- a/src/rendering/wmo_renderer.cpp +++ b/src/rendering/wmo_renderer.cpp @@ -1515,7 +1515,7 @@ bool WMORenderer::checkWallCollision(const glm::vec3& from, const glm::vec3& to, if (moveDistXY < 0.001f) return false; // Player collision parameters - const float PLAYER_RADIUS = 0.50f; // Slightly narrower to pass tight doorways/interiors + const float PLAYER_RADIUS = 0.55f; // Slightly wider for better wall collision const float PLAYER_HEIGHT = 2.0f; // Player height for wall checks const float MAX_STEP_HEIGHT = 0.85f; // Balanced step-up without wall pass-through