1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-19 20:53:52 +00:00
Commit graph

17796 commits

Author SHA1 Message Date
Evil Eye
977f717f8b Prevent a missing weapon animation from partially freezing actors 2021-07-27 16:33:07 +02:00
Alexei Dobrohotov
536dc6a0c6 Correct creature landing sound type (bug #6118) 2021-07-27 07:39:21 +03:00
psi29a
5a434aebe0 Merge branch 'SortedStaticLands' into 'master'
Replace land static container from vector to flat_set

See merge request OpenMW/openmw!853
2021-07-26 18:29:07 +00:00
Cédric Mocquillon
7772f5111b std::set version 2021-07-26 18:30:06 +02:00
madsbuvi
41c08b1c3b Stereo friendly StateSetUpdater
(cherry picked from commit 496b3aef88b8fd867dcdd23a6ca43144573b1b2f)

Stereo friendly water

(cherry picked from commit 0e22c55e48a7f965367d3d430c1bef5357b22748)

Option to disable per view mapping.

Include memory header

De-hardcode settings and buffers.

formatting error

Update water.cpp (whitespace)

Update water.cpp (more whitespace)

include render order

c array -> c++ array
2021-07-26 14:01:02 +02:00
psi29a
44ceb9572a Merge branch 'recast_mesh_heightfield' into 'master'
Reduce navmesh cache size by special handling for heightfields

See merge request OpenMW/openmw!1032
2021-07-26 11:49:30 +00:00
glassmancody.info
166e23a6d9 fix CI artifacts, missing header 2021-07-25 20:49:17 -07:00
elsid
9a5ec5fd03
Store heightfields as array of heights instead of triangles
To reduce size of RecastMesh and therefore cache size.
2021-07-26 00:22:21 +02:00
elsid
28b2f769c2
Update navmeshtilescache benchmark generators 2021-07-26 00:22:21 +02:00
elsid
fdee9db20c
Consider RecastMeshManager not empty when there is water 2021-07-26 00:22:21 +02:00
elsid
5d6c93566d
Rename DetourNavigator::Water -> Cell 2021-07-26 00:22:21 +02:00
elsid
753767d6d9
Store only water shift
Rotation is not used.
2021-07-26 00:22:20 +02:00
elsid
a1549321d7
Move Water struct out of RecastMesh class 2021-07-26 00:22:20 +02:00
elsid
d60edb36aa
Make RecastMesh independent from recast scale factor
To avoid scaling until it's required by delaying coordinates conversion until
navmesh generation.
2021-07-26 00:22:20 +02:00
elsid
af7059373c
Make RecastMesh independent from the order of RecastMeshBuilder calls
To make sure RecastMesh objects are equal if built with the same data but in
different order. Will be used later when there will be more than one place
building RecasMesh objects.
2021-07-26 00:22:20 +02:00
elsid
100cba6260
Use navigator field in Scene 2021-07-26 00:22:03 +02:00
psi29a
6949dd89c2 Merge branch 'gui_shaders' into 'master'
Add shader path for mygui (#6162)

See merge request OpenMW/openmw!1019
2021-07-25 21:37:39 +00:00
psi29a
b92c6985cd Merge branch 'auto_in_most_apps' into 'master'
Using auto keyword in most apps

See merge request OpenMW/openmw!885
2021-07-25 21:23:26 +00:00
psi29a
7d7427015e Merge branch 'removing_unused_launcher_imports' into 'master'
Removing unused imports in the Launcher

See merge request OpenMW/openmw!884
2021-07-25 21:18:25 +00:00
Petr Mikheev
200ccfab69 Merge branch 'Allow-Zoom-levels-on-the-World-Map' into 'master'
Allow Zoom levels on the World Map

See merge request OpenMW/openmw!275
2021-07-25 20:19:11 +00:00
fredzio
7145ef4ce0 Update AABB also in sync cases 2021-07-25 18:00:48 +02:00
Petr Mikheev
e371831086 Merge branch 'esmstore_infix' into 'master'
Use prefix increment for iterators in esmstore.cpp

See merge request OpenMW/openmw!1041
2021-07-25 13:28:18 +00:00
jvoisin
ce8c30bf07 Minor code simplification in npcanimation.cpp 2021-07-25 14:20:37 +02:00
Cédric Mocquillon
1051745f29 [Launcher] Add new setting 'allow zooming' to advanced tab in the launcher 2021-07-25 14:17:10 +02:00
CedricMocquillon
9fee9dbc9c [Global map] Regroup markers when the zoom out 2021-07-25 14:17:10 +02:00
CedricMocquillon
18f5853279 [Global <-> Local] Auto switch between local and global map when zoom in/out 2021-07-25 14:17:09 +02:00
CedricMocquillon
8c87defddf [Local map] Use the distance view in the local map 2021-07-25 14:17:08 +02:00
CedricMocquillon
ed04ebe9ff [Local map] Allow zoom on local map 2021-07-25 14:17:08 +02:00
CedricMocquillon
9fadbd5b7a [Global map] Allow zoom on global map 2021-07-25 14:17:07 +02:00
CedricMocquillon
99cd4b6742 [Refactoring] Several refactorings:
[Refactoring] Add marker size method instead of using magic constant

[Refactoring] Simplify worldPosToImageSpace and cellTopLeftCornerToImageSpace usage

[Refactoring] Add a missing 'f' to specify the float type

[Refactoring] Make cellTopLeftCornerToImageSpace more homogenous with worldPosToImageSpace

[Refactoring] Extract createmakrercoords method

[Refactoring] Use worldPosToImageSpace instead of cellTopLeftCornerToImageSpace
Remove cellTopLeftCornerToImageSpace as it is not used anymore
Remove getCellSize as it is not used anymore

[Refactoring] Extract new method createMarker

[Refactoring] Extract new method getMarkerCoordinates

[Refactoring] Extract new method getPosition

[Refactoring] Extract new method centerView

[Refactoring] Extract new method createDoorMarker

[Refactoring] Simplify for loop

[Refactoring] Make the test before the loop
2021-07-25 14:17:06 +02:00
cc9cii
33dcd7585a OpenCS - Jump To Modified 2021-07-24 20:00:25 +00:00
psi29a
2eea590762 Merge branch 'spawn_fix' into 'master'
Fix #6173

Closes #6173

See merge request OpenMW/openmw!1046
2021-07-24 12:04:20 +00:00
cc9cii
3e466699c8 A better way to plug a potential memory leak in the event of an exception during push_back(). 2021-07-24 21:23:03 +10:00
cc9cii
fd67ebde25 Changes based on review comments, including:
* replace murmurhash with std::unordered_map
* plug potential leak from unique_ptr release
* replacing some sections with cleaner code
2021-07-24 09:17:48 +10:00
fredzio
f348b70733 Set mCanWaterWalk and mOnGround when adding Actor to the scene.
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.
2021-07-23 18:04:58 +02:00
cc9cii
ee3361a118 Fix table being sorted twice (at least it appeared that way according to the sample profiler)
- Quoting Qt-4.8: "Note: . Setting the property to true with setSortingEnabled() immediately triggers a call to sortByColumn() with the current sort section and order."

(copied the changes from commit SHA-1: 77394fce99)
2021-07-23 23:18:11 +10:00
cc9cii
725d689e8a Call push_back() if inserting to the end of the vector. It seems MSVC may be generating different code compared to insert().
(copied the changes from commit SHA-1: 257126ed69)
2021-07-23 23:17:16 +10:00
cc9cii
44a333b6db Don't attempt to open files yet to be created. 2021-07-23 21:25:35 +10:00
Petr Mikheev
ec79f26320 Merge branch 'minor' into 'master'
Minor code cleanup

See merge request OpenMW/openmw!1038
2021-07-23 11:20:37 +00:00
cc9cii
5c504e4d22 Convert the CellRef record index lookup maps to use integer keys rather than strings.
- Morrowind load over 300,000 references, so even small inefficiencies add up to longer loading times.
- std::map is used, but should try others, std::unordered_map or even std::vector

(copied the changes from commit SHA-1: 86945d1912)
2021-07-23 19:07:56 +10:00
cc9cii
10c6304a1f Fix typo from commit cfdbd0d471. 2021-07-23 18:12:09 +10:00
cc9cii
fc2f68a465 Change the loader's top progress bar to show total number of records processed rather than the number of files.
(copied the changes from commit SHA-1: ff072441fd)
2021-07-23 17:34:27 +10:00
cc9cii
5fffcab94f Performance improvements for loading Info records.
- The order of info records with the same topic are maintained in Collection::mRecords
- The index lookup data structure are not ordered.  The topic string is hashed.  The infos for the topic are simply placed in a vector.
- The index values for appending or inserting a record takes prev/next values (if exist)
- FIXME: prev/next values are not adjusted for adding or removing records
- FIXME: undo after reordering does not reset the modified flag

(copied the changes from commit SHA-1: 06f9922822)
2021-07-23 16:05:58 +10:00
cc9cii
66bda84240 Convert RefNum index map to use find().
(copied the changes from commits 68e16b6cee and 0de223c637)

NOTE: it is unclear how this change affects commit 61a4a0807b
2021-07-23 15:30:33 +10:00
cc9cii
be45092e55 Use std::unique_ptr to store records in collections, RefidCollection and RefIdData.
(copied the changes from commit 23e7e3c165)
2021-07-23 14:21:21 +10:00
glassmancody.info
e8c6f31e0c add shader path for mygui (#6162) 2021-07-22 15:55:30 -07:00
jvoisin
73c20be29a Use prefix increment for iterators in esmstore.cpp
See https://pvs-studio.com/en/docs/warnings/v803/
for the rationale.
2021-07-22 22:03:59 +02:00
jvoisin
74fab99b89 Use a const-ref for an osg::Quat
Since an osg::Quat contains at least 4 floats,
it should be worth it to use a const-ref instead
of passing it by value.
2021-07-22 21:33:18 +02:00
jvoisin
f86ddef4db Minor code cleanup 2021-07-22 15:15:41 +02:00
psi29a
469cc44ef7 Merge branch 'tweaks' into 'master'
Change settings for async physics

See merge request OpenMW/openmw!778
2021-07-22 07:18:41 +00:00
jvoisin
5e3f000b66 Add a std::noboolalpha to a std::boolalpha 2021-07-21 14:40:54 +02:00
Nuri
36657698fb Added checks for paralysis, knocked down, and death when picking up items from inventory. Fixes #6165 2021-07-21 07:46:02 +00:00
psi29a
cc642b5335 Merge branch 'slimfast' into 'master'
Reduce size of physics objects by 1/3

See merge request OpenMW/openmw!1024
2021-07-20 19:03:14 +00:00
Alexei Dobrohotov
e5f96ab4ae Merge branch 'lol_so_random' into 'master'
Set the ptr's custom data before filling the store so leveled lists have access to the level

See merge request OpenMW/openmw!1028
2021-07-18 14:02:06 +00:00
Evil Eye
b95cf4fd00 Set the ptr's custom data before filling the store so leveled lists have access to the level 2021-07-18 15:04:25 +02:00
elsid
f92843e3d2
Fix UB: reference binding to misaligned address in Lua tests
/home/elsid/dev/openmw/apps/openmw_test_suite/lua/test_serialization.cpp:166:34: runtime error: reference binding to misaligned address 0x562ea892076c for type 'const struct TestStruct1', which requires 8 byte alignment
0x562ea892076c: note: pointer points here
  00 74 73 31 00 00 00 00  00 00 f8 3f 00 00 00 00  00 00 04 40 21 79 4b 08  00 00 00 74 65 73 74 5f
              ^
    #0 0x562ea6462b8e in deserialize /home/elsid/dev/openmw/apps/openmw_test_suite/lua/test_serialization.cpp:166
    #1 0x562ea68b7402 in deserializeImpl /home/elsid/dev/openmw/components/lua/serialization.cpp:172
    #2 0x562ea68b7bf6 in deserializeImpl /home/elsid/dev/openmw/components/lua/serialization.cpp:204
    #3 0x562ea68b86ea in LuaUtil::deserialize(sol::state&, std::basic_string_view<char, std::char_traits<char> >, LuaUtil::UserdataSerializer const*) /home/elsid/dev/openmw/components/lua/serialization.cpp:251
    #4 0x562ea6464d96 in TestBody /home/elsid/dev/openmw/apps/openmw_test_suite/lua/test_serialization.cpp:197
    #5 0x562ea6d9dac6 in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/elsid/dev/googletest/googletest/src/gtest.cc:2607
    #6 0x562ea6d9dac6 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/elsid/dev/googletest/googletest/src/gtest.cc:2643
    #7 0x562ea6d92e25 in testing::Test::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2682
    #8 0x562ea6d92e25 in testing::Test::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2672
    #9 0x562ea6d93024 in testing::TestInfo::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2861
    #10 0x562ea6d93728 in testing::TestInfo::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2834
    #11 0x562ea6d93728 in testing::TestSuite::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:3015
    #12 0x562ea6d94142 in testing::TestSuite::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2994
    #13 0x562ea6d94142 in testing::internal::UnitTestImpl::RunAllTests() /home/elsid/dev/googletest/googletest/src/gtest.cc:5855
    #14 0x562ea6d9e096 in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/elsid/dev/googletest/googletest/src/gtest.cc:2607
    #15 0x562ea6d9e096 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/elsid/dev/googletest/googletest/src/gtest.cc:2643
    #16 0x562ea6d93140 in testing::UnitTest::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:5438
    #17 0x562ea5d3fdc6 in RUN_ALL_TESTS() /home/elsid/dev/googletest/build/gcc/release/install/include/gtest/gtest.h:2490
    #18 0x562ea5d3fc6f in main /home/elsid/dev/openmw/apps/openmw_test_suite/openmw_test_suite.cpp:11
    #19 0x7fe3938d0b24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24)
    #20 0x562ea5d3fb7d in _start (/home/elsid/dev/openmw/build/gcc/ubsan/openmw_test_suite+0x173eb7d)

/home/elsid/dev/openmw/apps/openmw_test_suite/lua/test_serialization.cpp:176:34: runtime error: reference binding to misaligned address 0x562ea892078f for type 'const struct TestStruct2', which requires 4 byte alignment
0x562ea892078f: note: pointer points here
 75 63 74 32 04  00 00 00 03 00 00 00 04  00 6e 64 69 74 69 6f 6e  73 00 73 68 61 70 65 00  51 00 00
             ^
    #0 0x562ea6462df9 in deserialize /home/elsid/dev/openmw/apps/openmw_test_suite/lua/test_serialization.cpp:176
    #1 0x562ea68b7402 in deserializeImpl /home/elsid/dev/openmw/components/lua/serialization.cpp:172
    #2 0x562ea68b7bf6 in deserializeImpl /home/elsid/dev/openmw/components/lua/serialization.cpp:204
    #3 0x562ea68b86ea in LuaUtil::deserialize(sol::state&, std::basic_string_view<char, std::char_traits<char> >, LuaUtil::UserdataSerializer const*) /home/elsid/dev/openmw/components/lua/serialization.cpp:251
    #4 0x562ea6464d96 in TestBody /home/elsid/dev/openmw/apps/openmw_test_suite/lua/test_serialization.cpp:197
    #5 0x562ea6d9dac6 in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/elsid/dev/googletest/googletest/src/gtest.cc:2607
    #6 0x562ea6d9dac6 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/elsid/dev/googletest/googletest/src/gtest.cc:2643
    #7 0x562ea6d92e25 in testing::Test::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2682
    #8 0x562ea6d92e25 in testing::Test::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2672
    #9 0x562ea6d93024 in testing::TestInfo::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2861
    #10 0x562ea6d93728 in testing::TestInfo::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2834
    #11 0x562ea6d93728 in testing::TestSuite::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:3015
    #12 0x562ea6d94142 in testing::TestSuite::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2994
    #13 0x562ea6d94142 in testing::internal::UnitTestImpl::RunAllTests() /home/elsid/dev/googletest/googletest/src/gtest.cc:5855
    #14 0x562ea6d9e096 in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/elsid/dev/googletest/googletest/src/gtest.cc:2607
    #15 0x562ea6d9e096 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/elsid/dev/googletest/googletest/src/gtest.cc:2643
    #16 0x562ea6d93140 in testing::UnitTest::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:5438
    #17 0x562ea5d3fdc6 in RUN_ALL_TESTS() /home/elsid/dev/googletest/build/gcc/release/install/include/gtest/gtest.h:2490
    #18 0x562ea5d3fc6f in main /home/elsid/dev/openmw/apps/openmw_test_suite/openmw_test_suite.cpp:11
    #19 0x7fe3938d0b24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24)
    #20 0x562ea5d3fb7d in _start (/home/elsid/dev/openmw/build/gcc/ubsan/openmw_test_suite+0x173eb7d)
2021-07-17 17:41:41 +02:00
fredzio
44f822da56 Do not store a btTransform into Projectile class: reduce its size by 112 bytes 2021-07-17 13:11:41 +02:00
fredzio
f02d01ef0c Do not store btTransform into Object class: reduce its size by 104 bytes 2021-07-17 13:11:41 +02:00
fredzio
62ef708910 Do not store a btTransform into Actor class: reduce its size by 128 bytes 2021-07-17 13:11:39 +02:00
psi29a
42e50e487a Merge branch 'cleaning' into 'master'
Improve save cleaning

See merge request OpenMW/openmw!1015
2021-07-16 08:53:06 +00:00
psi29a
22068eed6b Merge branch 'navmesh_cache_without_off_mesh' into 'master'
Do not use off mesh connections as a part of navmesh cache key

See merge request OpenMW/openmw!1016
2021-07-16 08:40:56 +00:00
psi29a
6d08a1d731 Merge branch 'skip_async' into 'master'
Don't put player in the air after going out of tcl

See merge request OpenMW/openmw!1009
2021-07-16 07:50:26 +00:00
Evil Eye
087e933326 Close windows using Ptrs that are about to be deleted 2021-07-15 22:31:26 +02:00
elsid
beeb882ea8
Do not use off mesh connections as a part of navmesh cache key
To reduce cache size and make it more flexible.

Adding off mesh connections to the navmesh is the last step of navmesh
generation and it's very fast comparing to other steps (microseconds vs
milliseconds). Having less cache size makes get and set operations almost 2x
times faster that also have an order of microseconds. So in total there is
no performance impact.
2021-07-14 12:19:17 +02:00
elsid
6128fcfc82
Use empty off mesh connections in benchmark
To get proper comparison with the next change removing it from the cache key.
2021-07-14 00:01:46 +02:00
Evil Eye
1e1ebb049e Workaround clang and actually erase from the vector 2021-07-13 21:18:24 +02:00
Evil Eye
86c50ece92 Improve save cleaning 2021-07-12 20:51:13 +02:00
elsid
5c9af1742a
Dump moved cell refs in esmtool 2021-07-12 18:56:45 +02:00
elsid
cfdbd0d471
Indicate moved cell refs explicitly
This is less error prone approach than use of MovedCellRef fields.

Also make separate functions for skipping and reading moved cell refs to avoid
passing special flags  logic and null pointers for unused arguments.
2021-07-12 18:56:42 +02:00
elsid
f90c4ae22f
Add yaml-like separator between cell refs
To be able to separate records visually.
2021-07-12 18:48:49 +02:00
psi29a
cd9fb2adad Merge branch 'dial_me_maybe' into 'master'
Change disposition to work like vanilla

Closes #5100 and #5842

See merge request OpenMW/openmw!599
2021-07-12 14:22:26 +00:00
psi29a
6475082095 Merge branch 'lifetime' into 'master'
Maybe fix #6071

Closes #6071

See merge request OpenMW/openmw!1010
2021-07-12 14:11:14 +00:00
psi29a
223216733d Merge branch 'coverity_fix' into 'master'
Fix some coverity issues

See merge request OpenMW/openmw!1013
2021-07-12 14:06:44 +00:00
Petr Mikheev
8ff8ec4abd Fix coverity issues 2021-07-12 12:51:25 +02:00
elsid
153cd9a20c
Avoid redundant search for existing element 2021-07-12 11:41:21 +02:00
elsid
eece47f70e
Avoid copying osg::ref_ptr when adding or removing item from work queue
Copy constructor does refcounting, and move constructor doesn't.
2021-07-12 11:41:21 +02:00
elsid
b8fcd6d3ba
Manage work item lifetime on the client side
Instead of explicit work queue stop before any possibly used engine manager
is destructed. Based on an assumption that any engine manager can be destructed
independently from the work queue destruction. This model is already used in
CellPreloader that conflicts with explicit work queue stop.

After the work queue is requested to be stopped, any client waiting for a not
started work item to be done will wait forever because the work item is dropped
from the queue. Therefore either clients should not wait for own work items to
be completed in destructor or the work queue should not drop items before
clients are destructed. Other approaches are possible but are not considered
due to increasing complexity.

CellPreloader already tries to wait for all created work items to be done so
keep it that way and extend the model to AsyncScreenCaptureOperation and Scene.
Additionally abort all scheduled work items when owner is destructed. This
prevents a long exit when multiple screenshots are scheduled right before
exiting the game.
2021-07-12 11:41:14 +02:00
glassmancody.info
389b830046 fix black objects with OP batch debug due to unitialized uniform 2021-07-11 23:03:55 -07:00
fredzio
1650dabed8 Assign the return value of weak_ptr::lock() to a variable, so that the
shared object lifetime is properly extended. Otherwise there is a
possibility that the Actor gets destroyed during call to unstuck().
2021-07-11 18:01:20 +02:00
fredzio
643a64cb2f Change some settings for async physics:
- default to 1 thread
- default to always use defered aabb update, remove option
- always keep a cache of LOS request for at least the current frame.
This decreases number of raycast, especially when a lot of actors are
involved and "NPCs avoid collisions" is on
2021-07-11 17:07:39 +02:00
fredzio
6ad2cf8e4f Skip simulation result after calling Actor::updatePosition(). Otherwise
when going out of tcl the player would go back to previous position for
one frame.
2021-07-11 16:42:45 +02:00
elsid
73639a93b6
Avoid CTAD to fix macOS build
../../../apps/openmw/engine.cpp:706:23: error: no viable constructor or deduction guide for deduction of template arguments of 'function'
                    ? std::function(ScheduleNonDialogMessageBox {})
                      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:1430:48: note: candidate template ignored: could not match 'function<_Fp>' against '(anonymous namespace)::ScheduleNonDialogMessageBox'
template<class _Fp> class _LIBCPP_TEMPLATE_VIS function; // undefined
                                               ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:1430:48: note: candidate function template not viable: requires 0 arguments, but 1 was provided
../../../apps/openmw/engine.cpp:707:23: error: no viable constructor or deduction guide for deduction of template arguments of 'function'
                    : std::function(IgnoreString {})
                      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:1430:48: note: candidate template ignored: could not match 'function<_Fp>' against '(anonymous namespace)::IgnoreString'
template<class _Fp> class _LIBCPP_TEMPLATE_VIS function; // undefined
                                               ^
2021-07-11 13:26:21 +02:00
Cédric Mocquillon
269cd31059 Use same world coordinates to compute distances 2021-07-10 19:04:46 +02:00
Petr Mikheev
c2280ada1d OpenMW Lua, API_VERSION=0 2021-07-09 20:48:54 +02:00
Petr Mikheev
85c441ec9a Refactoring and minor fixes related to active/inactive object state 2021-07-09 20:48:54 +02:00
Petr Mikheev
43b7e6964a Add function World::isCellActive 2021-07-09 20:48:54 +02:00
Petr Mikheev
702eb19271 Fixes and refactoring 2021-07-09 20:48:54 +02:00
Petr Mikheev
cc7dbabd19 Change argument of onKeyPress 2021-07-09 20:48:54 +02:00
Petr Mikheev
b1a6441c23 Add LocalScripts::LocalEngineEvent. Add OnConsume engine handler. 2021-07-09 20:48:54 +02:00
Petr Mikheev
1268597676 Make loaded but inactive objects available in Lua scripts. 2021-07-09 20:48:54 +02:00
Petr Mikheev
403d31313c New setting "lua num threads". Thread syncronization is changed from std:🧵:yield to std::condition_variable. 2021-07-09 20:48:54 +02:00
Petr Mikheev
a8f76260bc A possibility to view actor controls from lua scripts without disabling AI. 2021-07-09 20:48:54 +02:00
Petr Mikheev
c463f52390 Add Cell Lua bindings 2021-07-09 20:48:54 +02:00
Petr Mikheev
de349962d1 Engine handlers onActive/onInactive and a function self:isActive() 2021-07-09 20:32:53 +02:00
Petr Mikheev
d5cda61855 Console command "reload lua" 2021-07-09 20:24:56 +02:00
Petr Mikheev
9d09ecf8ca Add mwlua/actions 2021-07-09 20:24:56 +02:00
Petr Mikheev
f5722f9ba0 Inventory bindings 2021-07-09 20:24:56 +02:00
Petr Mikheev
bdccf161c4 Add lua package 'openmw.query' 2021-07-09 20:24:56 +02:00
Petr Mikheev
32218f6dd5 More Lua bindings 2021-07-09 20:24:56 +02:00
Petr Mikheev
87b5afb9bf Control active Lua scripts from openmw.cfg 2021-07-09 20:24:56 +02:00
Petr Mikheev
8c6d303730 Saving/loading for Lua scripts (saves format is changed) 2021-07-09 20:24:56 +02:00
Petr Mikheev
914e604e06 Interactions between LuaManager and other parts of OpenMW 2021-07-09 20:24:56 +02:00
Petr Mikheev
f2d0a702e9 Add Lua timers 2021-07-09 20:24:51 +02:00
Petr Mikheev
3d7e306064 Add apps/openmw/mwlua 2021-07-09 20:03:27 +02:00
Petr Mikheev
7df500c385 Put RefData move constructor to cpp file 2021-07-09 20:03:27 +02:00
Petr Mikheev
6db2450c90 Initial support of generated RefNums with negative mContentFile. 2021-07-09 20:03:27 +02:00
Petr Mikheev
b53667d555 Queries. Data structures and lua bindings. 2021-07-09 20:03:27 +02:00
Petr Mikheev
479856f812 Add components/lua/scriptscontainer and components/esm/luascripts 2021-07-09 20:03:27 +02:00
Petr Mikheev
8dbaf6022c Add components/lua/serilalization 2021-07-09 20:03:27 +02:00
Petr Mikheev
4b068b27ca Add components/lua/luastate and components/lua/utilpackage 2021-07-09 20:03:27 +02:00
Petr Mikheev
9e168fd9cc Add Lua/LuaJit and sol3 to openmw 2021-07-09 19:27:00 +02:00
psi29a
c94339f248 Merge branch 'OpenMW_Bug6067_take3' into 'master'
Make Object Paging to ignore moved references.  (Issue #6139)

See merge request OpenMW/openmw!1001
2021-07-09 16:05:53 +00:00
psi29a
d8bed73ada Merge branch 'local_crache' into 'master'
Cache failed compilation when getting locals

Closes #6123

See merge request OpenMW/openmw!988
2021-07-08 22:16:15 +00:00
psi29a
c774a68439 Merge branch 'system_benchmark' into 'master'
Support system Google Benchmark

See merge request OpenMW/openmw!1000
2021-07-08 22:15:26 +00:00
elsid
d8cd5b361a
Hide message boxes when HUD is hidden 2021-07-08 21:14:01 +02:00
elsid
4259f7f230
Add setting to enable/disabled notification for saved screenshots 2021-07-08 21:14:01 +02:00
elsid
5103120eef
Notify about saved screenshot
Show message about saved screenshot via schedule message box. Since screenshot
saving happens not in the main thread calling messageBox directly is unsafe.
WindowManager::scheduleMessageBox delays message box showing until next update
in the main thread.
2021-07-08 21:14:01 +02:00
elsid
f7a6be053d
Stop engine work queue before destructing environment
To avoid access to null and dangling pointers from active work items on
quitting.
2021-07-08 21:14:01 +02:00
elsid
f8e02000ec
Write screenshots to file asynchronously 2021-07-08 21:13:57 +02:00
elsid
33aa4d0822
Move WriteScreenshotToFileOperation to components 2021-07-08 20:27:19 +02:00
elsid
8d2d24ce65
Store screen capture operation as osg::ref_ptr 2021-07-08 20:27:19 +02:00
psi29a
6cc5dc5bf0 Merge branch 'halp' into 'master'
Implement the help command

Closes #2780

See merge request OpenMW/openmw!1002
2021-07-07 20:49:41 +00:00
Evil Eye
eced6f2126 Implement the help command 2021-07-07 18:48:25 +02:00
psi29a
103f5943cf Merge branch 'endl' into 'master'
Remplace a ton of std::endl with \n

See merge request OpenMW/openmw!978
2021-07-07 10:42:52 +00:00
cc9cii
16e1398819 Quick solution to add logic to getNextRef() calls so that moved references are ignored. Currently it is assumed that MVRF records have been all read before the ESM reader context was saved, which is false assumption. Should resolve Issue #6139. 2021-07-07 08:18:38 +10:00
elsid
d85cbe4069
Support system Google Benchmark 2021-07-06 19:33:26 +02:00
Evil Eye
1196e0cfe6 Change disposition to work like vanilla 2021-07-06 17:03:56 +02:00
psi29a
126cf40848 Merge branch 'filter' into 'master'
Add a default filter to CS tables

See merge request OpenMW/openmw!958
2021-07-06 14:16:45 +00:00
psi29a
3c0a0ba9e1 Merge branch 'master' into 'touch_my_crank'
# Conflicts:
#   CHANGELOG.md
2021-07-06 09:18:12 +00:00
psi29a
c372c239a6 Merge branch 'master' into 'OpenCS_Bug6017'
# Conflicts:
#   CHANGELOG.md
2021-07-06 07:52:49 +00:00
psi29a
cda0c7ed44 Merge branch 'ghd' into 'master'
Great House Dagoth

See merge request OpenMW/openmw!638
2021-07-06 07:22:29 +00:00
cc9cii
ae4ddd810f More dead code removal. 2021-07-06 14:45:45 +10:00
cc9cii
ec457a09c3 Fix Npc edit widget index out of bounds due to a removed column. 2021-07-06 13:45:58 +10:00
cc9cii
f68c81e631 Merge branch 'master' into 'OpenCS_Bug6017' 2021-07-06 03:10:46 +00:00
cc9cii
4b3de46bfa Use enums in place of magic numbers. Ensure Creature and NPC cell references are always saved as persistent. 2021-07-06 12:37:02 +10:00
cc9cii
1f5b20ef7d test fix for missing refs 2021-07-06 11:43:30 +10:00
Evil Eye
796617fa0c Allow activators to be activated using telekinesis 2021-07-05 22:00:43 +02:00
Evil Eye
18f297a4e0 Allow a missing implicit argument for GetDistance 2021-07-05 18:34:09 +02:00
Evil Eye
0a15d7740a Delay physics for objects created by scripts 2021-07-05 18:34:06 +02:00
jvoisin
3925c0fecf Remplace a ton of std::endl with \n
endl is calling flush, which is really nuking performances,
and I care about esmtool's performances because I'm
using it for fuzzing.
2021-07-05 18:27:43 +02:00
psi29a
7cc4e5afa1 Merge branch 'more_magical_stamina' into 'master'
Make fatigue and magicka recalculation behave the same way

Closes #6107

See merge request OpenMW/openmw!968
2021-07-05 13:24:09 +00:00
elsid
7498a86abe
Remove redundant semicolons 2021-07-05 13:11:54 +02:00
psi29a
3588bfcb17 Merge branch 'OpenMW_Bug6067' into 'master'
Support moved references records in any order. (Issue #6067)

See merge request OpenMW/openmw!982
2021-07-05 08:20:37 +00:00
psi29a
6a4eeeb39b Merge branch 'fix_door_freeze' into 'master'
Fix slow AiPackage::getTarget calls (#6136)

Closes #6136

See merge request OpenMW/openmw!990
2021-07-05 08:17:46 +00:00
psi29a
9123db3a59 Merge branch 'fix_navmesh_update' into 'master'
Fix navmesh update on opening/closing door

See merge request OpenMW/openmw!995
2021-07-05 07:30:32 +00:00
elsid
c7c0d11cab
Trigger navmesh update when any navigator object has been updated
Set World::mShouldUpdateNavigator to true when this happens. Previously
assignment to true was missing for object rotation and moving.
2021-07-05 00:20:57 +02:00
elsid
09f9075842
Use RecastMeshBuilder once to create RecastMesh
This allows to move all data out of the object instead of copying.
2021-07-04 22:18:05 +02:00
elsid
8d1eb7e2e6
Fix slow AiPackage::getTarget calls
Assume there are no cell refs with empty ref id.
2021-07-04 14:09:11 +02:00
Evil Eye
9a7c07173d Cache failed compilation when getting locals 2021-07-04 10:58:12 +02:00
Andreas Stöckel
b1fa0e9560 Fix Avatar Preview Coordinate Transformations in the Inventory (Issues #6129, #6131) 2021-07-04 08:36:59 +00:00
cc9cii
42bcbe34de Cell references that teleport (Doors) should be placed in the "persistent" group when saving. 2021-07-04 16:18:47 +10:00
NeveHanter
6bb030aa55 Ignore actors siding with player in awarness check to allow training the sneaking or knowing whether player is detected by other actors in the siding actor line of sight 2021-07-03 13:40:36 +02:00
Evil Eye
5e4beb217a Make fatigue and magicka recalculation behave the same way 2021-07-03 10:47:26 +02:00
Dobrohotov Alexei
3cab69c389 Fix ShowMap partial match filtering (bug #6115) 2021-07-03 01:04:22 +03:00
psi29a
07c3ed16d0 Merge branch 'base64-fixes' into 'master'
Base64 fixes

Closes #6111

See merge request OpenMW/openmw!965
2021-07-02 06:27:17 +00:00
jvoisin
2cb9482893 Use a std::vector instead of a std::list in hypertextparser.cpp 2021-07-01 23:09:08 +00:00
elsid
5624fe1911
Consider path not found when there is navmesh query error
Fix a specific case when the guard at the start of the game fails to find path
due to failed getPolyHeight call that results into a partial path to the
target.
2021-06-30 20:13:27 +02:00
cc9cii
6575b95448 Support moved references (i.e. with MVRF sub-records) that do not occur at the beginning of the cell references block. 2021-06-30 15:34:40 +10:00
cc9cii
2d8dd9be32 Fix using incorrect id to search for record flags. Eliminate inefficient double-loop in saving cell references. 2021-06-30 10:46:51 +10:00
cc9cii
47ef98ca1b Clean up RefIdData code for better legibility. 2021-06-30 10:09:56 +10:00
cc9cii
f2a301653c Remove redundant mPersistent member from ESM::NPC and ESM::Creature, replaced by mRecordFlags. Fixed the editing of the persistence flag value. 2021-06-30 08:20:29 +10:00
cc9cii
2a76634f5f Moved persistence flag from references to the header flags of referenceables (e.g. Static, Weapon, etc). Editing widget is not fully working. 2021-06-29 23:25:26 +10:00
cc9cii
f6eab52a1b Added "Persistent" column to references table. 2021-06-29 19:45:02 +10:00
cc9cii
024ad3276b Partial fix for #6017. The persistence flag of the references are saved but it is not yet possible to modify it via OpenCS. 2021-06-29 19:20:01 +10:00
Evil Eye
4f264af5a9 Merge branch 'staticsload' into 'master'
Loads statics before actors II (#5379)

See merge request OpenMW/openmw!588
2021-06-28 20:25:51 +00:00
psi29a
67f32263b2 Merge branch 'fix_malexa_escape' into 'master'
Inscribe physical bounding box into navmesh agent cylinder (#6114)

Closes #6114

See merge request OpenMW/openmw!967
2021-06-28 14:26:08 +00:00
fredzio
c795e0bce6 Some actors are supposed to spawn on an object that belongs to an adjacent cell.
Since actors can be active in 3x3 grid around the player, we need to
first load all objects in a 5x5 grid around the player.

Split load and unloading in 2 phases. Add an mInactiveCells set into the
scene, which contains all cells inside the aforementioned 5x5 grid.
These cells contains only heightfields and non-animated physics objects.

Animated objects are tied to the scene graph, which doesn't exists yet
in these cells, so we skip them.
2021-06-28 09:36:04 +02:00
elsid
8d2cdedc87
Show number of pathgrid node in a tooltip
To allow users faster understand what node it is.
2021-06-28 00:34:49 +02:00
elsid
84d6dea277
Inscribe physical bounding box into navmesh agent cylinder
To disallow too narrow navmesh for a bounding box.
2021-06-27 13:44:38 +02:00
AnyOldName3
d38126ef1c Pack default CS config
*Technically* it was already being loaded as if it were packed, but it
made no difference because it's supposed to be empty.
2021-06-26 20:00:25 +01:00
Evil Eye
1f658209f8 Merge branch 'DoNotCopyFullDialogue' into 'master'
Do not copy full dialogue as we only want to return its id

See merge request OpenMW/openmw!856
2021-06-26 11:59:37 +00:00
Alexey Sokolov
ec576b36f1 Add a default filter to CS tables
This fixes the single most annoying issue of OpenMW-CS: inability for
users to filter records in the table if they don't happen to know by
heart the syntax of the very powerful filter engine. Because simply
typing the text into the search field did not work. Now, existence of .*
suggests that regex is used, and users still can replace the text with a
custom filter if they wish.
2021-06-25 11:45:43 +01:00
psi29a
7d8949ec3f Merge branch 'positively_glowing' into 'master'
Detach objects from the active grid when attempting to get their animation

Closes #6105

See merge request OpenMW/openmw!951
2021-06-25 09:20:25 +00:00
Evil Eye
2be27da791 Merge branch 'const_refs' into 'master'
Add a ton of const refs

See merge request OpenMW/openmw!954
2021-06-24 18:57:41 +00:00
Evil Eye
9f7980ecd7 Merge branch 'refenreces' into 'master'
Sprinkle some references where it makes sense

See merge request OpenMW/openmw!952
2021-06-24 17:40:36 +00:00
Evil Eye
7e9785941c Merge branch 'default' into 'master'
Use `default` instead of empty constructors/destructors

See merge request OpenMW/openmw!957
2021-06-24 17:19:02 +00:00
jvoisin
cf11870b1c Sprinkle some references where it makes sense 2021-06-24 00:28:09 +02:00
jvoisin
5840279f16 Use default instead of empty constructors/destructors
See https://pvs-studio.com/en/docs/warnings/v832/ for details
2021-06-24 00:26:15 +02:00
jvoisin
b2c170efa0 Use initialization lists where possible 2021-06-23 23:36:43 +02:00
jvoisin
1123dc46ee Add a ton of const refs 2021-06-23 23:13:59 +02:00
Evil Eye
692615fd3c Detach objects from the active grid when attempting to get their animation 2021-06-23 18:08:49 +02:00
Evil Eye
7377568f01 Merge branch 'modernize_use_override_openmw_cs' into 'master'
Using override keyword in OpenMW CS

See merge request OpenMW/openmw!888
2021-06-22 18:04:40 +00:00
Evil Eye
f264a8d90a Merge branch 'vfx' into 'master'
Calculate magic VFX vertical offset (bug #5453)

Closes #5453

See merge request OpenMW/openmw!909
2021-06-22 17:15:29 +00:00
Alexey Yaryshev
2577047b59 Fixed an issue #6101 (https://gitlab.com/OpenMW/openmw/-/issues/6101) 2021-06-22 14:51:49 +00:00
Dobrohotov Alexei
870cdd0130 Calculate magic VFX vertical offset (bug #5453) 2021-06-21 23:29:45 +03:00
psi29a
9c3117d2d4 Merge branch 'fix_smooth_movement' into 'master'
Validate almost straight shortcuts by navmesh raycast (#6102)

Closes #6102

See merge request OpenMW/openmw!947
2021-06-21 19:54:17 +00:00
Evil Eye
b2acb322af Merge branch 'modernize_use_override_for_most_apps' into 'master'
Using override keyword in most apps

See merge request OpenMW/openmw!886
2021-06-21 18:47:45 +00:00
elsid
e7d68d3d1b
Validate almost straight shortcuts by navmesh raycast
Check whether it's possible to actually move over navmesh by such shortcut.
2021-06-21 18:50:45 +02:00
Léo Peltier
5c4e1252e9 Handle AutoCalc flag when getting spell cost
Fixes #5483

This only applies to "base game" spells.
When adding an AutoCalc spell with TES:CS its cost is computed and
stored inside game files. This stored cost was being used by OpenMW and
the actual cost was never recomputed at runtime whereas Morrowind.exe
discards the stored cost.
While this worked fine in vanilla, mods can update AutoCalc spell
effects without ever updating the stored cost.

The formula was mostly there already but there was a few differences,
namely a 1 second offset in duration.
2021-06-20 13:42:28 +02:00
psi29a
6a9f2fdb17 Merge branch 'underground' into 'master'
Get The Underground 2 running

See merge request OpenMW/openmw!608
2021-06-19 21:06:15 +00:00
Evil Eye
690e5ef757 Don't resolve a script's target just to get the ID 2021-06-19 19:26:57 +02:00
Evil Eye
67c8d73fe0 Allow scripts to fail per target 2021-06-19 19:26:55 +02:00
Evil Eye
879e66a043 Don't autoequip items when implicitely adding an item using equip 2021-06-19 19:26:53 +02:00
Evil Eye
382d458f9c Ignore wrong reference class for SetHello 2021-06-19 19:26:53 +02:00
elsid
e5e04b85c1
Consider time to destination when try to avoid collision
Actor may reach destination before collision. Get next path point from active
packet pathfinder and use point tolerance to reduce distance.

Use maximum of last destination tolerance and DEFAULT_TOLERANCE because
there are 2 checks made for path completion. First checks whether actor is
close enough to the destination and second drop last path point when actor is
closer than DEFAULT_TOLERANCE.
2021-06-19 14:11:20 +02:00
elsid
56e6305345
Revert "Merge branch 'fix_new_game_guard' into 'master'"
This reverts commit a487295d39.
2021-06-19 14:06:46 +02:00
psi29a
b7886bc036 Merge branch 'SpeedUpInteriorCheck' into 'master'
Speedup searching for exterior cells

See merge request OpenMW/openmw!857
2021-06-19 00:29:47 +00:00
psi29a
047d993cf4 Merge branch 'at' into 'master'
Use operator[] instead of at() when the idx is checked

See merge request OpenMW/openmw!916
2021-06-19 00:26:48 +00:00
psi29a
f66196588c Merge branch 'object_paging_min_size_combo_box' into 'master'
Adding Object Paging Min Size combo box to Advanced -> Visuals

See merge request OpenMW/openmw!917
2021-06-19 00:20:29 +00:00
psi29a
5aa1f7b3d0 Merge branch 'remove_useless' into 'master'
Remove some useless variables from esmtool

See merge request OpenMW/openmw!925
2021-06-19 00:17:58 +00:00
psi29a
3794e6d4b2 Merge branch 'fix-ffmpeg-api-const' into 'master'
Fix future FFMpeg API changes

See merge request OpenMW/openmw!922
2021-06-19 00:15:16 +00:00
psi29a
4d95855dd5 Merge branch 'reduce_esmreader' into 'master'
Reduce a bit std::stringstream's code bloat in hot/small functions

See merge request OpenMW/openmw!933
2021-06-18 22:53:25 +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
jvoisin
22153cca7b Reduce a bit the code bloat in hot paths/small functions
There is no need to bloat hot/small functions with
a ton of function calls and involving locales
for simple error messages.
2021-06-15 17:57:14 +02: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
jvoisin
d651f9e60c Remove some useless variables from esmtool 2021-06-02 19:04:46 +02:00
Dan Church
70a0229010
Fix future FFMpeg API changes
avcodec_find_decoder now returns const AVCodec*.
2021-06-01 10:56:48 -05:00
Alexey Sokolov
3e4340338f Update IRC links to libera
In README, in OpenCS about dialog, in Travis notification
2021-05-31 21:15:26 +01: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
Thunderforge
89950e5528 Preventing type conversion of double to float for objectPagingMinSize 2021-05-29 16:27:23 -05:00
Thunderforge
9f2f5174d4 Adding Object Paging Min Size combo box to Advanced -> Visuals
Requested in Discord by CMAugust and hammered out with a few other users.
2021-05-29 16:17:30 -05:00
jvoisin
8695b6fbc5 Use operator[] instead of at() when the idx is checked 2021-05-29 15:31:32 +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
elsid
e9433a91fb
Add more tests for TileCachedRecastMeshManager 2021-05-27 20:18:52 +02: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
d122e184cc
Report navmesh change for not posted tiles
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.
2021-05-27 12:40:00 +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
psi29a
dff4b83d9d Merge branch 'stop_threading' into 'master'
Stop osg viewer threading before destructing engine

See merge request OpenMW/openmw!901
2021-05-22 08:52:44 +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
elsid
105cd5b06f
Add more checks to NavMeshTilesCache tests 2021-05-21 19:33:42 +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
psi29a
3920477618 Merge branch 'moving_lighting_method_to_graphics' into 'master'
Moving Lighting Method from Advanced -> Visuals to Graphics -> Lighting

See merge request OpenMW/openmw!883
2021-05-19 05:09:24 +00:00
psi29a
c4fde03542 Merge branch 'ObjectPagingMergeIssue' into 'master'
Share state

See merge request OpenMW/openmw!879
2021-05-19 05:08:12 +00:00
Thunderforge
945f1aad20 Using override keyword in OpenMW CS
Detected by clang-tidy's modernize-use-override
2021-05-18 19:53:55 -05:00
Thunderforge
efcdb2dfdd Using override keyword in most apps
Detected by clang-tidy's modernize-use-override

Future MRs can be created to run this on OpenMW and OpenMW CS
2021-05-18 19:42:24 -05:00
Thunderforge
ded7bd92e6 Using auto keyword in most apps
Detected by clang-tidy's modernize-use-auto
2021-05-18 19:20:59 -05:00
Thunderforge
6ba23a028c Removing unused imports in the Launcher 2021-05-18 18:23:16 -05:00
Thunderforge
4a15868c0e Moving Lighting Method from Advanced -> Visuals to Graphics -> Lighting
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.
2021-05-18 18:05:54 -05:00
CedricMocquillon
d11a6bd92c Share state 2021-05-18 17:57:47 +02:00
Atahualpa
3a1243a5d0 Rebased branch, reduced code duplication, added comments, adjusted formatting. 2021-05-18 17:53:00 +02:00
Atahualpa
ca80aeaaea Fix vertex calculation for cell-border drawing. 2021-05-18 15:05:26 +02:00
Atahualpa
356efa15a2 Fixes #6035 (circle brush selects outside of circle) and #6036 (some corner vertices not selected). 2021-05-18 15:04:01 +02:00
Atahualpa
7be891b440 Directly use Geometry instead of Geode; fix for loop; add size_t type-cast. 2021-05-18 14:56:03 +02:00
Atahualpa
73949d5bd0 Updating the CMake file isn't a bad idea either... 2021-05-18 14:56:03 +02:00
Atahualpa
6c49074765 Remove old references to Cell class. 2021-05-18 14:56:03 +02:00
Atahualpa
008bf64dd9 Second step toward fixing terrain selection issues. 2021-05-18 14:56:03 +02:00
Atahualpa
18ea4d8eb2 First step toward fixing terrain selection issues. 2021-05-18 14:56:02 +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