diff --git a/CMakeLists.txt b/CMakeLists.txt index 8f8981ee..8f6d240a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -148,17 +148,20 @@ foreach (resource_file ${RESOURCE_FILES}) endforeach() message(STATUS "Resource file integrity check complete") -# Copy navmesh data on first build and extract it -if (NOT EXISTS ${PROJECT_BINARY_DIR}/navmeshes/) - configure_file( - ${CMAKE_SOURCE_DIR}/resources/navmeshes.zip ${PROJECT_BINARY_DIR}/navmeshes.zip - COPYONLY - ) - - file(ARCHIVE_EXTRACT INPUT ${PROJECT_BINARY_DIR}/navmeshes.zip) - file(REMOVE ${PROJECT_BINARY_DIR}/navmeshes.zip) +# if navmeshes directory does not exist, create it +if (NOT EXISTS ${PROJECT_BINARY_DIR}/navmeshes) + file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/navmeshes) endif() +# Copy navmesh data on first build and extract it +configure_file( + ${CMAKE_SOURCE_DIR}/resources/navmeshes.zip ${PROJECT_BINARY_DIR}/navmeshes.zip + COPYONLY +) + +file(ARCHIVE_EXTRACT INPUT ${PROJECT_BINARY_DIR}/navmeshes.zip DESTINATION ${PROJECT_BINARY_DIR}/navmeshes) +file(REMOVE ${PROJECT_BINARY_DIR}/navmeshes.zip) + # Copy vanity files on first build set(VANITY_FILES "CREDITS.md" "INFO.md" "TESTAMENT.md" "NPC.xml") foreach(file ${VANITY_FILES}) diff --git a/dNavigation/dNavMesh.cpp b/dNavigation/dNavMesh.cpp index aa43689b..c1d752bd 100644 --- a/dNavigation/dNavMesh.cpp +++ b/dNavigation/dNavMesh.cpp @@ -131,7 +131,7 @@ float dNavMesh::GetHeightAtPoint(const NiPoint3& location, const float halfExten pos[2] = location.z; dtPolyRef nearestRef = 0; - float polyPickExt[3] = { 0.0f, halfExtentsHeight, 0.0f }; + float polyPickExt[3] = { 32.0f, halfExtentsHeight, 32.0f }; float nearestPoint[3] = { 0.0f, 0.0f, 0.0f }; dtQueryFilter filter{}; diff --git a/resources/navmeshes.zip b/resources/navmeshes.zip index e0156bb1..9cd3e03a 100644 Binary files a/resources/navmeshes.zip and b/resources/navmeshes.zip differ