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

5013 commits

Author SHA1 Message Date
psi29a
59e09cba5b Merge branch 'boltsize' into 'master'
Use projectile mesh size (#5829)

See merge request OpenMW/openmw!587
2021-02-15 08:40:30 +00:00
elsid
561628087c Merge branch 'profiler_fix' into 'master'
Fix profiler glitches (#5850)

See merge request OpenMW/openmw!605
2021-02-15 00:01:06 +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
AnyOldName3
4f510d85ba Merge remote-tracking branch 'upstream/master' into alpha-meddling 2021-02-14 22:42:55 +00:00
elsid
8dba61f7ae
Use navmesh raycast to find reachable position around target 2021-02-14 04:14:22 +01:00
fredzio
c4e909c29e Silence a clang warning:
warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
2021-02-12 19:36:03 +01:00
fredzio
bc4047d815 Update engine stats for all levels above first, not only at the second. 2021-02-12 19:03:02 +01:00
elsid
8ab5fd9b40
Fix frame rate limit
Measure time at the computation end but before sleep. This allows to adjust
sleep interval for the next frame in case sleep is not precise due to syscall
overhead or too low timer resolution.

Remove old frame limiting mechanism.
2021-02-12 00:03:11 +01:00
psi29a
c33b2e0100 Merge branch 'dehardcodebaseanim' into 'master'
Dehardcode Base_animation and improve Collada support

See merge request OpenMW/openmw!510
2021-02-10 16:29:47 +00:00
Sergey Fukanchik
f3271cb66b Add unit test for swapEndiannessInplace(). Part of Bug #5837 2021-02-09 13:09:36 -05:00
Petr Mikheev
31b5150e0d Fix implementation of Misc::swapEndiannessInplace 2021-02-07 09:12:38 +01:00
psi29a
dc31e1c680 Merge branch 'refraction_shadow_fix_2' into 'master'
Fix shadows missing in the refraction RTT on the first and second frame

See merge request OpenMW/openmw!590
2021-02-06 20:26:46 +00:00
AnyOldName3
3e273a759a Clarify method name now we're using it differently 2021-02-06 16:41:46 +00:00
fredzio
6e969ca3fa Use mesh collision box instead of node bounding sphere for projectile
size. The bounding sphere is much bigger than the mesh.
2021-02-05 22:53:45 +01:00
Alexei Dobrohotov
ab28847eaf Merge branch 'collisionextentsandcenter' into 'master'
Get collision box extents and center from btBvhTriangleMeshShape

See merge request OpenMW/openmw!579
2021-02-04 23:03:43 +00:00
unelsson
303f1912a6 less debug spam 2021-02-04 23:14:52 +02:00
unelsson
d5844b0982 Use accompanying txt file for textkeys in osgAnimation formats 2021-02-04 23:14:21 +02: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
Nelsson Huotari
45fde84f4f Use nodemasks and visitors for detecting custom collision shapes 2021-02-03 21:16:54 +02:00
Nelsson Huotari
5c32460153 Add underscore-separated node-names to reserved-list 2021-02-03 14:25:50 +02:00
Nelsson Huotari
384112746c Add option for custom collision node with non-nif files 2021-02-03 14:25:09 +02:00
Nelsson Huotari
bae27e8199 dynamic_cast to static_cast 2021-02-02 21:52:15 +02:00
Nelsson Huotari
b28d8251aa Clone animation tracks 2021-02-02 21:52:08 +02:00
Nelsson Huotari
6c0c28c2eb Get collision box extents and center from btBvhTriangleMeshShape 2021-02-02 21:51:46 +02:00
Nelsson Huotari
1221889cf7 Limit conversion of underscores to nodes origating from osgAnimation library 2021-02-02 21:41:17 +02:00
Nelsson Huotari
5b88d16a50 Clean-up 2021-02-02 21:09:50 +02:00
Nelsson Huotari
2162b97fef Handle case in osgAnimation bone names 2021-02-02 17:34:02 +02:00
Nelsson Huotari
7d3f2bc113 Convert underscores in bone names to whitespaces 2021-02-02 17:33:40 +02:00
madsbuvi
7edaa50195 another approach 2021-01-31 18:02:05 +01:00
Nelsson Huotari
f87c45c92a Get collision box extents and center from btBvhTriangleMeshShape 2021-01-30 16:03:02 +02:00
Nelsson Huotari
3194520dcd Move base_anim settings to settings-default.cfg 2021-01-27 13:41:02 +02:00
Bret Curtis
b164f1aa17
Merge pull request #3023 from akortunov/grass_intsancing
Grass instancing
2021-01-27 12:21:24 +01:00
Frederic Chardon
7cd7fa2f08 Collect all available stats if OPENMW_OSG_STATS_FILE is set and point to
a valid file.
2021-01-27 08:04:33 +00:00
Gleb Mazovetskiy
99ba45a308 Optional static builds of OSG, MyGUI, Bullet 2021-01-26 19:00:55 +00:00
Andrei Kortunov
24e1dfcddc Use default argument 2021-01-26 22:29:41 +04:00
Andrei Kortunov
f40e227686 Remove redundant formatting changes 2021-01-26 22:29:41 +04:00
Andrei Kortunov
d12a0fdcb3 Mark only instances from groundcover files as groundcover objects 2021-01-26 22:29:41 +04:00
Andrei Kortunov
14cf0ce1dc Implement instanced groundcover 2021-01-26 22:29:41 +04:00
psi29a
49c828c138 Merge branch 'threadsafe-createchunk' into 'master'
Avoid OSG setting array binding from multiple threads

Closes #4765

See merge request OpenMW/openmw!557
2021-01-23 22:19:31 +00:00
Gleb Mazovetskiy
1e113710ef Clean-up FontLoader::loadFontFromXml fix
Follow-up to !559
2021-01-23 17:14:56 +00:00
Gleb Mazovetskiy
bd7d5a8f92 Fix memory leak in FontLoader::loadFontFromXml
Tried building with -DCMAKE_CXX_FLAGS='-fsanitize=address -fsanitize-recover=address'
and this was one of the reported leaks.
2021-01-23 04:08:39 +00:00
AnyOldName3
eb80c997b8 Avoid OSG setting array binding from multiple threads 2021-01-22 19:44:22 +00:00
Gleb Mazovetskiy
cd5e31dc4b Revert "Merge branch 'windowing-system' into 'master'"
This reverts merge request !541
2021-01-22 19:04:07 +00:00
AnyOldName3
b6e92c9c6d Use ShaderVisitor to skip translucent framebuffer specific stuff 2021-01-20 23:37:19 +00:00
psi29a
7455dfb3a1 Merge branch 'windowing-system' into 'master'
Fix OSG USE_GRAPHICSWINDOW check

See merge request OpenMW/openmw!541
2021-01-14 15:00:34 +00:00
Gleb Mazovetskiy
d24a5f7b89 Fix OSG USE_GRAPHICSWINDOW check
When OSG is built with `-DOSG_WINDOWING_SYSTEM=None`, this macro does not exist.

Replaces the Android-specific check with a general one.
2021-01-13 20:45:34 +00:00
Andrei Kortunov
89f3f860ed Allow to get a rotation vector from ESM::Position 2021-01-13 14:25:25 +04:00
Andrei Kortunov
f175beb304 Define template ref classes in components 2021-01-13 14:25:21 +04:00
psi29a
654238fd18 Merge branch 'no_bonus_points' into 'master'
Show mesh origin

Closes #5771

See merge request OpenMW/openmw!507
2021-01-11 21:21:47 +00:00
Petr Mikheev
eaaa2f4a1c Use misc/endianness.hpp in components/nif/nifstream 2021-01-10 16:34:47 +01:00
Petr Mikheev
14dd11372f Utility functions for little-endian <-> big-endian conversion. 2021-01-10 16:34:47 +01:00
Bret Curtis
a735bbe9a5
Merge pull request #3040 from akortunov/pvs
Fix some issues, found by PVS Studio
2021-01-10 12:58:17 +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
elsid
7b54415c40
Fix reference binding to null
/usr/include/c++/10.2.0/bits/stl_vector.h:1046:34: runtime error: reference binding to null pointer of type 'value_type'
    #0 0x55e37f50008a in std::vector<char, std::allocator<char> >::operator[](unsigned long) /usr/include/c++/10.2.0/bits/stl_vector.h:1046
    #1 0x55e37f50008a in ESM::SavedGame::load(ESM::ESMReader&) /home/elsid/dev/openmw/components/esm/savedgame.cpp:28
    #2 0x55e37e726139 in MWState::Character::addSlot(boost::filesystem::path const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/elsid/dev/openmw/apps/openmw/mwstate/character.cpp:31
    #3 0x55e37e742b39 in MWState::Character::Character(boost::filesystem::path const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/elsid/dev/openmw/apps/openmw/mwstate/character.cpp:88
    #4 0x55e37e7006e1 in MWState::CharacterManager::CharacterManager(boost::filesystem::path const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/elsid/dev/openmw/apps/openmw/mwstate/charactermanager.cpp:25
    #5 0x55e37e6d4140 in MWState::StateManager::StateManager(boost::filesystem::path const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/elsid/dev/openmw/apps/openmw/mwstate/statemanagerimp.cpp:90
    #6 0x55e37e82595a in OMW::Engine::prepareEngine(Settings::Manager&) /home/elsid/dev/openmw/apps/openmw/engine.cpp:641
    #7 0x55e37e8439fd in OMW::Engine::go() /home/elsid/dev/openmw/apps/openmw/engine.cpp:867
    #8 0x55e37e782760 in runApplication(int, char**) /home/elsid/dev/openmw/apps/openmw/main.cpp:289
    #9 0x55e37f6483c3 in wrapApplication(int (*)(int, char**), int, char**, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/elsid/dev/openmw/components/debug/debugging.cpp:200
    #10 0x55e37ba8e3fe in main /home/elsid/dev/openmw/apps/openmw/main.cpp:301
    #11 0x7f013e845151 in __libc_start_main (/usr/lib/libc.so.6+0x28151)
    #12 0x55e37baa0e3d in _start (/home/elsid/dev/openmw/build/gcc/ubsan/openmw+0x6c11e3d)
2021-01-09 22:59:24 +01:00
Andrei Kortunov
8e5f26c109 Code cleanup 2021-01-09 14:41:10 +04:00
Andrei Kortunov
33648313a6 Initialize variables 2021-01-09 14:21:57 +04:00
Andrei Kortunov
7fc4c9f3f6 Avoid dead code 2021-01-09 13:52:01 +04:00
Andrei Kortunov
801e2d6ad0 Avoid to use uninitialized variables 2021-01-09 13:36:40 +04:00
AnyOldName3
4ed3252001 Check for EXT_gpu_shader4 CPU-side
Mesa lies and always defines GL_EXT_gpu_shader4 even when the extension
isn't present.
2021-01-07 18:13:51 +00:00
Alexei Dobrohotov
c17e498465 Merge branch 'launchercleanup' into 'master'
Remove deadcode from the launcher.

See merge request OpenMW/openmw!511
2021-01-03 08:48:52 +00:00
AnyOldName3
e3fd5efcfe Disable A2C for alpha-blended drawables 2021-01-02 19:09:06 +00:00
fredzio
dbdd397716 Remove deadcode. 2021-01-01 16:54:45 +01:00
Evil Eye
630ec36d1f iterate in reverse order 2020-12-30 10:35:51 +01:00
unknown
3bf641d3ce Show mesh origin 2020-12-29 21:45:59 +01:00
Andrei Kortunov
ee2416017e Fix tag mismatch 2020-12-28 12:19:22 +04:00
wareya
18ef32ca82 values for this higher than sGroundOffset cause jittering on some surface; use safe-seeming value slightly less than sGroundOffset 2020-12-27 22:16:11 +00:00
AnyOldName3
5e004356a2 Merge remote-tracking branch 'upstream/master' into alpha-meddling 2020-12-27 02:48:42 +00:00
AnyOldName3
8f4b856b44 Initial A2C implementation 2020-12-26 22:45:53 +00:00
AnyOldName3
8c3a786e54 Unconditionally disable alpha testing when shaders are used 2020-12-24 00:32:15 +00:00
AnyOldName3
11b4af49ce Allow shadowsbin to optimise clockwise-wound meshes when face culling is off 2020-12-23 01:24:15 +00:00
AnyOldName3
a36ed5f129 Optimise out redundant call
We already had the results
2020-12-23 00:23:49 +00:00
AnyOldName3
7e045cff75 #include <memory> 2020-12-20 01:51:45 +00:00
AnyOldName3
657da50d99 Ensure GL_BLEND is disabled when drawing shadow maps 2020-12-20 01:36:34 +00:00
AnyOldName3
0e4e8eb0f3 Add glDebugGroup support 2020-12-20 01:22:14 +00:00
AnyOldName3
cc2ce9fa3e Explicitly default-construct array
The docs seem to imply this is automatic when the array contains a
class-type, which osg::ref_ptr is, but I got a crash log that doesn't
make sense if that's true.
2020-12-19 21:57:42 +00:00
AnyOldName3
264539cd63 Merge branch 'WindowCrashCatcher' into 'master'
Handle Crashes on Windows

See merge request OpenMW/openmw!455
2020-12-18 13:41:18 +00:00
AnyOldName3
0b5d5eab4c Move is faster 2020-12-18 02:11:51 +00:00
AnyOldName3
05ad44d0b1 Set correct array size 2020-12-18 01:44:46 +00:00
AnyOldName3
a080071588 Set default state sensibly 2020-12-18 00:02:51 +00:00
Alexei Dobrohotov
46ec40fa92 Make sure NIFLoader avoids working further with empty geometry 2020-12-18 01:22:34 +03:00
AnyOldName3
ce2bcba5d4 Replace deprecated alpha test in shader visitor 2020-12-17 14:57:43 +00:00
Alexei Dobrohotov
1e6156e04a Turn all NIF records into structs 2020-12-16 01:54:31 +03:00
psi29a
78e85fe011 Merge branch 'this_is_nife' into 'master'
More NIF stuff

See merge request OpenMW/openmw!461
2020-12-15 15:43:12 +00:00
Nelsson Huotari
8b2bf12e8f Use bip01 for root bone name 2020-12-15 13:51:49 +02:00
Nelsson Huotari
6c1f6169c0 Fix root movement glitch 2020-12-15 13:50:19 +02:00
Nelsson Huotari
3195716a2c Don't force loop textkey 2020-12-15 13:49:25 +02:00
Alexei Dobrohotov
53e1e57eef Formatting 2020-12-15 00:06:43 +03:00
Alexei Dobrohotov
085ea44af5 Add BSShaderLightingProperty abstraction 2020-12-15 00:06:43 +03:00
Alexei Dobrohotov
c0b9823372 Read BSShaderProperty and handle NiGeometry properties 2020-12-15 00:06:43 +03:00
Alexei Dobrohotov
42226533d8 Handle BSLODTriShape
Its levels of detail are currently not handled
2020-12-15 00:06:43 +03:00
Alexei Dobrohotov
8fd45d85ec Unify NiGeometry/NiGeometryData handling 2020-12-15 00:06:43 +03:00
Alexei Dobrohotov
8ca324af0a Handle emissive TexEnv creation in one place 2020-12-15 00:06:43 +03:00
Alexei Dobrohotov
5310dd6807 Clean up particle vertex handling 2020-12-15 00:06:43 +03:00
Alexei Dobrohotov
1c83e4936d Read BSShaderTextureSet and NiColorInterpolator
Accept boolean-based and 4D vector-based NiInterpolators in ValueInterpolator constructor
2020-12-15 00:06:43 +03:00
CedricMocquillon
cc5c6fe3ad Use data() method 2020-12-13 20:50:48 +01:00
CedricMocquillon
112437cf28 Change crash file to dmp on window to avoid renaming it 2020-12-13 14:13:07 +01:00
CedricMocquillon
adeb4fe02f Handle case where the log path has more that MAX_PATH characters 2020-12-13 14:10:44 +01:00
CedricMocquillon
f400116bcd Use 32767 characters for log path 2020-12-13 14:09:44 +01:00
CedricMocquillon
3eb2b32123 Fix typpo issue on arguments 2020-12-13 14:09:14 +01:00
CedricMocquillon
e2041de969 Use the incremental approach to handle long path 2020-12-12 21:47:50 +01:00
Nelsson Huotari
256aa5e71d Use const auto& 2020-12-12 22:23:20 +02:00
CedricMocquillon
73afc55462 Fork the current process to monitor exe, generate minidump on crash 2020-12-12 20:17:26 +01:00
Alexei Dobrohotov
15291f15d3 Make actor collision box components a struct 2020-12-11 20:07:59 +03:00
psi29a
11eff02a1d Merge branch 'Show-more-information-about-level-on-menu' into 'master'
Show more information about level on menu

See merge request OpenMW/openmw!437
2020-12-11 12:04:15 +00:00
Petr Mikheev
49c6e50c31 Print '--version' and '--help' messages without timestamps 2020-12-08 23:14:49 +01:00
CedricMocquillon
2d3d22025a Avoid height for empty message in AutoSizedTextBox 2020-12-07 14:57:25 +01:00
Petr Mikheev
5734551ff3 Add time to logs. Redirect OSG log to OpenMW log. 2020-12-05 13:46:02 +01:00
AnyOldName3
48f397f168 Remove existing shader when no longer required 2020-12-03 21:06:02 +00:00
AnyOldName3
5ad297e6ff Guarantee glow updater regenerates shaders on completion
Previously, it would edit the odd numbered stateset, then regenerate
shaders for the even-numbered one, then edit the even numbered one, and
regenerate shaders for the odd numbered one (or vice versa if it
finished during an even numbered frame). This would leave one of the
shader programs still trying to use the state that had been removed.
2020-12-03 18:41:32 +00:00
Alexei Dobrohotov
db9c174ca8 Make NIF particle node handling more generic 2020-11-30 12:33:18 +03:00
Andrei Kortunov
8084a336b5 Replace zeroes and nulls by nullptrs 2020-11-29 11:14:07 +04:00
AnyOldName3
86fad60c7d Merge branch 'roots' into 'master'
Handle multiple root nodes (bug #5604)

Closes #5604

See merge request OpenMW/openmw!428
2020-11-29 01:25:22 +00:00
psi29a
dc1bd8ec29 Merge branch 'osgAnimation_basics' into 'master'
Collada animation support

See merge request OpenMW/openmw!421
2020-11-28 16:55:26 +00:00
Nelsson Huotari
55dcc6582a Don't duplicate getFileExtension, use OpenMW's namespaces 2020-11-28 15:03:10 +02:00
Alexei Dobrohotov
5b6377b061 Handle multiple root nodes (bug #5604) 2020-11-28 13:25:39 +03:00
Andrei Kortunov
4acd910b37 Rework file error messages handling 2020-11-26 18:53:56 +04:00
Nelsson Huotari
08dcbe30b3 Earlier nullptr check 2020-11-20 19:46:08 +02:00
Nelsson Huotari
3232faa703 Use const ref instead of value 2020-11-20 19:41:01 +02:00
Nelsson Huotari
32d4344803 Don't copy osga-data in base class keyframecontroller, fix warnings. 2020-11-20 19:38:29 +02:00
psi29a
f95d2cf54c Merge branch 'update_recastnavigation' into 'master'
Update recastnavigation

See merge request OpenMW/openmw!420
2020-11-19 06:44:46 +00:00
Nelsson Huotari
6e77ad1f6a OSG-Collada animation support 2020-11-19 01:11:56 +02:00
Nelsson Huotari
f78a5d795c Separate keyframes logic to provide basis for osgAnimation integration. 2020-11-18 22:48:47 +02:00
AnyOldName3
37661bffea Merge branch 'shadowdisable-fix' into 'master'
Make disableShadowsForStateSet a no-op when shadows are disabled

See merge request OpenMW/openmw!205
2020-11-18 18:56:36 +00:00
elsid
9b11b8a27b
Fix boundary check 2020-11-18 18:52:00 +01:00
AnyOldName3
7768556ce6 Set dummy state when disabling shadows indoors
As we don't reconfigure all shaders without shadows when we disable them
indoors (as it'd probably add a hitch to transitioning in and out) we
need to set up dummy state so the shaders don't do anything illegal.

This hadn't had symptoms for most objects as when indoors, nearly
everything would be drawn first in one of the water RTTs, which had
dummy state to disable shadows already. This wasn't true of the water
plane itself, though, yet somehow it took until just now for anyone to
report that.

This resolves vtastek's issue where the water would be invisible indoors
2020-11-16 21:01:20 +00:00
psi29a
6064d3e741 Merge branch 'boundingvolume' into 'master'
Read NIF bounding volume data correctly

See merge request OpenMW/openmw!407
2020-11-14 13:19:29 +00:00
Alexei Dobrohotov
df9667e923 Read NIF bounding volume data correctly 2020-11-14 14:16:29 +03:00
psi29a
37e81f0df8 Merge branch 'redirection-fix' into 'master'
Only reroute stdout etc. to new console if not already redirected

Closes #5650

See merge request OpenMW/openmw!408
2020-11-14 09:30:57 +00:00
AnyOldName3
89d73c5fc7 Only reroute stdout etc. to new console if not already redirected
This should fix the issue where Windows Release builds (compiled as
/SUBSYSTEM:WINDOWS instead of /SUBSYSTEM:CONSOLE) can't have their
output redirected.

Basically, a console application creates a console if not given one, so
you get a console window behind OpenMW while it's running. It was
decided that this was ugly, so we set Release builds to be windows
applications, which don't get an automatic console and don't
automatically connect to a console if given one anyway.

Of course, we still wanted to actually be able to print to a console if
given one, so we manually attach to the parent process' console if it
exists, then reopen the standard streams connected to CON, the Windows
pseudo-file representing the current console.

This is a little like connecting a second wire into a dumb terminal in
that you're pumping characters into the display rather than onto a
pipeline, so output can't be redirected.

It turns out, though, that if a /SUBSYSTEM:WINDOWS application has its
standard streams redirected by the calling process, it still gets its
handles as normal, so everything starts off connected just how we want
it and we were clobbering this good setup with the straight-to-console
fix.

All we need to do to fix that is check if we've got valid standard
handles and that they go somewhere useful, and if so, avoid reopening
them once the console is attached. Simples.
2020-11-14 02:04:46 +00:00
Alexei Dobrohotov
117697ea22 Fix NiStringPalette loading 2020-11-14 01:12:32 +03:00
Alexei Dobrohotov
8a6d3d1b4f Minor fixes
Fix extra semicolon
Disable collision avoidance if AI is disabled
2020-11-13 22:53:12 +03:00
AnyOldName3
981fffe590 Merge branch 'itsakindoftemplatemagic' into 'master'
Fix MSVC2017 builds

See merge request OpenMW/openmw!404
2020-11-13 17:22:22 +00:00
AnyOldName3
1e0df23d14 Merge branch 'shadows-bin' into 'master'
Use a custom renderbin to avoid pointless OpenGL state switches

See merge request OpenMW/openmw!402
2020-11-13 16:29:41 +00:00
Evil Eye
94c89e6d5e check ValueTs 2020-11-13 16:41:45 +01:00
AnyOldName3
fcfd340c69 Actually copy alpha blended drawables to the new stategraph 2020-11-12 23:23:40 +00:00
Evil Eye
d8897c4509 remove inline and use enable_if_t 2020-11-12 20:46:45 +01:00
Evil Eye
d8d4351962 fix MSVC2017 builds 2020-11-12 19:45:32 +01:00
AnyOldName3
55f65752fd Don't bind unnecessary colour buffer when drawing shadow maps 2020-11-12 17:55:10 +00:00
AnyOldName3
cdbf19a508 Tidy up run-on lines 2020-11-12 17:04:23 +00:00
AnyOldName3
296dce470a Spelling fix 2020-11-12 16:58:29 +00:00
AnyOldName3
72f7e6a702 Handle all shadow alpha uniforms in shadowsbin 2020-11-12 00:26:30 +00:00
AnyOldName3
5d046bc95d Mark override 2020-11-11 14:58:06 +00:00
Alexei Dobrohotov
a46699fb1e Handle NiGeomMorpherController interpolator list 2020-11-10 23:23:11 +03:00
Alexei Dobrohotov
f3f5dcb016 Read a few more NIF types
NiFloatInterpolator, NiPoint3Interpolator, NiTransformInterpolator, NiBoolInterpolator
Update a few existing controller records
Update NiSkinInstance
2020-11-10 22:37:39 +03:00
psi29a
ed8342ebc9 Merge branch 'niffile' into 'master'
Remove NIFFile settings manager dependency

See merge request OpenMW/openmw!398
2020-11-10 09:03:10 +00:00
Alexei Dobrohotov
c857588ee9 Remove NIFFile settings manager dependency 2020-11-09 14:24:48 +03:00
Alexei Dobrohotov
b523574090 Remove shader visitor settings manager dependency 2020-11-09 13:59:59 +03:00
Alexei Dobrohotov
1d07361f08 Read a few more NIF types
BSXFlags, NiTransformData, BSBound, BSFadeNode, bhkBlendController
2020-11-09 00:19:35 +03:00
Alexei Dobrohotov
a38c629425 Read NiSkinPartition 2020-11-08 13:23:18 +03:00
Alexei Dobrohotov
afea11b70a Read NiStringPalette and NiBoolData 2020-11-08 13:23:18 +03:00
Alexei Dobrohotov
c79f509652 Misc NIF loader improvements
Bullet NIF loader cleanup
Collect all extra records of a node
Remove code duplication in geometry type detection in OSG-side NIF loader
2020-11-08 13:23:18 +03:00
Alexei Dobrohotov
7e63afdecf Allow loading arbitrary NIF files 2020-11-08 13:23:18 +03:00
Alexei Dobrohotov
53f91a3aa5
Merge pull request #3018 from akortunov/emplace
Use emplace_back instead of push_back
2020-11-01 01:58:56 +03:00
AnyOldName3
449506fef1 Attempt to explain what shadowsbin is doing 2020-10-31 19:06:20 +00:00
Andrei Kortunov
64ba81ecf2 Fix some issues, found by CoverityScan 2020-10-28 18:02:31 +04:00
Andrei Kortunov
00503d86e1 Try to disable CoverityScan warning in code with explanation 2020-10-28 18:01:42 +04:00
AnyOldName3
5869ac71e3 Merge all composing variables, not just those in destination already
This resolves a regression where the local openmw.cfg doesn't exist, so
we fall back to the global openmw.cfg, but because we've not loaded
anything from the local openmw.cfg, there are no variables with which to
merge.
2020-10-28 00:36:49 +00:00
psi29a
3ccb424faf Merge branch 'nifstuff' into 'master'
Try to fix macOS build

See merge request OpenMW/openmw!378
2020-10-26 13:32:19 +00:00
Alexei Dobrohotov
7e521788e9 Try to fix build 2020-10-26 15:09:31 +03:00
psi29a
fa9278e25b Merge branch 'boost_min_ver' into 'master'
set minimal boost version; remove #ifdef boost version checks

See merge request OpenMW/openmw!376
2020-10-26 08:13:24 +00:00
psi29a
ff6f0413f0 Merge branch 'nifstuff' into 'master'
Minor NIF fixes and cleanup

See merge request OpenMW/openmw!377
2020-10-26 08:12:49 +00:00
Bret Curtis
175e29af00
Merge pull request #3022 from akortunov/shaders
Allow to assign custom shaders to nodes
2020-10-26 09:07:13 +01:00
Alexei Dobrohotov
4fc5e22e9e NIF fixes and cleanup
Get rid of NodeIndexHolder
Use unsigned 32-bit type for NIF record index
Fix calculation of the number of UV sets
2020-10-26 02:51:25 +03:00
Bret Curtis
4032b754e4 set minimal boost version; remove #ifdef boost version checks 2020-10-25 22:43:10 +01:00
Alexei Dobrohotov
a78aa6b22c Merge branch 'nipixeldata' into 'master'
Clean up palettized NiPixelData loading

See merge request OpenMW/openmw!374
2020-10-25 21:22:15 +00:00
Andrei Kortunov
660df19ff7 Allow to assign custom shaders to nodes 2020-10-25 18:22:16 +04:00
unknown
71e78c66cd Re-add missing includes removed in 5a824d0333 2020-10-25 14:33:23 +01:00
Alexei Dobrohotov
71056c6014 Clean up palettized NiPixelData loading 2020-10-25 14:37:29 +03: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
psi29a
957a1425d1 Merge branch 'cleanup_1' into 'master'
Cleanup 1

See merge request OpenMW/openmw!365
2020-10-24 18:43:03 +00:00
psi29a
fb63f8058f Merge branch 'hash' into 'master'
Rewrite compressed BSA hash calculation again

See merge request OpenMW/openmw!368
2020-10-23 19:55:53 +00:00
Alexei Dobrohotov
45c155b054 Rewrite compressed BSA hash calculation again 2020-10-23 21:19:58 +03:00
AnyOldName3
f7dddb8857 Merge branch '3' of https://gitlab.com/bzzt/openmw into shadows-bin
This won't actually work.
2020-10-23 17:55:15 +01:00
AnyOldName3
538314b03a Make path settings have path type 2020-10-23 15:34:41 +01:00
AnyOldName3
f57851587d Fix edge case where FallbackMap has no comma 2020-10-23 13:16:51 +01:00
AnyOldName3
ce0966b9b7 Improve validate implementation 2020-10-23 13:13:47 +01:00
AnyOldName3
350f6e61f7 Move FallbackMap validator implementation to source file 2020-10-23 13:03:36 +01:00
AnyOldName3
8b28b6e55e Compose BSA, context and script blacklist lists
These would only take their value from the highest priority source, so
specifying `openmw --content anExtraEsp.esp` would override all the
content files in the user cfg file, and the user cfg file would override
any in the global/local one.
2020-10-23 01:58:43 +01:00
AnyOldName3
fca8634b74 Remove debugging lines 2020-10-23 01:46:49 +01:00
AnyOldName3
cf81f1bbb7 Make composing variables compose in the expected order 2020-10-23 01:41:28 +01:00
Bret Curtis
5aa053c53e components/compiler/streamerrorhandler.cpp needs sstream for MacOS 2020-10-23 00:13:51 +02:00
Bret Curtis
e51ca542d4 components/config cleanup 2020-10-23 00:03:14 +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
Bret Curtis
5475e696c8 components/bullethelpers cleanup; removed warnings by using override 2020-10-22 22:46:18 +02:00
Bret Curtis
d826fbdadf components/bsa cleanup 2020-10-22 22:39:59 +02:00
AnyOldName3
6c311f4a3d Partially revert 3a912485
While it solved the bug it was supposed to, it caused a regression where
the user config could no longer override the global config.
2020-10-22 21:38:22 +01:00
fredzio
1357bba0a0 Use some C++17 where it makes the code more readable
Also replace boost::optional
2020-10-22 07:15:16 +02:00
Bret Curtis
82431b752d removed unnessary bits that cmake should be doing for us; replace Misc::gcd with std::gcd 2020-10-20 23:38:05 +02:00
WW
d39aef3f5a Changed LZ4F_dctx* to LZ4F_decompressionContext_t for better compatibility. 2020-10-20 15:15:29 +00:00
Alexei Dobrohotov
1492ba4a53 Link against LZ4::LZ4 2020-10-19 22:36:02 +03:00
Alexei Dobrohotov
66d2b9c195 Add Skyrim SE BSA version support
Fix embedded file name loading
2020-10-19 22:31:42 +03:00
Andrei Kortunov
065ed5138e Use emplace_back instead of push_back 2020-10-18 10:27:35 +04:00
Andrei Kortunov
d7fadc933f Fix override warning with MyGUI 3.4 2020-10-18 10:02:25 +04:00
Bret Curtis
8050882baf
Merge pull request #3015 from akortunov/overrides
Mark overrided methods as overrides
2020-10-17 13:32:08 +02:00
AnyOldName3
df178ed97c Merge branch 'container-regressions' into 'master'
Fix container regressions

See merge request OpenMW/openmw!346

(cherry picked from commit b0aee6f83d4cddb0116284b197913f9687dd9cee)

95e7a22d fix container regressions
2020-10-16 22:55:10 +00:00
Andrei Kortunov
8ca3c3b123 Mark overrided methods by override keyword 2020-10-16 22:18:54 +04:00
psi29a
c16fa27407 Merge branch 'async-physics' into 'master'
Async physics

See merge request OpenMW/openmw!248
2020-10-15 08:34:26 +00:00
fredzio
3c2504b442 Process movement queue in one or several background threads
Before movement calculation, the main thread prepare a
vector of ActorFrameData, which contains all data necessary to perform
the simulation, and feed it to the solver. At the same time it fetches
the result from the previous background simulation, which in turn is
used by the game mechanics.
Other functions of the physics system (weapon hit for instance)
interrupt the background simulation, with some exceptions described
below.

The number of threads is controlled by the numeric setting

[Physics]
async num threads

In case 'async num threads' > 1 and Bullet doesn't support multiple threads,
1 async thread will be used. 0 means synchronous solver.
Additional settings (will be silently switched off if async num threads = 0)

[Physics]
defer aabb update

Update AABBs of actors and objects in the background thread(s). It is not an especially
costly operation, but it needs exclusive access to the collision world, which blocks
other operations. Since AABB needs to be updated for collision detection, one can queue
them to defer update before start of the movement solver. Extensive tests on as much
as one installation (mine) show no drawback having that switched on.

[Physics]
lineofsight keep inactive cache

Control for how long (how many frames) the line of sight (LOS) request will be kept updated.
When a request for LOS is made for the first time, the background threads are stopped to
service it. From now on, the LOS will be refreshed preemptively as part of the background
routine until it is not required for lineofsight keep inactive cache frames. This mean
that subsequent request will not interrupt the background computation.
2020-10-15 06:41:35 +02:00
fredzio
4ea07639b8 Unbreak build with cmake < 3.12
This reverts commit 3cadc16f88.
2020-10-14 06:15:23 +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
Bret Curtis
c99be77a32
Merge pull request #3008 from akortunov/strings
Rework fixed strings handling
2020-10-13 17:37:48 +02:00
psi29a
82736f013d Merge branch 'objectlib' into 'master'
Convert components to an object library.

See merge request OpenMW/openmw!342
2020-10-13 13:32:43 +00: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
3cadc16f88 Convert components to an OBJECT library. It saves space in the object
directory (about 1G on an optimized build on Windows and BSD).
Build should run somewhat fast as well.
2020-10-13 14:10:52 +02:00
Bret Curtis
11c938b176
Merge pull request #3011 from elsid/navmesh_fixes
Navmesh fixes
2020-10-12 11:22:26 +02:00
fredzio
460e69e92a Get rid of warning: dynamic exception specifications are deprecated 2020-10-10 12:12:55 +02:00
Alexei Dobrohotov
05cd005b30 Fix NiTriStripsData loading 2020-10-09 19:37:54 +03:00
Alexei Dobrohotov
9f08dc9968 Revert "Merge branch 'skinning' into 'master'"
This reverts merge request !327
2020-10-08 23:24:28 +00: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
Alexei Dobrohotov
6be808e301 RigGeometry: convert some pairs to structs 2020-10-08 03:05:59 +03:00
psi29a
ee22081ae1 Merge branch 'nifgobrrrr' into 'master'
More NIF stuff

See merge request OpenMW/openmw!324
2020-10-07 10:22:56 +00:00
psi29a
bca698d951 Merge branch 'shader_line_numbering' into 'master'
Correctly resetting line numbering during shader processing.

See merge request OpenMW/openmw!317
2020-10-07 07:16:45 +00:00
Alexei Dobrohotov
df1014303d Add more generic extra data NIF types 2020-10-06 21:21:55 +03:00
Alexei Dobrohotov
302d8eed27 Clean up Roll- and FlipController implementation 2020-10-06 20:47:06 +03:00
Alexei Dobrohotov
0d02a3392a Clean up 2020-10-06 20:36:10 +03:00
Alexei Dobrohotov
e7c37f21b7 Add NiFloatInterpController abstraction 2020-10-06 20:24:05 +03:00
Andrei Kortunov
822764d0fa Rework fixed strings handling 2020-10-05 21:52:22 +04:00
Alexei Dobrohotov
29ccb09da5 Introduce some extended NIF definitions 2020-10-04 13:18:56 +03:00
Mads Buvik Sandvei
d5450a7d88 Correctly resetting line numbering during shader processing. 2020-10-03 14:22:34 +02:00
Alexei Dobrohotov
4e22c2687f niffile.cpp cleanup 2020-10-02 21:50:54 +03:00
psi29a
4faaa86449 Merge branch 'cyclic_includes' into 'master'
More accurate detection of cyclic includes

See merge request OpenMW/openmw!281
2020-09-30 05:39:28 +00:00
AnyOldName3
a338e8c561 Actually set the uvSet value
This got lost when uvSet was made into a local variable.
2020-09-24 17:13:09 +01:00
AnyOldName3
390fb4f12e Disable OpenGL Debug stuff when SDL doesn't provide the necessary definitions 2020-09-21 00:49:09 +01:00
psi29a
22c3588d0d Merge branch '4771-and-4631' into 'master'
Try lower MSAA level if the requested value isn't available

Closes #4471 and #4631

See merge request OpenMW/openmw!297

(cherry picked from commit b3db387512340a5e9a77427c2d7d9d88c2340056)

da0aef7a Retrieve SDL OpenGL attributes after context creation
a51e63b3 Try lower MSAA levels if OpenGL context doesn't have what we requested
c4e92a0a Update CHANGELOG.md
2020-09-20 12:35:26 +00:00
psi29a
87028e1640 Merge branch 'flipping-heck' into 'master'
Make NiFlipControllers only affect base texture

Closes #2069

See merge request OpenMW/openmw!301
2020-09-20 12:20:18 +00:00
AnyOldName3
3f61ff3a44 Make OpenGL debugging optional 2020-09-19 23:30:34 +01:00
AnyOldName3
441c09578a Merge remote-tracking branch 'origin/khr_debug' into khr_debug 2020-09-19 23:09:11 +01:00
AnyOldName3
b2cb98d30e Fix NiFlipController
NiFlipControllers *always* affect the base texture, even if no base
texture is bound. When no base texture is bound, they default to UV set
zero and to having wrapped UV coordinates, instead of using the settings
for the disabled base texture.
2020-09-16 23:03:42 +01:00
AnyOldName3
85b5fdee35 Discard the alpha channel of 16-bit TGAs, just like Morrowind 2020-09-12 00:20:44 +01:00
Andrei Kortunov
9f1fbd56a3 Fix SummonKey comparison function 2020-09-04 13:45:38 +04:00
Andrei Kortunov
67eace1028 Use struct instead of tuple 2020-08-29 11:24:08 +04:00
Andrei Kortunov
924f634bda Support for multiple summons with same ID in the single spell 2020-08-28 21:14:54 +04:00
psi29a
f90a049702 Merge branch 'movement_refactoring' into 'master'
Refactoring related to "smooth movement"

See merge request OpenMW/openmw!285

(cherry picked from commit 6eaf0a389d5aed3b74ab1a7cf89574612f964bdf)

e847b4c8 Split getSpeed() to getMaxSpeed() and getCurrentSpeed()
a96c46bc Refactor calculation of movement.mSpeedFactor
03ee9090 Use getMaxSpeed instead of getCurrentSpeed where it makes sense.
a178af5c Create helper functions `normalizeAngle` and `rotateVec2f`
2020-08-27 11:54:30 +00:00
AnyOldName3
fd14dad789 const osg::ref_ptf reference should be faster than value as constructor and destructor are non-trivial
I played around in GodBolt and got into an argument to determine this. The difference will be immeasurably small, but my curiosity has been satisfied.
2020-08-20 03:01:43 +01:00
AnyOldName3
707204133d Double-buffer shadow uniforms that change each frame 2020-08-20 00:38:13 +01:00