1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 18:59:57 +00:00
Commit graph

19 commits

Author SHA1 Message Date
elsid
a1438f65fe
Set proper max tiles on initializing navmesh settings 2024-04-13 19:48:58 +02:00
elsid
3e99deb0e8
Use typed settings storage for detournavigator 2023-03-28 20:47:34 +02:00
elsid
624d8bc931
Support unsigned settings values 2022-10-04 01:34:53 +02:00
clang-format-bot
ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03: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
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
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
Andrei Kortunov
3032b177a1 Remove redundant includes 2019-02-23 08:02:12 +04:00
elsid
9626b6ec42
Add option to disable DetourNavigator component to find paths 2019-02-16 15:50:58 +03:00
elsid
c68e64a2a7
Make navigator from settings manager setting in separate function 2019-02-16 14:41:11 +03:00