Commit Graph

5127 Commits (84721fb58a2691d6e557bee38527e5a8a304acbf)

Author SHA1 Message Date
elsid 22c2f106b7
Store object tiles position as sorted vector instead of set 4 years ago
elsid f4f9fa4701
Limit oscillating recast mesh object AABB by tile bounds
AABB change outside recast mesh tile should not affect navmesh for this tile.
4 years ago
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.
4 years ago
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.
4 years ago
Alexei Dobrohotov 6a7bc208de Merge branch 'dont_assign' into 'master'
Don't assign a variable passed by value

See merge request OpenMW/openmw!897
4 years ago
Dobrohotov Alexei e68a454fd8 More ESM cleanup 4 years ago
jvoisin e51669c05d Don't assign a variable passed by value 4 years ago
CedricMocquillon 86d137363e Check if the archive is opened before adding a file to it and clear state on close 4 years ago
CedricMocquillon b61249841e Update lookup only after sorting files 4 years ago
psi29a c4fde03542 Merge branch 'ObjectPagingMergeIssue' into 'master'
Share state

See merge request OpenMW/openmw!879
4 years ago
Alexei Dobrohotov fea5c0ac1a Merge branch 'armour_error_fix' into 'master'
Fixed data subrecord name for Armour record used in error

See merge request OpenMW/openmw!882
4 years ago
CedricMocquillon d11a6bd92c Share state 4 years ago
Bret Curtis 523edd0723
Merge pull request #3093 from akortunov/light_crash
Fix crashes on exit in LightManager
4 years ago
psi29a e73c0f92b8 Merge branch 'fix_present_tile_crash' into 'master'
Add missing synchronization for present tiles modification

See merge request OpenMW/openmw!878
4 years ago
psi29a 4bc7012104 Merge branch 'pack-default-settings' into 'master'
Pack default settings

Closes #5925

See merge request OpenMW/openmw!822
4 years ago
AnyOldName3 4cedb3549b Decode base64-packed settings files 4 years ago
Benjamin Winger 21f04f0d0f
Fixed data subrecord name for Armour record used in error 4 years ago
Benjamin Winger 41cfcfdc0f
Display Race record height/weight as a float 4 years ago
AnyOldName3 081650a2e5 Integrate Base64 library with build 4 years ago
elsid a73ffc25c3
Add missing synchronization for present tiles modification
insert/erase can be done from multiple threads simultaneously. mMutex is
already used to synchronize reads so use it for writes too.
4 years ago
psi29a f1f1703441 Merge branch 'fix_navmesh_wait' into 'master'
Fix redundant waiting until navmesh is generated

