1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 22:49:55 +00:00
Commit graph

39 commits

Author SHA1 Message Date
elsid
08b026e907
Store copies of ref_ptr for btCollisionShape wrappers in Navigator
To keep btCollisionShape lifetime.
2021-08-04 13:16:31 +02:00
psi29a
0394f848cd Merge branch 'fix_malexa_escape' into 'master'
Inscribe physical bounding box into navmesh agent cylinder (#6114)

Closes #6114

See merge request OpenMW/openmw!967

(cherry picked from commit 67f32263b2f7e4be9f50d46de842a8727449cae2)

84d6dea2 Inscribe physical bounding box into navmesh agent cylinder
2021-06-28 14:26:37 +00:00
psi29a
e9fbd76e9b Merge branch 'windows_tests' into 'master'
Support running tests and benchmarks for windows

See merge request OpenMW/openmw!839
2021-05-18 08:12:22 +00:00
elsid
3ef1b27099
Add missing includes 2021-05-18 01:21:42 +02:00
elsid
59f89d22f8
Apply min distance only for not present tiles
To avoid waiting when navmesh update is triggered by transformed object for
already present tiles.
2021-05-14 22:41:11 +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
f169f8e6f0
Wait until navmesh is generated for interior cells
Add special loading progress bar.

It should be fast enough to not keep loading screen for noticably long but
will provide better pathfinding for actors inside interior cells.
2021-05-05 19:27:49 +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
elsid
3e67f5ffa5
Detect and ignore updates for oscillating objects
To avoid triggering NavMesh update when RecastMesh change should not change
NavMesh.

Based on the following assumption:
Given a set of transformations and a bounding shape for all these
tranformations, a new object transformation that does not change this
bounding shape also should not change navmesh if for all of this object
transformations resulting navmesh tiles are equivalent

The idea is to report back to RecastMeshManager all changes of NavMesh if there
are any assiciated with RecastMesh version. So we know the last time when
RecastMesh change resulted into the NavMesh change. When later report shows
that there was no NavMesh change for a new RecastMesh version we can assume
that any object transformation within the same bounding box should not change
NavMesh.
2021-04-18 23:00:13 +02:00
elsid
fac5759748
Set bounding min and max height for btHeightfieldTerrainShape
They must be set for proper AABB based filtering. Use
+-max(abs(min), abs(max)) to make sure bullet does not shift coordinates by z.
2021-02-28 20:49:22 +01:00
elsid
8dba61f7ae
Use navmesh raycast to find reachable position around target 2021-02-14 04:14:22 +01:00
Bret Curtis
f6bead88a9 purge boost/optional.hpp headers 2020-10-25 00:58:44 +02:00
elsid
b095ca6c86
Use actor speed to define area cost for pathfinding 2020-06-13 02:24:52 +02:00
elsid
b150d681a9
Update same navmesh tile with limited frequency 2020-05-01 18:05:58 +02:00
elsid
bd1ef4dd6d
Add detournavigator test for multiple worker threads 2020-04-26 22:00:55 +02:00
Alexey Sokolov
ddab86d940 Use approximate comparison for floating point in test
This fixes test suite on my machine
2020-04-19 19:11:38 +01:00
elsid
349040ffb2
Use status codes to handle navigator errors instead of exceptions
For find path use case.
2020-02-04 22:33:56 +01:00
elsid
1e106013a0
Use navmesh to find wander destination outside pathgrid for ground based actors
Use dtNavMeshQuery::findRandomPointAroundCircle from recastnavigation
2020-01-21 00:01:06 +01:00
elsid
07660b5605
Fix detournavigator tests 2019-10-20 18:59:14 +02:00
elsid
0479ebf5ae
Remove unused actors and navmeshes on update
When there is only one actor (player) on a scene and it moving to other
cell first it will be removed from navigator then added. Remove cause
navmesh removing for its half extents. After it is added navmesh for
same half extents is created and added. While this all happens there are
still jobs for old navmesh are processing. Old navmesh still exists
because it is stored by shared pointer. So jobs take tiles from cache
and place them into old navmesh. After that other jobs take same tiles
from cache (half extents and coordinates are equal) and place them into
other navmesh. dtNavMesh changes tile data on add and remove. Adding tile
to two dtNavMesh corrupts tile in both nameshes.
2019-03-10 17:06:15 +03:00
Bret Curtis
c20e69ef24
Merge pull request #2227 from elsid/fix_twitchy_massive_creatures
Fix twitchy movement for massive creatures (bug #4907)
2019-03-09 02:11:11 +01:00
elsid
b9f21ec81a
Use custom steps size to make smooth path depending on half extents 2019-03-08 22:33:34 +03:00
elsid
f2e47d640d
Add option to limit max number of navmesh tiles 2019-03-08 17:39:04 +03:00
elsid
895899b25b
Fix tests 2019-03-03 13:46:24 +03:00
elsid
16675fd254
Return empty path when navmesh is not found for agent 2019-02-16 15:37:06 +03:00
elsid
1d3668cd22
Add Navigator interface 2019-02-16 15:37:06 +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
1a27489904
Add special type for object id 2018-10-13 22:16:35 +03:00
elsid
7c80bb9411
Support multiple threads for async nav mesh updater 2018-10-13 22:16:34 +03:00
elsid
d02beae5a8
Find path for actors according to their abilities to swim and walk 2018-10-13 22:16:33 +03:00
elsid
c95cea414c
Support water for NavMesh 2018-10-13 22:16:32 +03:00
elsid
fa23b590a4
Add unwalkable areas to NavMesh 2018-10-13 22:16:32 +03:00
elsid
144e1a063b
Support animated objects 2018-10-13 22:16:30 +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
d1d034a1ec
Update NavMesh one by one tile in order from nearest to player 2018-10-13 22:16:26 +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