Commit Graph

28226 Commits (62f023737615e00a04cdc618f6f1d05b07080d3b)
 

Author SHA1 Message Date
Andrei Kortunov c54ef55ebb Revert "Replace raw pointer by observer_ptr to avoid dangling pointer dereferencing"
This reverts commit 5373cf1cd5.
4 years ago
Andrei Kortunov c11774f278 Do not trigger in-game bindings via mouse buttons when controls are disabled (bug #6047) 4 years ago
psi29a b583c2300c Merge branch 'maybe-fix#5551' into 'master'
Fix #5551

Closes #5551

See merge request OpenMW/openmw!802
4 years ago
psi29a 405e634e09 Merge branch 'fix_light_manager_ub' into 'master'
Fix UB in light initialization

See merge request OpenMW/openmw!877
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
Bret Curtis 46da65a568
Merge pull request #3091 from akortunov/master
Discard button press events during save loading
4 years ago
AnyOldName3 c2e4eda825 Merge branch '6013-fix' into 'master'
Retain draw callback

Closes #6013 and #5967

See merge request OpenMW/openmw!875
4 years ago
madsbuvi f3e17e7c52 Don't redundantly call notify on every frame. 4 years ago
Andrei Kortunov e38063dcdb Discard button press events during save loading (bug #5619) 4 years ago
Frederic Chardon 62c7adc87b Merge branch 'no_at_boundaries' into 'master'
Don't use at() instead [] when length is checked/known

See merge request OpenMW/openmw!866
4 years ago
Frederic Chardon 38db2f8810 Merge branch 'includes_mwgui' into 'master'
Remove some useless includes from apps/openmw/mwgui

See merge request OpenMW/openmw!870
4 years ago
madsbuvi 5b9a2b73b0 Retain final draw callback as a member variable in ScreenshotManager, and do not call setFinalDrawCallback after init. 4 years ago
Frederic Chardon 807c7a2025 Merge branch 'useless_includes_mwmechanics' into 'master'
Remove some useless headers in apps/openmw/mwmechanics

See merge request OpenMW/openmw!871
4 years ago
fredzio 5b63019719 Embed actor velocity inside its class. It makes the code simpler. 4 years ago
fredzio c55db790f3 Make the code less verbose / more readable using for range loop and
structured binding.

No functional changes.
4 years ago
Frederic Chardon 730f1fe2a7 Merge branch 'useless_includes_mwphysics' into 'master'
Remove some useless includes in apps/openmw/mwphysics

See merge request OpenMW/openmw!872
4 years ago
jvoisin 9373e4ada7 Remove some useless includes in apps/openmw/mwphysics 4 years ago
jvoisin 9522a64e7d Remove some useless includes from apps/openmw/mwgui 4 years ago
jvoisin 1cd15613a6 Remove some useless headers in apps/openmw/mwmechanics 4 years ago
psi29a 3d61d7ec9a Merge branch 'optimize_initial_load' into 'master'
Optimize engine initial loading time

See merge request OpenMW/openmw!867
4 years ago
Evil Eye 6cb6461cba Merge branch 'const_ref_it' into 'master'
Use const references when possible in for loops

See merge request OpenMW/openmw!869
4 years ago
Frederic Chardon faaf814fbc Merge branch 'unused_struct' into 'master'
Remove an unused struct

See merge request OpenMW/openmw!868
4 years ago
jvoisin 7deb6a6ffd Use const references when possible in for loops
No need for useless copies.
4 years ago
jvoisin c1e3869f25 Remove an unused struct 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
elsid 9938af2289
Use unordered_map for ref count
Reduces ESMStore::countRecords time by 8%.
4 years ago
elsid 6248dc72cb
Convert to lower case only when needed 4 years ago
elsid f2188d2533
Reduce temporary allocations on ESM loading
By moving objects instead of copying when possible.
4 years ago
Andrei Kortunov b717103fe0 Fix warning in assert - size_t can not be negative 4 years ago
Bret Curtis 8a315b01ae
Merge pull request #3089 from xyzz/fix-journalbooks-ub
Fix out-of-bounds access in JournalBooks::createCyrillicJournalIndex
4 years ago
psi29a a1b96cb9cc Merge branch 'fix_dangling_light_manager' into 'master'
Replace raw pointer by observer_ptr to avoid dangling pointer dereferencing (#6044)

Closes #6044

See merge request OpenMW/openmw!865
4 years ago
Bret Curtis d0329d3dd9
Merge pull request #3088 from akortunov/weapon_sheathing
Disable shield animation when we launch a torch one
4 years ago
Ilya Zhuravlev 13f060623f Fix out-of-bounds access in JournalBooks::createCyrillicJournalIndex 4 years ago
jvoisin 690d85d0e9 Don't use at() instead [] when length is checked/known 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
Andrei Kortunov b63f53f5bb Disable shield animation when we launch a torch one (bug #6043) 4 years ago
AnyOldName3 5d83de189a Merge branch 'insert_or_assign' into 'master'
Use insert_or_assign() instead of hand rolled version.

See merge request OpenMW/openmw!862
4 years ago
fredzio fb344d27e0 Use insert_or_assign() instead of hand rolled version. 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
AnyOldName3 a46f217afb Merge branch 'correct_particle_quota' into 'master'
Use NiParticleData info for particle system quota

Closes #6028

See merge request OpenMW/openmw!855
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 3944648f0b Merge branch 'opencs_remove_inclde' into 'master'
Remove some superfluous includes in the opencs

See merge request OpenMW/openmw!829
4 years ago
jvoisin 06ae26037f Remove some superfluous includes in the opencs 4 years ago
AnyOldName3 82bd88c818 Merge branch 'update-bullet2' into 'master'
Update extern Bullet to 3.17

See merge request OpenMW/openmw!854
4 years ago
Gleb Mazovetskiy bdfbf01772 Update extern Bullet to 3.17
Includes performance improvements that affect OpenMW:

* https://github.com/bulletphysics/bullet3/pull/3287
* https://github.com/bulletphysics/bullet3/pull/3293
4 years ago