See merge request OpenMW/openmw!861
4 years ago
Andrei Kortunov 11c57978b6 Fix crashes on exit in the LightManager (bug #6044) 4 years ago
Andrei Kortunov c54ef55ebb Revert "Replace raw pointer by observer_ptr to avoid dangling pointer dereferencing"
This reverts commit 5373cf1cd5.
4 years ago
elsid d520b440aa
Copy LightBuffer data into a new object when changing layout
Before this change LightBuffer copy constructor copied only mData pointer into
a new object. Then memcpy was applied to an overlapping source and destination
that is UB.

Replace configureLayout function by a special constructor. That copies all
mData values and a pointer to a buffer object into a newly allocated object.
4 years ago
Bret Curtis fef9e91510
Merge pull request #3090 from akortunov/warnfix
Fix warning in assert - size_t can not be negative
4 years ago
Andrei Kortunov e38063dcdb Discard button press events during save loading (bug #5619) 4 years ago
elsid 1e2aae8095
Use stable sort+unique to collect RefIDs for ESMStore records counting
The idea is to avoid std::map lookup for each CellRef. Instead generate a
sequence of added and removed RefNums into a vector then order them by RefNum
using a stable sort that preserves relative order of elements with the same
RefNum. RefIDs are stored in a different vector to avoid std::string move ctor
calls when swapping elements while sorting. Reversed iteration over added and
removed RefNums for each unique RefNum is an equivalent to what map-based
algorithm produces. The main benefit from sorting a vector is a data locality
that means less cache misses for each access. Reduces ESMStore::countRecords
perf cycles by 25%.
4 years ago
Andrei Kortunov b717103fe0 Fix warning in assert - size_t can not be negative 4 years ago
elsid 5373cf1cd5
Replace raw pointer by observer_ptr to avoid dangling pointer dereferencing
When game exit is requests when initial loading screen is active LightManager
can be destructed in the main thread before LightManagerStateAttribute::apply
is completed by different thread. Given that it uses raw pointer at some point
it becomes dangling because object is destructed this leads to UB and eventual
SIGSEGV.
4 years ago
elsid eeba92d48b Merge branch 'includes_detournavigator' into 'master'
Remove some superfluous includes in components/detournavigator

See merge request OpenMW/openmw!860
4 years ago
elsid 59f89d22f8
Apply min distance only for not present tiles
To avoid waiting when navmesh update is triggered by transformed object for
already present tiles.
4 years ago
elsid d0ea9c482a
Reorder async navmesh updater jobs when player tile changes
When player tile changes distance to player that is part of jobs priority is
invalidated. So jobs are no longer in the right order. This can lead to
processing of farests tiles first.

Sort queue each time player tile is changed.
4 years ago
Bret Curtis 66a527c3de
Merge pull request #3075 from akortunov/warnfix
Fix MSVC's C4244 and C4267 warnings
4 years ago
jvoisin 28d5e5e8be Remove some superfluous includes in components/detournavigator 4 years ago
glassmancody.info 4bbbbb00f6 use particle data for particle system quota 4 years ago
psi29a d843ec321e Merge branch 'DoNotSearchTwice' into 'master'
Search only in the niffilemanager for nif files

See merge request OpenMW/openmw!823
4 years ago
psi29a fd89582e0c Merge branch 'navmesh_wait' into 'master'
Wait until navmesh is generated within given distance around player (#5500)

Closes #5500

See merge request OpenMW/openmw!819
4 years ago
Petr Mikheev 4a7147e222 Merge branch 'constexpr_esm' into 'master'
Use a constexpr for esm cc

See merge request OpenMW/openmw!849
4 years ago
jvoisin bcd8190516 Fix a crash in aipackage.cpp 4 years ago
jvoisin 89f721fad3 Use a constexpr for esm cc 4 years ago
Andrei Kortunov 963e1b8b3f Fix MSVC's C4244 warnings 4 years ago
Andrei Kortunov f9d42ed396 Fix MSVC's C4267 warnings 4 years ago
Andrei Kortunov 54c8375672 Recreate a special case for IntersectionVisitor on QuadTreeWorld 4 years ago
Bret Curtis 340801e08b
Merge pull request #3084 from akortunov/master
Return check for distance when we try to reuse data
4 years ago
psi29a f7b8c817f8 Merge branch 'performance-faster-string-find' into 'master'
Fixing performance-faster-string-find issues

See merge request OpenMW/openmw!842
4 years ago
Andrei Kortunov 3e281f625d Return check for distance when we try to reuse data (bug #6026) 4 years ago
Thunderforge 339d347aea Fixing performance-faster-string-find issues
This addresses the Clang Tidy check [performance-faster-string-find](https://clang.llvm.org/extra/clang-tidy/checks/performance-faster-string-find.html).
4 years ago
Bret Curtis f84e9f5fb9
Merge pull request #3082 from akortunov/warnfix2
Add new scene nodes to scene graph serializer blacklist
4 years ago
AnyOldName3 09f39b29f0 Load defaults.bin instead of settings-default.cfg. Do not decode yet. 4 years ago
AnyOldName3 92325976e9 Update documentation to refer to defaults.bin 4 years ago
Petr Mikheev e65b285f06 Merge branch 'use_min' into 'master'
Use existing min implementation

See merge request OpenMW/openmw!828
4 years ago
elsid b806445a36
Use existing min implementation 4 years ago
Frederic Chardon caf382c19f Merge branch 'barrier' into 'master'
Do not store callback inside Misc::Barrier

See merge request OpenMW/openmw!821
4 years ago
Andrei Kortunov 2e8873af51 Add new scene nodes to scene graph serializer blacklist 4 years ago
psi29a 08e1a8e0fb Merge branch 'esm_opti' into 'master'
Teensy optimisation for esmtool

See merge request OpenMW/openmw!826
4 years ago
jvoisin 8a56ba6aaa Fix compilation 4 years ago
elsid fbeccc2908 Apply 1 suggestion(s) to 1 file(s) 4 years ago
Bret Curtis e720a56030
Merge pull request #3080 from akortunov/fix_ci
Add missing include for std::inserter
4 years ago
Andrei Kortunov 8d4a374516 Add missing include for std::inserter 4 years ago
psi29a 6263ade01a Merge branch 'esmcleanup' into 'master'
Minor ESM code cleanup

See merge request OpenMW/openmw!825
4 years ago
jvoisin e97e4d07dd Teensy optimisation for esmtool
- Use an unordered_set instead of a list to
  keep track of skipped records.
- Reduce the number of conditions when parsing 4-letters
  records by using a switch-case instead of cascading conditions.
- Add a const
4 years ago
CedricMocquillon a885134868 Do not search if it is not used 4 years ago
elsid 626e032931
Do not store callback inside Misc::Barrier
The only wait method can be provided with it so pass it as a template
parameter there.
4 years ago
CedricMocquillon 813b8ee0d1 Search only in the niffilemanager for nif files 4 years ago
CedricMocquillon e378159ea8 Use O(log(n)) search instead of O(n) 4 years ago
Dobrohotov Alexei 57c372a50e ESM code cleanup 4 years ago
elsid 7a51d0db18
Wait until navmesh is generated within given distance around player
Add a setting to change this distance.

To prevent situations when there is not enough navmesh generated and actors
can't find path correctly.
4 years ago
elsid f169f8e6f0
Wait until navmesh is generated for interior cells
Add special loading progress bar.

It should be fast enough to not keep loading screen for noticably long but
will provide better pathfinding for actors inside interior cells.
4 years ago
psi29a 110001d47f Merge branch 'nullroots' into 'master'
Improve null root handling

Closes #5963

See merge request OpenMW/openmw!818
4 years ago
Dobrohotov Alexei 19f0b80983 Improve null root handling 4 years ago
psi29a 6513c38875 Merge branch 'clean_navigator' into 'master'
Remove redundant and useless code from navigator

See merge request OpenMW/openmw!815
4 years ago
psi29a e94181b2b2 Merge branch 'constexpr' into 'master'
Sprinkle a couple of constexpr found by VS

See merge request OpenMW/openmw!800

(cherry picked from commit 5e8ea624bc85acebf457592dd10b790124ecf6ef)

5704b2ac Sprinkle a couple of constexpr found by VS
4 years ago
psi29a e6b097085b Merge branch 'const_ref' into 'master'
Sprinkle some const-ref to avoid unnecessary copies

See merge request OpenMW/openmw!803
4 years ago
elsid 87ada56edd Various fixes for niftest 4 years ago
elsid 865ef56a09
Replace include by RecastMesh forward declaration
To reduce dependency between navigator interface and implementation.
4 years ago
elsid ec87b3f8f7
Remove redundant ChunkyTriMesh
This AABB tree required when need to filter out input mesh that has not
influence navmesh tile output. This filtering is already done before. Each
recast mesh corresponds to a single navmesh tile and has appropriate bounds.
4 years ago
elsid bce06df254
Add missing array header 4 years ago
elsid 22aebcea74
Remove useless rcMarkWalkableTriangles call
It fills areas.data with walkable triangles but right after it's overwritten
and rcClearUnwalkableTriangles is called instead that fills areas.data with
unwalkable triangles.
4 years ago
Gleb Mazovetskiy e3a6cb1695 Remove OsIdentity.cmake
Removes the OsIdentity.cmake file and uses a cross-compilation friendly
and OS-independent method of detecting system double-precision bullet
instead.
4 years ago
psi29a 7f7041656d Merge branch 'enforce_double_bullet' into 'master'
Remove support for single-precision Bullet, fail during configuration instead of during linking (#5980)

See merge request OpenMW/openmw!806
4 years ago
fredzio 6fd04cb8f6 Remove support for single-precision Bullet, fail during configuration instead of during linking. 4 years ago
jvoisin d4d111a709 Don't use std::move on const 4 years ago
jvoisin d45184a730 Sprinkle some const-ref to avoid unnecessary copies 4 years ago
jvoisin 813969a46e Fix an off-by-one in windows_crashcatcher.cpp 4 years ago
Chris Djali f0cef87cd8
Merge pull request #3069 from akortunov/msvc_warnings
Rework warnings settings
4 years ago
psi29a 0e50349192 Merge branch 'uvcontroller' into 'master'
Fix NiUVController UV offset calculations (bug #5995)

Closes #5995

See merge request OpenMW/openmw!795
4 years ago
Dobrohotov Alexei 971ba81ed2 Use higher level transformations in UVController 4 years ago
Alexei Dobrohotov e9ff90f3de Merge branch 'pgrd_overflow' into 'master'
Fix a heap overflow in loadpgrd.cpp

See merge request OpenMW/openmw!784
4 years ago
jvoisin 5f65583a3a Fix a heap overflow in loadpgrd.cpp 4 years ago
Dobrohotov Alexei 24f4bf9c28 Fix NiUVController UV offset calculations (bug #5995) 4 years ago
Andrei Kortunov 18a4c81b5c Merge branch 'fix_toggleborders' into 'master'
Fix ToggleBorders debug view with 'Shaders' lighting method

See merge request OpenMW/openmw!792
4 years ago
AnyOldName3 ceb6a280ff Fix typo
Hopefully this will actually let us make better use of shadow bounds,
but I wouldn't count on it.
4 years ago
glassmancody.info 9f314d1d6f Fix ToggleBorders 4 years ago
Roman Siromakha 68ddde84fe
Merge pull request #3074 from akortunov/warnfix
Declare separate constructors with const reference and rvalue arguments for OscillatingRecastMeshObject
4 years ago
psi29a 16bb3919d1 Merge branch 'navmesh_cache_simplification' into 'master'
Simplify navmesh cache

See merge request OpenMW/openmw!691
4 years ago
Andrei Kortunov 0bc0cfce5f Declare separate constructors with const reference and rvalue arguments for OscillatingRecastMeshObject 4 years ago
Evil Eye abb120b439 Don't log a warning for reading to the end of the subrecord 4 years ago
Alexei Dobrohotov add04a4ea0 Merge branch 'fix_esm' into 'master'
Fix a read head-buffer-overflow in esm

See merge request OpenMW/openmw!751
4 years ago
Andrei Kortunov 6d351b2bdd Fix MSVC 4706 warnings 4 years ago
Andrei Kortunov 2d869ca9ff Fix node masks signed/unsigned mismatch 4 years ago
Bret Curtis 50d6cd2a34
Merge pull request #3070 from akortunov/coverity
Fix an another portion of Coverity warnings
4 years ago
Bret Curtis c6c92b5712
Merge pull request #3071 from akortunov/master
Fix an another batch of MSVC complaints
4 years ago
AnyOldName3 ff46eceabe Merge branch 'maybe-reintroduce-5904' into 'master'
Fix crash on startup

See merge request OpenMW/openmw!709
4 years ago
Andrei Kortunov d10399e083 Cast double constant to float explicitely 4 years ago
Andrei Kortunov 7d5c5f8a24 Do not assign negative values to unsigned variables 4 years ago
Andrei Kortunov 9647b670e4 Do not declare unused variables 4 years ago
Andrei Kortunov 2009916dd8 Fix dead code 4 years ago
Bret Curtis befa3f587f
Merge pull request #3068 from akortunov/master
Clean up MSVC warnings
4 years ago
psi29a b645c1f4c0 Merge branch 'navmesh_ignore' into 'master'
Do not trigger NavMesh update when RecastMesh update should not change NavMesh (#4917)

See merge request OpenMW/openmw!762
4 years ago
elsid 3e67f5ffa5
Detect and ignore updates for oscillating objects
To avoid triggering NavMesh update when RecastMesh change should not change
NavMesh.

Based on the following assumption:
Given a set of transformations and a bounding shape for all these
tranformations, a new object transformation that does not change this
bounding shape also should not change navmesh if for all of this object
transformations resulting navmesh tiles are equivalent

The idea is to report back to RecastMeshManager all changes of NavMesh if there
are any assiciated with RecastMesh version. So we know the last time when
RecastMesh change resulted into the NavMesh change. When later report shows
that there was no NavMesh change for a new RecastMesh version we can assume
that any object transformation within the same bounding box should not change
NavMesh.
4 years ago
elsid 64fb700ae9
Remove unnecessary relation between updateCompoundObject and RecastMeshObject 4 years ago
elsid 629cedb6d0
Do not track last build revision in RecastMeshManger
mLastBuildRevision == mRevision with current use cases does not happen. But
even if this will happen when another use case will be added it does not save
much computation. The most expensive operation is not adding objects to the
MeshBuilder but to optimize resulting navmesh that will happen anyway in
MeshBuilder::create call.
4 years ago
psi29a 3423d3f882 Merge branch 'various_warn' into 'master'
Fix various warnings found by clang

See merge request OpenMW/openmw!758
4 years ago
elsid 62f32f4543
Do not replace equivalent navmesh tiles 4 years ago
jvoisin 032ba1e9a0 Fix the compilation 4 years ago
Andrei Kortunov 987b231fdd Fix an another portion of Coverity warnings 4 years ago
jvoisin c0f7e0d585 Use isnan 4 years ago
jvoisin 38316cdaf8 Fix various warnings found by clang
- unused alias
- inefficient use of push_back
- exceptions not inheriting from std::exception
- weird use of a comma
- value compared against itself
4 years ago
psi29a a69619a1e8 Merge branch 'where_is_my_log' into 'master'
Don't clobber game log file when we collect a stack trace.

See merge request OpenMW/openmw!755
4 years ago
jvoisin a35eae3dd1 Fix a read head-buffer-overflow in esm
The check forgot to account for the terminal zero.
4 years ago
fredzio 4058e117ca Don't clobber game log file when we collect a stack trace.
When the crash catcher catch a signal it forks to collect data about its
parent. In the process the child reinitialize the log file, which ends
up empty.
4 years ago
Andrei Kortunov f308dde254 Clean up MSVC warnings 4 years ago
psi29a d3c865d909 Merge branch 'fix_bsa' into 'master'
Add some validation for bsa parsing

Closes #5955

See merge request OpenMW/openmw!750
4 years ago
psi29a d0883f9a0d Merge branch 'light_settings_tweak' into 'master'
Lighting patch

Closes #5957 and #5959

See merge request OpenMW/openmw!752
4 years ago
glassmancody.info 16856d45c5 Lighting Patch
Fixes build errors with older OSG builds and some issues with 'shared' layout.
Bring back ambient in inventory through lightmodel instead of sun ambient, mirrors scene ambient/sunlight relationship.
Forces shaders when certain lighting methods are enabled and finalize settings.
Correctly override sun for localmap.
4 years ago
Evil Eye 80266d435c Merge branch 'fix_crash' into 'master'
Fix an off-by-one in loadscpt

See merge request OpenMW/openmw!728
4 years ago
jvoisin 47ced7dec4 Add some validation for bsa parsing
This should fix #5955
4 years ago
fredzio 16b288f53c Re-add dropped struct keyword to fix build.
rtprio is both a struct and a function, so we need to be explicit.

../../../components/misc/thread.cpp:53:9: error: must use 'struct' tag
to refer to type 'rtprio' in this scope
rtprio prio;
^
struct
/usr/include/sys/rtprio.h:91:5: note: struct 'rtprio' is hidden by a
non-type declaration of 'rtprio' here
int     rtprio(int, pid_t, struct rtprio *);
^
1 error generated.
4 years ago
psi29a c686dd05d0 Merge branch 'thread_idle_priority' into 'master'
Set idle priority for navmesh generation thread

See merge request OpenMW/openmw!632
4 years ago
Andrei Kortunov 33b8233887 Validate GUI scaling and place it to the launcher 4 years ago
elsid ab8d1c02d4
Set idle priority for navmesh generation thread
Support Linux, Windows, FreeBSD.
4 years ago
Andrei Kortunov 016a1d45df Remove outdated field - remnant from earlier implementation 4 years ago
Andrei Kortunov 0c7ddd3938 Remove redundant qualifiers 4 years ago
Andrei Kortunov ac347810ca Fix uninitialized field in the mouse event 4 years ago
Andrei Kortunov bce6effe95 Fix uninitialized variables in the LightManager 4 years ago
Andrei Kortunov e309f75938 Join variables declaration and usage 4 years ago
Andrei Kortunov 5f6f2c15b1 An another attempt to suppress Coverity warning about mkstemp 4 years ago
Andrei Kortunov 696cf9ab05 Extend variables range to avoid integer overflow 4 years ago
glassmancody.info 531a6e1979 Code review fixes, remove implicit GLSL casts 4 years ago
glassmancody.info 582f7b52cf Merge remote-tracking branch 'upstream/master' into why_are_the_christmas_lights_still_up 4 years ago
glassmancody.info 92033bca64 Fixed error in calculating viewspace sun dir, minor cleanup 4 years ago
glassmancody.info 9e80091aff clear up force shaders and make it less convoluted 4 years ago
glassmancody.info 8ce65232ff fix race condition with sun uniform 4 years ago
glassmancody.info d4e7d25d14 Make life not suck for whoever wants to edit lighting shaders 4 years ago
glassmancody.info eecb9886a9 Shader cleanup, fix indicies 4 years ago
glassmancody.info 4ba473b684 Finalize settings, torch fix 4 years ago
glassmancody.info 71c30a31df in-game settings, some require restart 4 years ago
glassmancody.info 3d713e8602 Fix incorrect minimum ambient 4 years ago
glassmancody.info 280fd2b162 Merge remote-tracking branch 'upstream/master' into why_are_the_christmas_lights_still_up 4 years ago
glassmancody.info d195602a9d Switch to shared layout, some rewording 4 years ago