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
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
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
264539cd63
Merge branch 'WindowCrashCatcher' into 'master'
...
Handle Crashes on Windows
See merge request OpenMW/openmw!455
2020-12-18 13:41:18 +00:00
Alexei Dobrohotov
46ec40fa92
Make sure NIFLoader avoids working further with empty geometry
2020-12-18 01:22:34 +03: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