Commit Graph

404 Commits (d39552962f36473cbaf031a563b45d9835336024)

Author SHA1 Message Date
elsid 5abbc56bf2
Use proper cell size for ESM4 cells in CoordinateConverter 1 year ago
psi29a 4aaffa72e5 Merge branch 'more_coverity_fixes' into 'master'
More coverity fixes

See merge request OpenMW/openmw!3304
1 year ago
Andrei Kortunov fe10799bfe Add an assert for possible null pointer dereference 1 year ago
Andrei Kortunov 34ba2068b7 Remove dead code 1 year ago
elsid 798f3cc385
Support ESM4 record FullName, CellFlags, X, Y fields by esmtool 1 year ago
elsid e00eb50587
Remove stepping from findSmoothPath
This is not used anyway. There are features like smooth movement which remove
all redundant points.

Use single findStraightPath call instead of multiple.
1 year ago
elsid 767a14587c
Add more debug logging on navmesh generation 1 year ago
elsid 9817f4ca9a
Find closest position on navmesh to start and end before poly path
Start and end might not be located on navmesh and findPath may give wrong
results.
1 year ago
elsid 3dfea1dc1b
Make OutputTransformIterator more generic 1 year ago
elsid de3a6ca6e6
Use std::span for findPath pathBuffer 1 year ago
elsid c334176d73
Use std::span for makeSmoothPath polygonPath 1 year ago
elsid 548c38f54d
Remove unused code 1 year ago
elsid 350027c588
Remove redundant NavMesh argument from findSmoothPath 1 year ago
elsid fcea153947
Transform path coordinates outside findSmoothPath 1 year ago
elsid 9bff292a29
Log path to navmesh.db 1 year ago
elsid 180dd7dc64
Log worldspace in RecastContext 2 years ago
elsid f9e9368fda
Add operator<< for DetourSettings 2 years ago
elsid dd08154b23
Add operator<< for DetourNavigator::AreaCosts 2 years ago
elsid ce5fbd6b68
Write separator between Detour status flags 2 years ago
elsid a90aa7d8b2
Count navmeshdb reads for each reading job 2 years ago
elsid 5ae8b9cae1
Report raw navmesh cache counters 2 years ago
elsid 04d439485b
Log more info about navmesh shapes and jobs 2 years ago
elsid 7a7c20d49e
Define single UpdateGuard type in a separate file 2 years ago
elsid 472a36d92a
Cleanup detournavigator includes 2 years ago
elsid 3e99deb0e8
Use typed settings storage for detournavigator 2 years ago
elsid 28f7a89530
Reuse dtNavMeshQuery
To avoid redundant allocations.
2 years ago
elsid 996153f78d
Convert RefId to class 2 years ago
florent.teppe 63e44eddc9 Navigator doesn't use RefId anymore 2 years ago
florent.teppe 150e2ba885 Revert "Use ESM::RefId for worldspace in detournavigator"
This reverts commit b4ab153418.

# Conflicts:
#	apps/navmeshtool/worldspacedata.cpp
2 years ago
elsid cf1d8544e3
Check agent bounds on adding agent to navigator
Do not add agent bounds which are not supported by recastnavigation with given
settings and log such events.

To avoid reaching navmesh tile generation to find out it can't be generated for
such agent bounds.
2 years ago
elsid 44429f0393
Limit NavMeshManager update range by player tile and max tiles
Object AABB may be much larger than area currently covered by navmesh. In this
case all tiles beyond covered range should be ignored. Attempt to iterate over
them will not result in any new tile updates but can take quite a while. At
maximum this can be pow(INT_MAX - INT_MIN, 2) iterations.

Use arbitrary time limit to check for update call to finish in the test.
2 years ago
Petr Mikheev 8c7d347179 Reorganize l10n files 2 years ago
elsid c71862a8df
Reset rcPolyMeshDetail members after rcFree
To avoid double free causing by later recastnavigation versions.
2 years ago
elsid b4ab153418
Use ESM::RefId for worldspace in detournavigator 2 years ago
florent.teppe 1ef1de974d script blacklist => RefId
Applies changes from review

Fixed clang format

Clang format + review.
2 years ago
florent.teppe 2c30575b3b CellName is now a RefId, makes more sense that way. 2 years ago
psi29a 14afde4689 Merge branch 'recast_context' into 'master'
Check input and report errors via RecastContext (#7093)

Closes #7093

See merge request OpenMW/openmw!2544
2 years ago
elsid 15e8f0b53c
Check input and report errors via RecastContext
Recast functions have preconditions for arguments they don't validate. This may
produce garbage data which may lead to crash. Check arguments and log when they
are invalid.

Do not throw exceptions when these function calls fail, capture Recast reported
errors via RecastContext inherited from rcContext and log them.
2 years ago
Evil Eye d40c09c18c Ignore non-3D agents in the navigator 2 years ago
elsid 843753da14
Remove unused includes 2 years ago
elsid 624d8bc931
Support unsigned settings values 2 years ago
elsid 1b9b61b60b
Format navmesh water vertices and indices 2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
Project579 a13709c510 Replace implicit convertions from std::filesystem::path to std::string with correctly converting functions. 2 years ago
Project579 e5c417c968 Make sure all paths are passed as std::filesystem::path instead of std::string where possible. 2 years ago
elsid 22ee592dd3
Lock TileCachedRecastMeshManager once per changing a cell
To save time on locking mutex and prevent AsyncNavMeshUpdater to use RecastMesh
for a tile in the middle of objects loading.
2 years ago
elsid d15e1dca84
Use R-tree for objects to be used for navmesh generation
Instead of storing a set of objects per tile.
2 years ago
elsid 180d609e0d
Check "wait until min distance to player" only for requiredTilesPresent wait condition
allJobsDone should wait even if "wait until min distance to player" is 0.
2 years ago
elsid 98ddc31902
Fix calculating min distance to nearest absent tile
Tile can be present in either mPushed (waiting in a queue), mProcessingTiles (
being processed or waiting in db queue), mPresentTiles (added to navmesh). It's
not enough to walk over mPushed tiles to find all not present. Need also to
check mProcessingTiles.

Otherwise if all tiles are in mProcessingTiles only
waitUntilJobsDoneForNotPresentTiles may return too early because there are none
in mPushed and therefore none tiles are considered to be absent on navmesh which
is not true.
2 years ago
elsid de80b86cc1
Use proper type to cast enum value 2 years ago