psi29a
ae66afb219
Merge branch 'less_verbose' into 'master'
...
Make the code less verbose.
See merge request OpenMW/openmw!874
2021-05-18 08:30:50 +00:00
psi29a
f1f1703441
Merge branch 'fix_navmesh_wait' into 'master'
...
Fix redundant waiting until navmesh is generated
See merge request OpenMW/openmw!861
2021-05-17 10:54:23 +00:00
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
2021-05-16 11:58:14 +00:00
fredzio
c55db790f3
Make the code less verbose / more readable using for range loop and
...
structured binding.
No functional changes.
2021-05-16 12:42:16 +02:00
psi29a
3d61d7ec9a
Merge branch 'optimize_initial_load' into 'master'
...
Optimize engine initial loading time
See merge request OpenMW/openmw!867
2021-05-15 18:48:17 +00:00
jvoisin
7deb6a6ffd
Use const references when possible in for loops
...
No need for useless copies.
2021-05-15 19:50:01 +02:00
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
9938af2289
Use unordered_map for ref count
...
Reduces ESMStore::countRecords time by 8%.
2021-05-15 18:45:22 +02:00
elsid
f2188d2533
Reduce temporary allocations on ESM loading
...
By moving objects instead of copying when possible.
2021-05-15 18:45:21 +02:00
jvoisin
690d85d0e9
Don't use at() instead [] when length is checked/known
2021-05-15 15:38:17 +02:00
fredzio
fb344d27e0
Use insert_or_assign() instead of hand rolled version.
2021-05-14 23:38:39 +02:00
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.
2021-05-14 22:41:11 +02: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
psi29a
9b017ef04d
Merge branch 'internal_includes_openmw' into 'master'
...
Clean up some internal includes of the openmw component
See merge request OpenMW/openmw!796
2021-05-07 10:53:25 +00:00
elsid
00de80c884
Merge branch 'deadcode' into 'master'
...
GC some unused code, simplify some other
See merge request OpenMW/openmw!820
2021-05-06 11:03:14 +00:00
fredzio
e99b61d362
Simplify the code
2021-05-06 06:15:00 +02:00
fredzio
00de540a31
Remove unused function.
2021-05-05 20:27:22 +02: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
b8128d09f9
Merge branch 'enchanted-item-selected-fix' into 'master'
...
Fix for enchanted items being removed on item equip cycling when they are re-equipped
See merge request OpenMW/openmw!714
2021-05-05 07:27:00 +00:00
psi29a
6ac4dfbeb7
Merge branch '9001st_time_the_charm' into 'master'
...
Rework again scripted movements
See merge request OpenMW/openmw!799
2021-05-04 22:52:37 +00:00
jvoisin
d45184a730
Sprinkle some const-ref to avoid unnecessary copies
2021-05-02 14:43:46 +02:00
fredzio
4fa0972b2d
Tone down actor's skip simulation flag to an optional skip collision
...
detection flag.
2021-05-01 14:22:30 +02:00
jvoisin
998cc97a4f
And done!
2021-04-30 20:49:22 +02:00
Bret Curtis
50d6cd2a34
Merge pull request #3070 from akortunov/coverity
...
Fix an another portion of Coverity warnings
2021-04-20 07:33:03 +02:00
Andrei Kortunov
9647b670e4
Do not declare unused variables
2021-04-19 15:43:00 +04:00
Bret Curtis
befa3f587f
Merge pull request #3068 from akortunov/master
...
Clean up MSVC warnings
2021-04-19 09:27:17 +02:00
fredzio
36bb2d5f15
An actor needs not be in active cell. As such we can't use
...
PhysicsSystem::getActor() to determine that a ptr is not actor.
2021-04-18 08:45:43 +02:00
Andrei Kortunov
987b231fdd
Fix an another portion of Coverity warnings
2021-04-18 07:09:44 +04:00
Andrei Kortunov
f308dde254
Clean up MSVC warnings
2021-04-17 12:14:50 +04:00
Andrei Kortunov
57b501ad13
Merge pull request #3067 from akortunov/master
...
Limit pointers cache size to avoid possible bad_alloc errors
2021-04-17 10:31:47 +04:00
fredzio
f137b7341f
Another fallout from MR 722: objects were treated like actors by
...
accident. Net effect was that calls to Move/MoveWorld didn't update
position of collision object.
2021-04-16 16:12:31 +02:00
Andrei Kortunov
5de72c94ab
Limit pointers cache size to avoid possible bad_alloc errors
2021-04-16 08:10:31 +04:00
Andrei Kortunov
db1428de18
Move container unresolving to the separate method
2021-04-14 23:03:35 +04:00
psi29a
0818a10df2
Merge branch 'baby_dont_throw_me_no_more' into 'master'
...
Catch exceptions in ResolutionListener
Closes #5946
See merge request OpenMW/openmw!727
2021-04-12 06:12:19 +00:00
fredzio
fda639eb57
Remove unused forward declarations
2021-04-11 14:46:51 +02:00
Evil Eye
b91be1e803
Catch exceptions in ResolutionListener
2021-04-11 14:12:31 +02:00
psi29a
603e4206fd
Merge branch 'teleport_here_not_there' into 'master'
...
Fix #5919 (and another bug)
Closes #5919
See merge request OpenMW/openmw!722
2021-04-10 12:51:42 +00:00
Andrei Kortunov
c989fac67b
Add bound for pointers cache size, as it specified in docs
2021-04-10 11:20:12 +04:00
fredzio
8874a5be22
Change (again) the way SetPos behave.
...
Instead of registering the desired change of position and rely on
physics simulation to apply it to the world, immediately change the
position in the world without reset the simulation.
2021-04-09 23:34:03 +02:00
Jacob Turnbull
d9376ee08e
Trim down comment and change flag name
2021-04-07 16:57:06 -05:00
Andrei Kortunov
59720aea9a
Restore old aiming for melee combat
2021-04-07 12:07:03 +04:00
Jacob Turnbull
bc8db8b8f5
Fix for enchanted items being removed on item equip cycling when they are re-equipped
2021-04-06 20:12:51 -05:00
elsid
bd33fa76b6
Use CRTP to define CustomData clone function
2021-04-05 11:53:07 +02:00
elsid
e380470558
Add move ctor and assignment operator to RefData
2021-04-05 11:53:07 +02:00
elsid
045bb7cbd7
Store CustomData and ContainerStore as unique_ptr
2021-04-05 11:52:52 +02:00
fredzio
7a67492d81
Unbreak SetPos and the mods using it.
...
To make SetPos works with async physics, it was modified to register a
position offset that would be applied to the real position during the
simulation.
A common pattern to teleport NPC in scripts is a sequence of SetPos/Disable/Enable in the same frame.
Since Disable/Enable creates a new physics actor using last known
RefData::Position, the registered offset never get a chance to be applied.
Modify disable() to call moveObject with the offset applied, so that the newly created physics actor will have up-to-date position
2021-03-28 21:19:14 +02:00
Andrei Kortunov
5fce5b12f4
Merge branch 'drop_the_bird' into 'master'
...
Disallow inserting containers, creatures, and npcs from the save game not present in content files
Closes #5884
See merge request OpenMW/openmw!683
2021-03-26 15:48:17 +00:00
Max
2cd96e56d5
create constant and use constant in other parts of the code base
2021-03-24 14:54:46 -07:00
Max
e56efdd562
change aim calculation
2021-03-24 14:54:46 -07:00