Make it possible to opt out of composing variables
Closes#6186
See merge request OpenMW/openmw!1076
(cherry picked from commit 15d278de554818fef6fecf300456800523e91adf)
4727ae4b Make it possible to opt out of composing variables
04e9b6d2 Abort on duplicate content file
mCanWaterWalk was set to false and updated during next frame's simulation
mOnGround is set to true but then was updated as part of the scene
loading logic.
Don't put player in the air after going out of tcl
See merge request OpenMW/openmw!1009
(cherry picked from commit 6d08a1d7318ae076839738d173b884fcc7b1a348)
6ad2cf8e Skip simulation result after calling Actor::updatePosition(). Otherwise
Maybe fix#6071Closes#6071
See merge request OpenMW/openmw!1010
(cherry picked from commit 64750820957773a00d449d29551bb15fbf5fe08b)
1650dabe Assign the return value of weak_ptr::lock() to a variable, so that the
Fix black objects in object paging debug view
See merge request OpenMW/openmw!1011
(cherry picked from commit 5287c9627c92b77c25581dbb9ac9d0b0dc4c9698)
389b8300 fix black objects with OP batch debug due to unitialized uniform
LOD issue with object paging
See merge request OpenMW/openmw!1007
(cherry picked from commit 5688b7b4d8df93fbf28307d2259c57f8d878eeb8)
269cd310 Use same world coordinates to compute distances
Fix navmesh update on opening/closing door
See merge request OpenMW/openmw!995
(cherry picked from commit 9123db3a5954dd082f501151cba0a08bfe3ff908)
c7c0d11c Trigger navmesh update when any navigator object has been updated
Fix new game guard 3 (#6126)
Closes#6126
See merge request OpenMW/openmw!976
(cherry picked from commit 89ca56632c6bc37f07e430e7f5cd23d855610b19)
a3942a1e Remove redundant check for y coordinate in inRange function
cc08a45c Move include where it is needed
7e1630a7 Remove redundant getPolyHeight wrapper
793c30ab Check dtNavMeshQuery::getPolyHeight status
a54c4bc2 Check dtNavMeshQuery::findStraightPath status
94e460ba Use proper check for distance
5624fe19 Consider path not found when there is navmesh query error
Detach objects from the active grid when attempting to get their animation
Closes#6105
See merge request OpenMW/openmw!951
(cherry picked from commit 7d8949ec3fcd1919da59308deab06433136f6629)
692615fd Detach objects from the active grid when attempting to get their animation
Validate almost straight shortcuts by navmesh raycast (#6102)
Closes#6102
See merge request OpenMW/openmw!947
(cherry picked from commit 9c3117d2d4a70475b021f4e4a50eec88cd7cf125)
e7d68d3d Validate almost straight shortcuts by navmesh raycast
Reapply new game guard fix
See merge request OpenMW/openmw!944
(cherry picked from commit eca0a95a5a16cf3734a32c76cab0c0a0dd6dfe2d)
56e63053 Revert "Merge branch 'fix_new_game_guard' into 'master'"
e5e04b85 Consider time to destination when try to avoid collision
Adding Object Paging Min Size combo box to Advanced -> Visuals
See merge request OpenMW/openmw!917
(cherry picked from commit f66196588c16a9a16211d8f400ce7812127f26c0)
9f2f5174 Adding Object Paging Min Size combo box to Advanced -> Visuals
89950e55 Preventing type conversion of double to float for objectPagingMinSize
Fix future FFMpeg API changes
See merge request OpenMW/openmw!922
(cherry picked from commit 3794e6d4b20b6c9f47aeaf3f937118c49de700e5)
70a02290 Fix future FFMpeg API changes
Corresponding recast mesh tiles can be updated but navmesh tiles may never
appear for them. Report back zero navmesh version to allow oscillating recast
objects detection to work. This version is always less than any generated
navmesh tile version so any report for generated navmesh will override it.
If zero navmesh version is reported after recast mesh tile got report about
generated navmesh tile it is a no-op since generated version is always greater
than zero.
To fix all possible situations when active message box overlaps with loading
screen progress.
The only used condition to center loading screen progress by height is
number of message boxes > 0. No need to pass it through interface.
LoadingScreen can check it inside setLabel function.
Actor's position can be determined in 3 ways:
1/ as a result of physics simulation
2/ after a script require a relative position change (SetPos, Move)
3/ absolutely set from games mechanics event (teleport) or script
(PositionCell)
In case 1/, RefData::mPosition is updated with the physics simulation result
In case 2/, when RefData::mPosition is updated, physics simulation is informed of the change and update accordingly
In case 3/, when RefData::mPosition is updated, the physics simulation state is reset
In all 3 cases, we don't need to check the RefData::mPosition to get a
correct behaviour.
TSAN reported the following data race:
Read of size 4 at 0x7b50005b75b0 by thread T12 (mutexes: write M656173, write M84859534346343880):
#0 ESM::Position::asVec3() const /build/openmw/openmw/master2/.build/freebsd/TSAN/../../.././components/esm/defs.hpp:55:27 (openmw+0xb809d5)
#1 MWPhysics::Actor::updateWorldPosition() /build/openmw/openmw/master2/.build/freebsd/TSAN/../../../apps/openmw/mwphysics/actor.cpp:131:59 (openmw+0xb809d5)
#2 MWPhysics::Actor::setPosition(osg::Vec3f const&) /build/openmw/openmw/master2/.build/freebsd/TSAN/../../../apps/openmw/mwphysics/actor.cpp:177:5 (openmw+0xb809d5)
#3 MWPhysics::PhysicsTaskScheduler::updateActorsPositions() /build/openmw/openmw/master2/.build/freebsd/TSAN/../../../apps/openmw/mwphysics/mtphysics.cpp:524:28 (openmw+0xb91ac0)
#4 MWPhysics::PhysicsTaskScheduler::afterPostStep() /build/openmw/openmw/master2/.build/freebsd/TSAN/../../../apps/openmw/mwphysics/mtphysics.cpp:614:13 (openmw+0xb915e7)
#5 MWPhysics::PhysicsTaskScheduler::worker()::$_5::operator()() const /build/openmw/openmw/master2/.build/freebsd/TSAN/../../../apps/openmw/mwphysics/mtphysics.cpp:498:45 (openmw+0xb915e7)
#6 void Misc::Barrier::wait<MWPhysics::PhysicsTaskScheduler::worker()::$_5>(MWPhysics::PhysicsTaskScheduler::worker()::$_5&&) /build/openmw/openmw/master2/.build/freebsd/TSAN/../../.././components/misc/barrier.hpp:30:21 (openmw+0xb915e7)
#7 MWPhysics::PhysicsTaskScheduler::worker() /build/openmw/openmw/master2/.build/freebsd/TSAN/../../../apps/openmw/mwphysics/mtphysics.cpp:498:31 (openmw+0xb915e7)
#8 MWPhysics::PhysicsTaskScheduler::PhysicsTaskScheduler(float, btCollisionWorld*, MWRender::DebugDrawer*)::$_0::operator()() const /build/openmw/openmw/master2/.build/freebsd/TSAN/../../../apps/openmw/mwphysics/mtphysics.cpp:162:45 (openmw+0xb92630)
#9 decltype(std::__1::forward<MWPhysics::PhysicsTaskScheduler::PhysicsTaskScheduler(float, btCollisionWorld*, MWRender::DebugDrawer*)::$_0>(fp)()) std::__1::__invoke<MWPhysics::PhysicsTaskScheduler::PhysicsTaskScheduler(float, btCollisionWorld*, MWRender::DebugDrawer*)::$_0>(MWPhysics::PhysicsTaskScheduler::PhysicsTaskScheduler(float, btCollisionWorld*, MWRender::DebugDrawer*)::$_0&&) /usr/include/c++/v1/type_traits:3899:1 (openmw+0xb92630)
#10 void std::__1::__thread_execute<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, MWPhysics::PhysicsTaskScheduler::PhysicsTaskScheduler(float, btCollisionWorld*, MWRender::DebugDrawer*)::$_0>(std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, MWPhysics::PhysicsTaskScheduler::PhysicsTaskScheduler(float, btCollisionWorld*, MWRender::DebugDrawer*)::$_0>&, std::__1::__tuple_indices<>) /usr/include/c++/v1/thread:280:5 (openmw+0xb92630)
#11 void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, MWPhysics::PhysicsTaskScheduler::PhysicsTaskScheduler(float, btCollisionWorld*, MWRender::DebugDrawer*)::$_0> >(void*) /usr/include/c++/v1/thread:291:5 (openmw+0xb92630)
Previous write of size 8 at 0x7b50005b75b0 by main thread:
#0 memcpy /wrkdirs/usr/ports/devel/llvm-devel/work-default/llvm-project-3f6753efe1990a928ed120bd907940a9fb3e2fc3/compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:827:5 (openmw+0x55a057)
#1 MWWorld::RefData::setPosition(ESM::Position const&) /build/openmw/openmw/master2/.build/freebsd/TSAN/../../../apps/openmw/mwworld/refdata.cpp:216:19 (openmw+0xa3de1c)
#2 MWWorld::World::moveObject(MWWorld::Ptr const&, MWWorld::CellStore*, float, float, float, bool) /build/openmw/openmw/master2/.build/freebsd/TSAN/../../../apps/openmw/mwworld/worldimp.cpp:1130:26 (openmw+0xa57300)
#3 MWWorld::World::moveObject(MWWorld::Ptr const&, float, float, float, bool, bool) /build/openmw/openmw/master2/.build/freebsd/TSAN/../../../apps/openmw/mwworld/worldimp.cpp:1253:16 (openmw+0xa580c8)
#4 MWWorld::World::doPhysics(float, unsigned long long, unsigned int, osg::Stats&) /build/openmw/openmw/master2/.build/freebsd/TSAN/../../../apps/openmw/mwworld/worldimp.cpp:1530:17 (openmw+0xa5af8f)
#5 MWWorld::World::updatePhysics(float, bool, unsigned long long, unsigned int, osg::Stats&) /build/openmw/openmw/master2/.build/freebsd/TSAN/../../../apps/openmw/mwworld/worldimp.cpp:1862:13 (openmw+0xa61a7c)
#6 OMW::Engine::frame(float) /build/openmw/openmw/master2/.build/freebsd/TSAN/../../../apps/openmw/engine.cpp:333:42 (openmw+0xcce9e7)
#7 OMW::Engine::go() /build/openmw/openmw/master2/.build/freebsd/TSAN/../../../apps/openmw/engine.cpp:935:14 (openmw+0xcd86ed)
#8 runApplication(int, char**) /build/openmw/openmw/master2/.build/freebsd/TSAN/../../../apps/openmw/main.cpp:296:17 (openmw+0xcbffac)
#9 wrapApplication(int (*)(int, char**), int, char**, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) /build/openmw/openmw/master2/.build/freebsd/TSAN/../../../components/debug/debugging.cpp:205:15 (openmw+0x1335442)
#10 main /build/openmw/openmw/master2/.build/freebsd/TSAN/../../../apps/openmw/main.cpp:308:12 (openmw+0xcc008a)
:wqa
The plan is to add additional options to this new tab, and since it's of similar status as the Shaders settings, it makes sense to put them next to them on the Graphics page.
The idea is to avoid std::map lookup for each CellRef. Instead generate a
sequence of added and removed RefNums into a vector then order them by RefNum
using a stable sort that preserves relative order of elements with the same
RefNum. RefIDs are stored in a different vector to avoid std::string move ctor
calls when swapping elements while sorting. Reversed iteration over added and
removed RefNums for each unique RefNum is an equivalent to what map-based
algorithm produces. The main benefit from sorting a vector is a data locality
that means less cache misses for each access. Reduces ESMStore::countRecords
perf cycles by 25%.