elsid
68fe6b9114
Use only item size to check whether item fits cache
...
Item size has to be counted anyway and there is no reason to check only navmesh
data first.
2021-02-04 01:12:59 +01:00
elsid
3a2cea5271
Use raw recast mesh data and off mesh connections for navmesh key
...
Serialization into a vector of chars produces inconsistent results that leads
to reduced cache hit rate. Using a structured object is a more clear solution
and allows to remove serialization and nontrivial key compare logic with more
straigt forward structured object comparison.
2021-02-04 01:01:15 +01:00
elsid
ad1f8c1e84
Sort water and off mesh connections for recast mesh
...
Inconsisten order of these objects in navmesh cache key leads to cache misses
due to key inequality.
2021-02-04 01:00:41 +01:00
elsid
489107c5ee
Count navmesh cache key once in item size
...
Key is stored only in NavMeshTilesCache::Item, TileMap uses KeyView with
a pointer to a vector.
2021-02-04 00:44:23 +01:00
elsid
88ca4a1db6
Count navmesh cache hit rate
2021-02-04 00:35:24 +01:00
elsid
d2d8a7a940
Fix passing null to memcpy
...
/home/elsid/dev/openmw/components/detournavigator/navmeshtilescache.cpp:36:24: runtime error: null pointer passed as argument 2, which is declared to never be null
#0 0x55e37ba4cda5 in makeNavMeshKey /home/elsid/dev/openmw/components/detournavigator/navmeshtilescache.cpp:36
#1 0x55e37ba4cda5 in DetourNavigator::NavMeshTilesCache::set(osg::Vec3f const&, osg::Vec2i const&, DetourNavigator::RecastMesh const&, std::vector<DetourNavigator::OffMeshConnection, std::allocator<DetourNavigator::OffMeshConnection> > const&, DetourNavigator::NavMeshData&&) /home/elsid/dev/openmw/components/detournavigator/navmeshtilescache.cpp:81
#2 0x55e37fe3c861 in DetourNavigator::updateNavMesh(osg::Vec3f const&, DetourNavigator::RecastMesh const*, osg::Vec2i const&, osg::Vec2i const&, std::vector<DetourNavigator::OffMeshConnection, std::allocator<DetourNavigator::OffMeshConnection> > const&, DetourNavigator::Settings const&, std::shared_ptr<Misc::ScopeGuarded<DetourNavigator::NavMeshCacheItem> > const&, DetourNavigator::NavMeshTilesCache&) /home/elsid/dev/openmw/components/detournavigator/makenavmesh.cpp:582
#3 0x55e37fb796ce in DetourNavigator::AsyncNavMeshUpdater::processJob(DetourNavigator::AsyncNavMeshUpdater::Job const&) /home/elsid/dev/openmw/components/detournavigator/asyncnavmeshupdater.cpp:178
#4 0x55e37fb9a125 in DetourNavigator::AsyncNavMeshUpdater::process() /home/elsid/dev/openmw/components/detournavigator/asyncnavmeshupdater.cpp:144
#5 0x7f013f585c23 in execute_native_thread_routine /build/gcc/src/gcc/libstdc++-v3/src/c++11/thread.cc:80
#6 0x7f013f8c63e8 in start_thread (/usr/lib/libpthread.so.0+0x93e8)
#7 0x7f013e91d292 in __GI___clone (/usr/lib/libc.so.6+0x100292)
2021-01-09 22:59:24 +01:00
Andrei Kortunov
8084a336b5
Replace zeroes and nulls by nullptrs
2020-11-29 11:14:07 +04:00
elsid
9b11b8a27b
Fix boundary check
2020-11-18 18:52:00 +01:00
Bret Curtis
0e0c091e15
add more optionals and casserts for windows
2020-10-25 01:34:04 +02:00
Bret Curtis
4a54d375cc
add cassert for windows
2020-10-25 01:31:05 +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
Bret Curtis
5a824d0333
components/compiler cleanup; also cleaned up related cascading warnings; fixed up final/override issues
2020-10-22 23:57:53 +02:00
Assumeru
72549651e0
Rework container resolution ( #3006 )
...
* Rework container resolution
* add optional argument to getCount
* remove now-redundant changes
* undo worldimp changes
* move save-fixing code to InventoryState
* replace Rng instances with Seeds
2020-10-13 17:46:32 +02:00
psi29a
9a912486f9
Merge branch 'deprecated-exception' into 'master'
...
Use C++11 exception specification
See merge request OpenMW/openmw!343
2020-10-13 13:31:48 +00:00
fredzio
460e69e92a
Get rid of warning: dynamic exception specifications are deprecated
2020-10-10 12:12:55 +02:00
elsid
7591d45008
Use memcpy to create navmesh key
...
Implementation with memcpy is ~13 times faster.
2020-10-08 19:55:56 +02:00
elsid
f637dc38bd
Add cached flag to update navmesh status
2020-10-08 19:55:55 +02:00
elsid
eb140ed15f
Write unknown status numeric value
2020-10-08 19:55:55 +02:00
elsid
7d73e73cad
Consider tile as not removed when it is not found
2020-10-08 19:55:55 +02:00
psi29a
0dc7715c35
Merge branch 'object_paging_retry' into 'master'
...
Object Paging
See merge request OpenMW/openmw!209
2020-06-16 08:21:54 +00:00
elsid
00197e1cd9
Optimize recast mesh size by vertex deduplication
2020-06-16 00:51:36 +02:00
elsid
b095ca6c86
Use actor speed to define area cost for pathfinding
2020-06-13 02:24:52 +02:00
elsid
439588d10e
Remove unused mOffMeshConnectionIds
2020-06-13 02:24:51 +02:00
bzzt lost a hitlab login
c1ebd9474b
stop navmesh updates when ai off
...
Signed-off-by: Bret Curtis <psi29a@gmail.com>
2020-06-13 00:22:28 +02:00
elsid
c4cd3b2c4f
Add pathgrid to navmesh as off mesh connection
2020-06-12 21:04:02 +02:00
elsid
14d0ca4cd3
Cast float to btScalar
2020-05-13 18:44:11 +02:00
elsid
b150d681a9
Update same navmesh tile with limited frequency
2020-05-01 18:05:58 +02:00
elsid
10daadefbe
Add missing include
2020-04-30 21:58:00 +02:00
Bret Curtis
b7f7aabd8b
Merge pull request #2806 from elsid/detournavigator_tests
...
Add detournavigator test for multiple worker threads
2020-04-30 14:48:02 +02:00
elsid
899a6b5aa3
Workaround for GCC 5 bug
...
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61636
2020-04-29 13:54:52 +02:00
elsid
bd1ef4dd6d
Add detournavigator test for multiple worker threads
2020-04-26 22:00:55 +02:00
Alexei Dobrohotov
d42cb4f16d
Merge pull request #2805 from elsid/detournavigator_update_callback
...
Use callback to handle changed tiles
2020-04-26 22:52:40 +03:00
elsid
df6e85b619
Use callback to handle changed tiles
...
Instead of collecting changed tiles into a temporary vector.
2020-04-25 17:56:41 +02:00
elsid
7502db1570
Add number of thread jobs to update jobs stats
2020-04-25 17:51:50 +02:00
elsid
208a50340d
Specialize DetourNavigator::ObjectId ctor for pointers
...
To fix msvc error:
components\detournavigator\objectid.hpp(14,13): error C2440: 'reinterpret_cast': cannot convert from 'const T' to 'size_t'
with
[
T=unsigned long
]
2020-04-13 20:48:34 +02:00
Andrei Kortunov
2e7712a390
Fix C5204 warnings by adding default virtual destructors
2020-03-26 14:49:12 +04:00
elsid
5168f2059f
Compare revisions by equality to support overflow
2020-03-14 09:38:24 +01:00
elsid
7ae7cb181d
Support recast mesh rendering
2020-03-14 09:38:24 +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
f7caeefddb
Fallback to straight path when navmesh and pathgrind are not available
2020-01-29 11:14:07 +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
Andrei Kortunov
3704acf857
Unify streams usage to support non-ASCII paths (bug #5239 )
2020-01-03 07:10:17 +04:00
Andrei Kortunov
cd81f81fb6
Initialize variables to avoid GCC warnings
2019-12-22 10:44:14 +04:00
elsid
7ec5a20c64
Filter recast mesh triangles by global bounding box
...
Except heightfields to reduce slow down.
2019-11-30 13:19:27 +01:00
elsid
7729e396b2
Fix exceptions logging
2019-11-30 10:33:14 +01:00
Andrei Kortunov
6832a2fa9a
Remove BOM from CPP files (allows to build OpenMW with LCC on Elbrus)
2019-05-21 19:22:34 +04:00
elsid
c683dc8565
Lock navmesh tile by thread while processing
...
To avoid duplicated work on a same tile by different threads.
If tile is locked by another thread, then post job into this thread queue.
2019-04-10 22:01:50 +02:00
Andrei Kortunov
14b756a692
Use a generic logging system for RecastNavigation
2019-04-08 20:31:21 +04:00
Bret Curtis
45221418bd
Merge pull request #2260 from elsid/fix_clean_unused_navmeshes
...
Fix clean unused navmeshes
2019-03-18 08:57:46 +01:00