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

13056 commits

Author SHA1 Message Date
psi29a
5a27d6eed7 Merge branch 'fix-ffmpeg-api-const' into 'master'
Fix future FFMpeg API changes

See merge request OpenMW/openmw!922

(cherry picked from commit 3794e6d4b20b6c9f47aeaf3f937118c49de700e5)

70a02290 Fix future FFMpeg API changes
2021-06-19 00:16:02 +00:00
psi29a
071786aff6 Merge branch 'UseSameDistanceForAllLodsOfTheCurrentChunk' into 'master'
Use same distance for all lods of the current chunk

Closes #6061

See merge request OpenMW/openmw!940
2021-06-16 11:47:30 +00:00
psi29a
329ec8f044 Merge branch 'dont_bury_me_plz' into 'master'
Don't unsummon creatures not found within the active cells

Closes #6070

See merge request OpenMW/openmw!926
2021-06-16 09:43:53 +00:00
psi29a
c39c0266a9 Merge branch 'free_from_bondage' into 'master'
Do not assume the bound item cache is valid after loading a save

Closes #6069

See merge request OpenMW/openmw!931
2021-06-16 09:43:14 +00:00
unknown
7d756d997e Rebuild the cache in readState 2021-06-12 18:18:52 +02:00
CedricMocquillon
7fa67ff675 Use same distance for all lod instances of a chunk 2021-06-12 15:34:15 +02:00
fredzio
7d0483d7ad Cast spell even if target Ptr is empty. It happens when enchanted arrows
hit water or ground.
2021-06-11 05:55:37 +02:00
Evil Eye
90fa8dca35 Do not assume the bound item cache is valid after loading a save 2021-06-06 18:10:55 +02:00
Evil Eye
89e0bfd1a4 Purge summon effects on dispose 2021-06-06 12:45:42 +02:00
Evil Eye
004660be3d Don't unsummon creatures not found within the active cells 2021-06-02 20:33:29 +02:00
psi29a
a487295d39 Merge branch 'fix_new_game_guard' into 'master'
Consider time to destination when try to avoid collision

