1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-15 22:49:48 +00:00
Commit Graph

26 Commits

Author SHA1 Message Date
elsid
8544aa481c
Fix C4459 msvc warning
declaration of 'navMeshVersion' hides global declaration
2022-07-01 18:47:40 +02:00
elsid
1a12c453d6
Support different agent collision shape type for pathfinding
Actors may have different collision shapes. Currently there are axis-aligned
bounding boxes and rotating bounding boxes. With AABB it's required to use
bounding cylinder for navmesh agent to avoid providing paths where actor can't
pass. But for rotating bounding boxes cylinder with diameter equal to the front
face width should be used to not reduce of available paths. For example rats
have rotating bounding box as collision shape because of the difference between
front and side faces width.

* Add agent bounds to navmesh tile db cache key. This is required to distinguish
  tiles for agents with different bounds.
* Increase navmesh version because navmesh tile db cache key and data has changed.
* Move navmesh version to the code to avoid misconfiguration by users.
* Fix all places where wrong half extents were used for pathfinding.
2022-06-21 12:57:32 +02:00
elsid
5b9dd10cbe
Limit max navmeshdb file size
Use "pragma max_page_count" to define max allowed file size in combination with
"pragma page_size" based on a new setting "max navmeshdb file size".

* Stop navmeshtool on the first db error.
* Disable writes to db in the engine on first "database or disk is full"
  SQLite3 error. There is no special error code for this error.
* Change default "write to navmeshdb" to true.
* Use time intervals for transaction duration instead of number of changes.
2022-03-18 19:08:46 +01:00
elsid
96eb8d7be9
Write generated navmesh to navmeshdb
Perform all request to db in a single thread to avoid blocking navmesh
generator threads due to slow write operations.

Write to db navmesh for all changes except update as it done for memory cache.

Batch multiple db operations into a single transaction to speed up writing by
not executing fsync after each insert/update query. All reads are performed in
the same transaction so they see uncommited data.
2021-12-11 00:22:04 +01:00
elsid
c9b8ba7b46
Read navmesh tile data from database
When tile is not found in memory cache try to find it in the database.
2021-12-11 00:22:04 +01:00
elsid
953a4c5550
Add a binary to generate navmesh from content files
Load content files based on the engine config files. Generate navmesh per cell
for all cells and store into SQLite database.
2021-12-11 00:21:56 +01:00
elsid
01c712d5f1
Split navigator settings into subtypes
Mostly to distinguish settings that affect properties of the generated navmesh.
2021-12-10 23:55:03 +01:00
elsid
9f808fbe3a
Move findPath-like navigator functions into a separate header 2021-11-06 00:34:06 +01:00
elsid
6986feb81b
Initialize navigator max climb and max slope settings in makeSettingsFromSettingsManager
To avoid having multiple places to initialize them when they will be required
by multiple binaries.
2021-10-11 18:50:26 +02:00
elsid
7a51d0db18
Wait until navmesh is generated within given distance around player
Add a setting to change this distance.

To prevent situations when there is not enough navmesh generated and actors
can't find path correctly.
2021-05-05 19:44:16 +02:00
elsid
ec87b3f8f7
Remove redundant ChunkyTriMesh
This AABB tree required when need to filter out input mesh that has not
influence navmesh tile output. This filtering is already done before. Each
recast mesh corresponds to a single navmesh tile and has appropriate bounds.
2021-05-04 13:00:06 +02:00
Bret Curtis
f6bead88a9 purge boost/optional.hpp headers 2020-10-25 00:58:44 +02:00
Bret Curtis
62b0781f7d use std::optional instead of boost::optional 2020-10-25 00:33:41 +02:00
elsid
b150d681a9
Update same navmesh tile with limited frequency 2020-05-01 18:05:58 +02:00
elsid
f2e47d640d
Add option to limit max number of navmesh tiles 2019-03-08 17:39:04 +03:00
elsid
9626b6ec42
Add option to disable DetourNavigator component to find paths 2019-02-16 15:50:58 +03:00
elsid
34c594f01e
Add default initializators for settings fields 2019-02-16 15:39:06 +03:00
elsid
c68e64a2a7
Make navigator from settings manager setting in separate function 2019-02-16 14:41:11 +03:00
elsid
abc51a8a17 Add settings option to set max number of polygons per navmesh tile 2018-10-28 15:36:47 +03:00
elsid
ed73d130f9
Cache navmesh tiles
Use LRU modification to hold currently used items. Use RecastMesh binary
data for item key.

Store original pointer of btCollisionShape in user pointer to make available
it as an identifier within all duplicates. Use pointer to heights data array
for btHeightfieldTerrainShape.
2018-10-13 22:22:12 +03:00
elsid
7c80bb9411
Support multiple threads for async nav mesh updater 2018-10-13 22:16:34 +03:00
elsid
c95cea414c
Support water for NavMesh 2018-10-13 22:16:32 +03:00
elsid
ed3a255f65
Do not use NavMesh to find changed tiles 2018-10-13 22:16:28 +03:00
elsid
373adc6ec4
Option to enable/disable file names revisions 2018-10-13 22:16:27 +03:00
elsid
41caca24ee
Options to enable/disable write recast mesh and nav mesh into file 2018-10-13 22:16:26 +03:00
elsid
fafba8ea0c
Use recastnavigation to find path 2018-10-13 22:16:25 +03:00