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

163 commits

Author SHA1 Message Date
Evil Eye
eb07818f13 Ignore agents without bounding boxes 2021-03-07 20:58:09 +01:00
psi29a
937549c99e Merge branch 'fix_still_actors' into 'master'
Make actor flee from a combat when cannot reach a target (#5851)

See merge request OpenMW/openmw!601
2021-02-26 23:25:05 +00:00
elsid
bc67669a97
Comment unused argument 2021-02-15 00:22:48 +01:00
elsid
4983684fda
Fix implicit int to float conversion warning 2021-02-15 00:20:15 +01:00
elsid
bb0c478954
Add missing include and use std malloc and free 2021-02-15 00:20:15 +01:00
elsid
3a9b1ce63a
Use camel case for local constant 2021-02-15 00:20:14 +01:00
elsid
a7fe6c7ba1
Move duplicated usage patter of dtNavMeshQuery::findNearestPoly into a separate function 2021-02-14 23:54:59 +01:00
elsid
d3ab6c972f
Avoid set unused position from dtNavMeshQuery::findNearestPoly result 2021-02-14 23:54:59 +01:00
elsid
8dba61f7ae
Use navmesh raycast to find reachable position around target 2021-02-14 04:14:22 +01:00
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