See merge request OpenMW/openmw!914
2021-05-30 11:52:48 +02:00
Evil Eye
b8472e1303 Use modified paralyze magnitude to fall and float 2021-05-28 16:55:54 +02:00
psi29a
9dfba37ce9 Merge branch 'fix_big_object_navmesh_update' into 'master'
Fix overwhelming recast mesh and navmesh updates for big rotating objects (#6060)

Closes #6060

See merge request OpenMW/openmw!911
2021-05-27 21:08:33 +00:00
psi29a
825ac6100f Merge branch 'fix_loading_screen' into 'master'
Always center loading screen progress bar by height when there is active message box (#6059)

See merge request OpenMW/openmw!910
2021-05-27 16:45:49 +00:00
Evil Eye
1a1085272a Use ciEqual to determine actor-specific answers 2021-05-27 17:13:04 +02:00
elsid
4a6961b365
Trigger navmesh update on moved player only when player tile has been changed 2021-05-27 16:52:42 +02:00
elsid
3915e5d2cc
Always center loading screen progress bar by height when there is active message box
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.
2021-05-26 23:29:37 +02:00
Mads Buvik Sandvei
d906ec773a Fix hangup on savegame after manual screenshots. 2021-05-24 17:57:39 +00:00
elsid
375372981c
Stop osg viewer threading before destructing engine
To avoid rendering while engine parts are destructing.
2021-05-21 23:16:15 +02:00
fredzio
b13afd758c Remove both racy and useless code.
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
2021-05-20 20:46:44 +02:00
CedricMocquillon
d11a6bd92c Share state 2021-05-18 17:57:47 +02:00
Bret Curtis
373f8636b7
Merge pull request #3092 from akortunov/master
Do not trigger in-game bindings via mouse buttons when controls are disabled
2021-05-18 10:47:45 +02:00
psi29a
ae66afb219 Merge branch 'less_verbose' into 'master'
Make the code less verbose.

See merge request OpenMW/openmw!874
2021-05-18 08:30:50 +00:00
psi29a
4bc7012104 Merge branch 'pack-default-settings' into 'master'
Pack default settings

Closes #5925

See merge request OpenMW/openmw!822
2021-05-18 08:11:13 +00:00
psi29a
f1f1703441 Merge branch 'fix_navmesh_wait' into 'master'
Fix redundant waiting until navmesh is generated

See merge request OpenMW/openmw!861
2021-05-17 10:54:23 +00:00
Andrei Kortunov
c11774f278 Do not trigger in-game bindings via mouse buttons when controls are disabled (bug #6047) 2021-05-17 12:23:56 +04:00
AnyOldName3
c2e4eda825 Merge branch '6013-fix' into 'master'
Retain draw callback

Closes #6013 and #5967

See merge request OpenMW/openmw!875
2021-05-16 17:30:38 +00:00
madsbuvi
f3e17e7c52 Don't redundantly call notify on every frame. 2021-05-16 18:09:48 +02:00
Frederic Chardon
62c7adc87b Merge branch 'no_at_boundaries' into 'master'
Don't use at() instead [] when length is checked/known

See merge request OpenMW/openmw!866
2021-05-16 11:58:14 +00:00
Frederic Chardon
38db2f8810 Merge branch 'includes_mwgui' into 'master'
Remove some useless includes from apps/openmw/mwgui

See merge request OpenMW/openmw!870
2021-05-16 11:46:13 +00:00
madsbuvi
5b9a2b73b0 Retain final draw callback as a member variable in ScreenshotManager, and do not call setFinalDrawCallback after init. 2021-05-16 13:04:30 +02:00
Frederic Chardon
807c7a2025 Merge branch 'useless_includes_mwmechanics' into 'master'
Remove some useless headers in apps/openmw/mwmechanics

See merge request OpenMW/openmw!871
2021-05-16 10:51:43 +00:00
fredzio
5b63019719 Embed actor velocity inside its class. It makes the code simpler. 2021-05-16 12:42:17 +02:00
fredzio
c55db790f3 Make the code less verbose / more readable using for range loop and
structured binding.

No functional changes.
2021-05-16 12:42:16 +02:00
Frederic Chardon
730f1fe2a7 Merge branch 'useless_includes_mwphysics' into 'master'
Remove some useless includes in apps/openmw/mwphysics

See merge request OpenMW/openmw!872
2021-05-16 10:37:33 +00:00
jvoisin
9373e4ada7 Remove some useless includes in apps/openmw/mwphysics 2021-05-15 23:13:46 +02:00
jvoisin
9522a64e7d Remove some useless includes from apps/openmw/mwgui 2021-05-15 22:15:46 +02:00
jvoisin
1cd15613a6 Remove some useless headers in apps/openmw/mwmechanics 2021-05-15 22:14:08 +02:00
psi29a
3d61d7ec9a Merge branch 'optimize_initial_load' into 'master'
Optimize engine initial loading time

See merge request OpenMW/openmw!867
2021-05-15 18:48:17 +00:00
Evil Eye
6cb6461cba Merge branch 'const_ref_it' into 'master'
Use const references when possible in for loops

See merge request OpenMW/openmw!869
2021-05-15 18:47:03 +00:00
jvoisin
7deb6a6ffd Use const references when possible in for loops
No need for useless copies.
2021-05-15 19:50:01 +02:00
jvoisin
c1e3869f25 Remove an unused struct 2021-05-15 19:49:15 +02:00
elsid
1e2aae8095
Use stable sort+unique to collect RefIDs for ESMStore records counting
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%.
2021-05-15 18:45:22 +02:00
elsid
9938af2289
Use unordered_map for ref count
Reduces ESMStore::countRecords time by 8%.
2021-05-15 18:45:22 +02:00
elsid
6248dc72cb
Convert to lower case only when needed 2021-05-15 18:45:21 +02:00
elsid
f2188d2533
Reduce temporary allocations on ESM loading
By moving objects instead of copying when possible.
2021-05-15 18:45:21 +02:00
Bret Curtis
8a315b01ae
Merge pull request #3089 from xyzz/fix-journalbooks-ub
Fix out-of-bounds access in JournalBooks::createCyrillicJournalIndex
2021-05-15 17:25:47 +02:00
Ilya Zhuravlev
13f060623f Fix out-of-bounds access in JournalBooks::createCyrillicJournalIndex 2021-05-15 10:45:39 -04:00
jvoisin
690d85d0e9 Don't use at() instead [] when length is checked/known 2021-05-15 15:38:17 +02:00
Andrei Kortunov
b63f53f5bb Disable shield animation when we launch a torch one (bug #6043) 2021-05-15 11:31:08 +04:00