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%.
2021-05-15 18:45:22 +02:00
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.
2021-05-15 15:23:28 +02:00
elsid
eeba92d48b
Merge branch 'includes_detournavigator' into 'master'
...
Remove some superfluous includes in components/detournavigator
See merge request OpenMW/openmw!860
2021-05-14 21:09:22 +00:00
Bret Curtis
66a527c3de
Merge pull request #3075 from akortunov/warnfix
...
Fix MSVC's C4244 and C4267 warnings
2021-05-14 21:28:56 +02:00
jvoisin
28d5e5e8be
Remove some superfluous includes in components/detournavigator
2021-05-14 20:45:59 +02:00
glassmancody.info
4bbbbb00f6
use particle data for particle system quota
2021-05-14 10:52:19 -07:00
psi29a
d843ec321e
Merge branch 'DoNotSearchTwice' into 'master'
...
Search only in the niffilemanager for nif files
See merge request OpenMW/openmw!823
2021-05-13 17:11:57 +00:00
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
2021-05-13 16:56:39 +00:00
Petr Mikheev
4a7147e222
Merge branch 'constexpr_esm' into 'master'
...
Use a constexpr for esm cc
See merge request OpenMW/openmw!849
2021-05-13 13:30:01 +00:00
jvoisin
bcd8190516
Fix a crash in aipackage.cpp
2021-05-13 14:19:12 +02:00
jvoisin
89f721fad3
Use a constexpr for esm cc
2021-05-12 22:35:00 +02:00
Andrei Kortunov
963e1b8b3f
Fix MSVC's C4244 warnings
2021-05-12 10:34:40 +04:00
Andrei Kortunov
f9d42ed396
Fix MSVC's C4267 warnings
2021-05-12 10:34:39 +04:00
Andrei Kortunov
54c8375672
Recreate a special case for IntersectionVisitor on QuadTreeWorld
2021-05-11 16:34:02 +04:00
Bret Curtis
340801e08b
Merge pull request #3084 from akortunov/master
...
Return check for distance when we try to reuse data
2021-05-11 11:30:23 +02:00
psi29a
f7b8c817f8
Merge branch 'performance-faster-string-find' into 'master'
...
Fixing performance-faster-string-find issues
See merge request OpenMW/openmw!842
2021-05-11 08:42:01 +00:00
Andrei Kortunov
3e281f625d
Return check for distance when we try to reuse data (bug #6026 )
2021-05-11 09:36:46 +04:00
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 ).
2021-05-10 22:44:07 -05:00
Bret Curtis
f84e9f5fb9
Merge pull request #3082 from akortunov/warnfix2
...
Add new scene nodes to scene graph serializer blacklist
2021-05-10 09:21:42 +02:00
Petr Mikheev
e65b285f06
Merge branch 'use_min' into 'master'
...
Use existing min implementation
See merge request OpenMW/openmw!828
2021-05-09 13:05:39 +00:00
elsid
b806445a36
Use existing min implementation
2021-05-09 13:58:05 +02:00
Frederic Chardon
caf382c19f
Merge branch 'barrier' into 'master'
...
Do not store callback inside Misc::Barrier
See merge request OpenMW/openmw!821
2021-05-07 22:21:44 +00:00
Andrei Kortunov
2e8873af51
Add new scene nodes to scene graph serializer blacklist
2021-05-07 19:27:23 +04:00
psi29a
08e1a8e0fb
Merge branch 'esm_opti' into 'master'
...
Teensy optimisation for esmtool
See merge request OpenMW/openmw!826
2021-05-07 14:21:37 +00:00
jvoisin
8a56ba6aaa
Fix compilation
2021-05-07 13:58:30 +02:00
elsid
fbeccc2908
Apply 1 suggestion(s) to 1 file(s)
2021-05-07 09:28:47 +00:00
Bret Curtis
e720a56030
Merge pull request #3080 from akortunov/fix_ci
...
Add missing include for std::inserter
2021-05-07 11:18:33 +02:00
Andrei Kortunov
8d4a374516
Add missing include for std::inserter
2021-05-07 11:30:10 +04:00
psi29a
6263ade01a
Merge branch 'esmcleanup' into 'master'
...
Minor ESM code cleanup
See merge request OpenMW/openmw!825
2021-05-07 06:47:45 +00:00
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
2021-05-06 22:41:20 +02:00
CedricMocquillon
a885134868
Do not search if it is not used
2021-05-06 13:28:06 +02:00
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.
2021-05-05 23:42:47 +02:00
CedricMocquillon
813b8ee0d1
Search only in the niffilemanager for nif files
2021-05-05 23:19:08 +02:00
CedricMocquillon
e378159ea8
Use O(log(n)) search instead of O(n)
2021-05-05 23:10:24 +02:00
Dobrohotov Alexei
57c372a50e
ESM code cleanup
2021-05-05 22:23:06 +03:00
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.
2021-05-05 19:44:16 +02:00
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.
2021-05-05 19:27:49 +02:00
psi29a
110001d47f
Merge branch 'nullroots' into 'master'
...
Improve null root handling
Closes #5963
See merge request OpenMW/openmw!818
2021-05-05 07:24:43 +00:00
Dobrohotov Alexei
19f0b80983
Improve null root handling
2021-05-05 02:41:30 +03:00
psi29a
6513c38875
Merge branch 'clean_navigator' into 'master'
...
Remove redundant and useless code from navigator
See merge request OpenMW/openmw!815
2021-05-04 21:57:16 +00:00
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
2021-05-04 21:09:20 +00:00
psi29a
e6b097085b
Merge branch 'const_ref' into 'master'
...
Sprinkle some const-ref to avoid unnecessary copies
See merge request OpenMW/openmw!803
2021-05-04 21:02:14 +00:00
elsid
87ada56edd
Various fixes for niftest
2021-05-04 20:58:01 +00:00
elsid
865ef56a09
Replace include by RecastMesh forward declaration
...
To reduce dependency between navigator interface and implementation.
2021-05-04 13:00:06 +02:00
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.
2021-05-04 13:00:06 +02:00
elsid
bce06df254
Add missing array header
2021-05-04 13:00:06 +02:00
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.
2021-05-04 02:23:07 +02:00
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.
2021-05-03 00:08:47 +01:00
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
2021-05-02 20:52:57 +00:00
fredzio
6fd04cb8f6
Remove support for single-precision Bullet, fail during configuration instead of during linking.
2021-05-02 17:48:50 +02:00