Commit Graph

18177 Commits (f85053d78c7d21484bcf49d75ab2a9fce5ce79f3)

Author SHA1 Message Date
kuyondo 49da33a129 comiit 3 years ago
Evil Eye d680aa26e9 Disallow switch fallthrough 3 years ago
psi29a 0e07fc38e5 Merge branch 'opencs-ui-tweaks' into 'master'
Minor UI tweaks all around OpenMW-CS

See merge request OpenMW/openmw!1212
3 years ago
Matjaž Lamut 1c9f06f742 Minor UI tweaks all around OpenMW-CS 3 years ago
psi29a 2c8c36fe5d Merge branch 'master' into 'effective_magic'
# Conflicts:
#   CHANGELOG.md
3 years ago
psi29a bd866cf210 Merge branch 'fix_infidelities' into 'master'
Fix Infidelities quest from Tribunal (#6307)

Closes #6307

See merge request OpenMW/openmw!1248
3 years ago
psi29a 1d342f80ed Merge branch 'cursorspeedmerge' into 'master'
Updated: Change cursor speed with settings.cfg (#6312)

Closes #6312

See merge request OpenMW/openmw!1255
3 years ago
psi29a f6b27f610d Merge branch 'revert_and_twist' into 'master'
Revert and restore the cell grid size with alternate fix

See merge request OpenMW/openmw!1259
3 years ago
Bret Curtis 52a10a4bc0 remove one last assert 3 years ago
Bo Svensson 2568f119a4
reapplies PR without npe (#3137)
* avoids creating empty statesets on drawables

Currently, we attempt to skip creating state on drawable nodes when this state matches the default state. This attempt is incomplete because we still create an avoidable empty stateset in the default case.

* renderingmanager.cpp

* nifloader.cpp

* nifloader.cpp

* shadervisitor.cpp
3 years ago
psi29a 9cf9da9cbd Merge branch 'fix' into 'master'
Resolve warning: lambda capture 'defaultCollisionType' is not required to be captured for this use

See merge request OpenMW/openmw!1247
3 years ago
andrewapp b5af192888 gamepad cursor speed fix 3 years ago
Bret Curtis 8309910d9d Restore the cell grid to its former non-exorbitant size, reducing stutter and also threw in a simple alternative fix for the actor position adjustment issue. 3 years ago
Evil Eye 2de7b8e2fb Allow non-biped creatures using weapons to open doors 3 years ago
Evil Eye 4abcb0d7b9 Remove applied magnitude instead of min magnitude 3 years ago
Evil Eye 63a9203dde Fix icon magnitude 3 years ago
Evil Eye 43074347e8 Prevent spell duplication 3 years ago
Evil Eye b8e4f18751 Clear temporary effects before unloading actors to prevent absorb effects becoming permanent 3 years ago
Evil Eye 161e042e2a Prevent iterator invalidation when cleaning up summons 3 years ago
Evil Eye dc1fe62dde Overhaul magic effects to work with onApply and onEnd events 3 years ago
Andrei Kortunov e109d86489 Revert "avoids creating empty statesets on drawables (#3132)"
This reverts commit 957c25a491.
3 years ago
Bo Svensson d8707a763f
fixes build (#3134)
* quadtreeworld.cpp

* renderingmanager.cpp [ci skip]

* quadtreeworld.hpp

* cellborder.hpp

* cellborder.cpp
3 years ago
Bret Curtis 803195a05f add back some explicit includes 3 years ago
Bo Svensson 8358418555
set the correct program link parameters (#3110)
* shadermanager.hpp setProgramTemplate

* shadermanager.hpp

* shadermanager.cpp setProgramTemplate

* shadervisitor.hpp setProgramTemplate

* shadervisitor.cpp setProgramTemplate

* scenemanager.cpp setProgramTemplate

* scenemanager.hpp setProgramTemplate

* renderingmanager.cpp

* groundcover.cpp setProgramTemplate

* groundcover.hpp

* groundcover.cpp

* shadervisitor.cpp

* util.cpp

* lightmanager.cpp

* scenemanager.cpp

* scenemanager.hpp

* lightmanager.cpp

* lightmanager.cpp

* lightmanager.cpp

* scenemanager.hpp [ci skip]

* water.cpp

* groundcover.cpp

* shadermanager.hpp
3 years ago
Andrei Kortunov 1109cc3ac7
Remove unused data field (#3133) 3 years ago
Bo Svensson 957c25a491
avoids creating empty statesets on drawables (#3132)
* avoids creating empty statesets on drawables

Currently, we attempt to skip creating state on drawable nodes when this state matches the default state. This attempt is incomplete because we still create an avoidable empty stateset in the default case.

* renderingmanager.cpp

* nifloader.cpp
3 years ago
Andrei Kortunov fc2076db1a
Fix MSVC warnings about local variables redeclaration (#3130) 3 years ago
elsid c0ef4417c3
Check AiTravel destination for other actors presence
Use faster aabbTest but without destance filter. To avoid dependency on a
specific constant and correctly handle situations when there is a big
difference between actors sizes.
3 years ago
elsid 9950132a5f
Allow travelling actors find path over pathgrid navmesh area type
In addition to other navmesh areas. This makes actors behaviour closer to
vanilla when pathgrid is correct.
3 years ago
elsid 163968f578
Normalize area cost factor
Recastnavigation uses path cost and heuristic based on distance to find
shortest path by A* algorithm. Using raw speed values makes cost much lower
value than heuristic (1000 times less at maximum). Heuristic is defined as
distance from node to target * 0.999 that means area cost should never be less
than 0.999 or 1 for simplicity.

Use max speed to make lowest possible cost factor equal to 1.
3 years ago
Petr Mikheev 48538d5cef 3D transforms in Lua 3 years ago
Petr Mikheev eb2f863b7d Resolve `unused-lambda-capture` warnings 3 years ago
Petr Mikheev fb3917fc1a Lua callbacks 3 years ago
Petr Mikheev 0bd1c22e24 Raycasting in Lua 3 years ago
Bret Curtis fd251dfe55 remove unused member variable 3 years ago
Bo Svensson 5fde6867a2
removes unused code (#3129)
* scenemanager.cpp

* scenemanager.hpp

* scenemanager.cpp

* stats.cpp

* renderingmanager.cpp
3 years ago
Evil Eye 77a23dab09 Only add enabled objects to the scene 3 years ago
Petr Mikheev e760a6c7e6 Merge branch 'forlua' into 'master'
Simple Physics API modification for Lua

See merge request OpenMW/openmw!1216

(cherry picked from commit d88494c90b501d0832ae0330a0ca81d8b8e5aa50)

02dd055a Save hitObject in castSphere() just like in castRay()
0793d0bf Allow to override collision mask and group for castSphere() as for castRay()
3 years ago
Bo Svensson 01cc61087b
improves paging preloader (#3126)
* Return check for distance when we try to reuse data

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* cellpreloader.cpp

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* [ci skip]

* quadtreeworld.cpp

* chunkmanager.cpp

* chunkmanager.cpp

* cellpreloader.cpp

* jvoisin

* whitespace

* whitespace
3 years ago
psi29a 782e0710af Merge branch 'OpenCS-preserve-blocked' into 'master'
OpenCS - Preserve "blocked" record flags when saving. #6288

Closes #6288

See merge request OpenMW/openmw!1052
3 years ago
psi29a 908d196fee Merge branch 'master' into 'undead_intelligence'
# Conflicts:
#   CHANGELOG.md
3 years ago
psi29a ade6cd0127 Merge branch 'editor_columns_filtering' into 'master'
Toggling table columns visibility. Partially implements #890

Closes #890

See merge request OpenMW/openmw!1232
3 years ago
psi29a 2cee222e73 Merge branch 'explosion_at_impact' into 'master'
Bring arrow behaviour in line with vanilla (#6233 and other change)

See merge request OpenMW/openmw!1188
3 years ago
Bo Svensson c6f7137ee1
fixes bugs with share state (#3111)
* optimizer.cpp merge fix

* objectpaging.cpp

* optimizer.hpp setSharedStateManager

* optimizer.cpp shareState

* scenemanager.cpp shareState

* scenemanager.cpp

* optimizer.cpp

* optimizer.cpp

* scenemanager.cpp

* optimizer.cpp
3 years ago
Evil Eye 233bb287e1 Merge branch 'refactoring2' into 'master'
Minor refactoring: use Misc::normalizeAngle in worldimp.cpp

See merge request OpenMW/openmw!1242
3 years ago
Evil Eye 30c998f34e Merge branch 'test_cells' into 'master'
Use same logic for testing cell as for loading cell

See merge request OpenMW/openmw!1240
3 years ago
Evil Eye 34cf66139a Make GetCurrentAIPackage return -1 for non-actors and dead actors 3 years ago
Evil Eye 2f4df12b2e Merge branch 'Fix_ASCII' into 'master'
Fixed an issue where keyword search expected the text to be all ASCII characters

See merge request OpenMW/openmw!1227
3 years ago
Petr Mikheev 413ac067ec Allow creating omwaddons without a dependency on an omwgame 3 years ago
Petr Mikheev 83e0d9aeef Minor refactoring: use Misc::normalizeAngle in worldimp.cpp 3 years ago
psi29a e2e5161d81 Merge branch 'optimizebrushdraw' into 'master'
Optimize terrain editing brush drawing performance

Closes #6285

See merge request OpenMW/openmw!1226
3 years ago
elsid 5878b1fce6
Use same logic for testing cell as for loading cell
Having different branches makes testing less useful. If something fails in
regular executing it should fail in testing. To make it possible there should
be none differences in the execution paths.
3 years ago
elsid d36595e09e
Make sure PathFinder::getClosestPoint is not called with failing precondition
Pathgrid should be not nullptr and points should be not empty.
3 years ago
Pi03k e641bea606 Toggling table columns visibility 3 years ago
Petr Mikheev 5893b88409 Ignore time to destination when giving way (#6296) 3 years ago
Bo Svensson b22fb7a7bf
consolidate node mask checks (#3125)
* consolidate node mask checks

This PR simplifies a few checks against node masks in object paging by using the osg provided `setTraversalMask`.

* objectpaging.cpp
3 years ago
Evil Eye 786b6b7c9a Merge branch 'lua_util' into 'master'
Move LuaState::makeReadOnly(sol::table) out of the class

See merge request OpenMW/openmw!1229
3 years ago
florent.teppe d9c3ba03f4 Uses limits instead of climits 3 years ago
Bo Svensson 99df1c695c
fixes wireframe is broken (#3123)
* renderingmanager.cpp [ci skip]

* groundcover.hpp [ci skip]

* groundcover.cpp

* renderingmanager.cpp [ci skip]

* renderingmanager.hpp
3 years ago
florent.teppe 2d32954888 Replaced Assert_true with expect_eq 3 years ago
psi29a 15bcbb5844 Merge branch 'getsquareroot' into 'master'
Remove duplicate GetSquareRoot implementation

See merge request OpenMW/openmw!1231
3 years ago
Evil Eye 831055f878 Merge branch 'OpenCS-fix-modify' into 'master'
OpenCS - Re-implement the fix for Issue #6067.

See merge request OpenMW/openmw!1173
3 years ago
florent.teppe 0e06e9b221 Removed useless comment and converted the file to UTF8 to keep special characters 3 years ago
Evil Eye 6d7cb38834 Remove duplicate GetSquareRoot implementation 3 years ago
florent.teppe c1c501ca35 Added test to make sure keyword search works even with non ascii characters 3 years ago
florent.teppe bcb0526268 Added climits, it compiled on VS2019, but not with g++ 3 years ago
Petr Mikheev 2f25257a3e Move LuaState::makeReadOnly(sol::table) out of the class because it doesn't need to access LuaState internals. 3 years ago
Petr Mikheev f1e3c55ea3 Fix deadlock in Lua worker thread (#6286) 3 years ago
florent.teppe 76be2e91e5 Fixed an issue where keyword search expected the text to be all ASCII characters 3 years ago
psi29a 68db9869f5 Merge branch 'DistantTerrainDebugChunks' into 'master'
Debug terrain chunks

See merge request OpenMW/openmw!1169
3 years ago
psi29a 18f5762a76 Merge branch 'master' into 'OpenCS-preserve-blocked'
# Conflicts:
#   CHANGELOG.md
3 years ago
unelsson 70e210735a Optimize terrain editing brush drawing performance 3 years ago
Pi03k 4ff5a04e9b Remove redundant qt-related cmake macros 3 years ago
Bo Svensson f62adab43a
Avoid the terrain sync completely in most cases (#3103)
We can take elsid's commit 605cb8d further by avoiding the terrain sync completely in most cases. Currently in changeCellGrid we wait for a new preloading task to ensure the getPagedRefnums for the new active cells have been filled in by object paging. This is usually not necessary because we have already completed a preload in the past containing these active cells. With this PR we remember what we preloaded and skip the terrain sync if it is not needed.
3 years ago
psi29a 2be3a76b6a Merge branch 'spin_me_right_round' into 'master'
Reset rotation when respawning actors

Closes #6273

See merge request OpenMW/openmw!1219
3 years ago
psi29a 24d1c2b5fa Merge branch 'recurse_directory_iterator' into 'master'
VFS manager refactoring

See merge request OpenMW/openmw!1218
3 years ago
Cédric Mocquillon 6817282097 Move getFileExtension to common header and use instead of repeating same code 3 years ago
Cédric Mocquillon c2df0949e2 Change normalizeFilename signature 3 years ago
Cédric Mocquillon d4e26746a3 Use recurse subdirectory iterator to iterate over the VFS without exposing internal details 3 years ago
Evil Eye 60298cd66d Reset rotation when respawning actors 3 years ago
pi03k e4eeb9cce9 Remove 'no relevant classes' moc warning 3 years ago
Bo Svensson b6f572578e
Groundcover optimisation (#3101)
* groundcover.cpp share state

* groundcover.hpp share state
3 years ago
psi29a 0ab8a7ddd7 Merge branch 'create-objects-menu' into 'master'
OpenMW-CS: Usability changes to the drop-down menu when creating a new object.

See merge request OpenMW/openmw!1210
3 years ago
psi29a c40f921396 Revert "actoranimation.cpp faster getbonebyname (#3099)"
This reverts commit c284d0cf5c
3 years ago
Cédric Mocquillon 080c909c28 Merge the 'debug chunks' and 'object paging debug batches' settings into a single one 3 years ago
Bo Svensson e2d0e86020
cellpreloader.cpp unused variable (#3102) 3 years ago
psi29a f8c7664234 Merge branch 'copy_before_move' into 'master'
Maybe fix #6259

Closes #6259

See merge request OpenMW/openmw!1197
3 years ago
Bo Svensson ac72f3d636
reduces virtual function calls in a hotspot of cache retrieval (#3100)
* chunkmanager.cpp static_cast [ci skip]

* groundcover.cpp static_cast [ci skip]

* Update objectpaging.cpp

objectpaging.cpp static_cast [ci skip]
3 years ago
Bret Curtis 1edeffbafc constify getBoneByName 3 years ago
Bo Svensson 9d661359a1
Groundcover consolidation (#3096)
* chunkmanager.hpp viewdistance

* chunkmanager.cpp viewdistance

* chunkmanager.hpp viewdistance

* quadtreeworld.cpp viewdistance

* quadtreeworld.cpp consolidate

* quadtreeworld.hpp consolidate

* renderingmanager.cpp groundcover consolidate

* renderingmanager.hpp groundcover consolidate

* renderingmanager.cpp updater move

* renderingmanager.hpp updater move

* groundcover.hpp activegrid consolidation

* groundcover.cpp activegrid consolidation

* settings-default.cfg dead settings remove

* viewdata.cpp revert

* wrong file paste mistake

* wrong file paste mistake

* wrong file paste mistake

* renderingmanager.cpp updatecallback fix

* renderingmanager.cpp namespace fix

* groundcover.hpp redefinition fix

* groundcover.cpp redefinition fix

* renderingmanager.cpp crash fix

* renderingmanager.cpp euclidean groundcover distance

* viewdata.hpp getreusedistance

* quadtreeworld.cpp reusedistance

* groundcover.rst [ci skip]
3 years ago
Bo Svensson c284d0cf5c
actoranimation.cpp faster getbonebyname (#3099) 3 years ago
Bo Svensson 147ed39900
This PR solves a crash with Robert's bodies logged on your bugtracker. (#3095)
* attach.cpp [ci skip]

* attach.cpp [ci skip]

* attach.cpp [ci skip]

* npcanimation.cpp [ci skip]

* attach.hpp [ci skip]

* attach.cpp [ci skip]

* creatureanimation.cpp [ci skip]

* creatureanimation.cpp [ci skip]

* cellpreloader.cpp

* npcanimation.cpp

* attach.cpp

* make android adk happy

* make android adk happy

* changelog.md [ci skip]

* authors.md [ci skip]
3 years ago
Lamoot 6e6214bc43 In OpenMW-CS, when creating a new object, sort the entries in the drop-down menu alphabetically. Also have the menu be tall enough to show all of them at once (without scroll bars). 3 years ago
elsid 6b7434ca69
Pass std::string_view instead of const std::string&
* Starting with Actor::getBodyPartMesh and ending with
  Misc::StringUtils::ciEqual.
* Add tests for Misc::StringUtils::ciEqual.
3 years ago
psi29a 149241daae Merge branch 'dead_animation_code_removal' into 'master'
Dead animation code removal

Closes #6264

See merge request OpenMW/openmw!1198
3 years ago
JanuarySnow bdbc6c0cba Dead animation code removal 3 years ago
psi29a 4bf22f3ca0 Merge branch 'fix_pathgrid_path' into 'master'
Use pathgrid path when destination is closer to different graph component node

See merge request OpenMW/openmw!1155
3 years ago
elsid 605cb8db7c
Make sync terrain preloading sleep free
This reduces average time spent on in. 5 milliseconds as a base precision is
quite a lot considering that for 60 FPS frame time is 1000/16 = ~16.67 ms
when it's a cell loading frame and there is more important work to do rather
than sleeping.
3 years ago
psi29a aef6ec464c Merge branch 'optimize_add_item' into 'master'
Optimize ContainerStore::stacks (attempt #2)

See merge request OpenMW/openmw!1200
3 years ago
elsid 403f0a72f0
Do not copy RefId when need to compare
Makes ContainerStore::stacks ~4x times faster when adding 4k different items
in a single frame.
3 years ago
elsid e910dd7a25
Rename CellRef::getRefIdPtr -> getRefIdRef and return reference
Return value can't be nullptr. Pointer complicates the code because has to be
dereferenced.

Also move function definition to hpp to make it easier for compiler to optimize
calls.
3 years ago
elsid b0f772af40
Define dependency to OSG plugins in one place
Each binary depending on components library requires OSG plugins to be linked.
Duplicating dependecies for each binary does not give benefits and brings
problems when new binary is added.
3 years ago
Frederic Chardon 7b26058fa5 moveObject() has side effects that might invalidate iterators from mActors. Instead of iterating over mActors, make a copy of needed data and iterate over the copies. 3 years ago
psi29a 6170971ea3 Merge branch 'bettermoveinstance' into 'master'
Set instance movement based on camera zoom

See merge request OpenMW/openmw!1186
3 years ago
elsid a8c16071dc
Fix -Wreturn-local-addr warning
/home/elsid/dev/openmw/apps/opencs/model/world/actoradapter.cpp: In member function ‘const string& CSMWorld::ActorAdapter::ActorData::getPart(ESM::PartReferenceType) const’:
/home/elsid/dev/openmw/apps/opencs/model/world/actoradapter.cpp:142:20: error: returning reference to temporary [-Werror=return-local-addr]
  142 |             return "";
      |                    ^~
3 years ago
Petr Mikheev 76320aae45 Merge branch 'const_ret_val' into 'master'
Don't use `const` for objects returned by value.

See merge request OpenMW/openmw!1183
3 years ago
psi29a a57b5674e5 Merge branch 'hash_actors' into 'master'
Replace std::map with std::unordered_map and use constant Ptr.mRef as a key

See merge request OpenMW/openmw!1129
3 years ago
psi29a a0201feb97 Merge branch 'lua_tostring' into 'master'
Function LuaUtil::toString

See merge request OpenMW/openmw!1187
3 years ago
fredzio d20730458d Replace std::map with std::unordered_map for mActors and mObjects.
Use Ptr.mRef as a key instead of Ptr: it is constant for the lifetime of
the object.
3 years ago
fredzio 0bce6c09e1 Change projectile behaviour to be like in vanilla wrt. water plane:
- enchanted arrow explode upon hit the water plane
- non enchanted arrow disappear (or more accurately, they hit nothingness)
- enchanted arrow shot underwater explode immediately
- non enchanted arrow disappear immediately

Also, solve a bug that occured previously and could theoritically still happens where we use the last tested collision position for instead of the last registered hit:
Use the hit position as saved inside Projectile::hit() instead of the last position saved inside the callback.
If a projectile collides with several objects (bottom of the sea and water surface for instance), the last collision tested won't necessarily be the impact position as we have no control over the order in which the tests are performed.
3 years ago
jvoisin d4e3575f1d Don't use `const` for objects returned by value.
This prevents the usage of std::move semantics,
and makes clang-tidy sad.
3 years ago
unelsson f876ff2c14 Clear temporary movement data at the end of the drag 3 years ago
unelsson 53d315c862 XYZ-locking, mouse wheel move fix 3 years ago
unelsson 23fe3d74ab Use floats, not doubles 3 years ago
unelsson 840e7615f5 Store object origins and move difference 3 years ago
unelsson 0d511da615 Test of basic mouse-plane use 3 years ago
fredzio d1a5bc207b Iterate over mInactiveCells when unloading cells in TestCells / TestInteriorCells. Otherwise we dereference an invalid iterator after deactiveCell(). 3 years ago
elsid 0daf6f5d0b Merge branch 'comma' into 'master'
Don't use comma where there is no need to.

See merge request OpenMW/openmw!1179
3 years ago
Petr Mikheev 33d4d88447 Function LuaUtil::toString 3 years ago
Evil Eye 18f51e1026 Merge branch 'nonull' into 'master'
Don't pass a nullptr to a std::string constructor

See merge request OpenMW/openmw!1178
3 years ago
Evil Eye 06e1b17cc1 Merge branch 'unnecessary_copy' into 'master'
Dont copy-construct from a const-ref when used only as a const-ref

See merge request OpenMW/openmw!1184
3 years ago
jvoisin db4fe11a44 Don't pass a nullptr to a std::string constructor
This is undefined behaviour.
3 years ago
jvoisin deb2af6acc Dont copy-construct from a const-ref when used only as a const-ref
This also makes clang-tiny a bit happier
3 years ago
jvoisin a15cca5763 Use `reserve` on vectors for fixed loops
This is a bit useless, but has the merit of appeasing clang-tiday
3 years ago
jvoisin a6b1e38eab Don't use comma where there is no need to. 3 years ago
cc9cii 0a5571f19e Disable editing for blocked records in both table and dialogue edit widget. 3 years ago
Evil Eye b4486992f0 Allow Rieklings and Goblins to attack again 3 years ago
cc9cii b0d5ca386d Update original cell column and do not modify the refnum when moving a reference to another cell with 3D editing. 3 years ago
cc9cii 2eb210f31a Partially undo commit 71be4cdd20 so that moved references retain the original refnum. This is consistent with vanilla CS's behaviour. 3 years ago
cc9cii b2bd97f283 A different implementation to MR 1051 to fix Issue #6067.
This MR doesn't delete the original record, but instead the original record is updated with the moved record when loading.

Issue #4752 is no longer addressed in this MR.
3 years ago
cc9cii 7264a10c07 Partially revert commit dab1a9e7fb 3 years ago
cc9cii 7227a83e60 Preserve "blocked" record flags when saving with OpenCS. This will help outputs of OpenCS to be used with vanilla Morrowind.
Sample use case: users are using the Morrowind Code Patch feature that allows modders to enable this flag to differentiate editor-made potions from player crafted potions for tooltips.
3 years ago
psi29a 66f028c4a1 Merge branch 'correctcommandimplementation' into 'master'
Don't do storage in constructors of the commands

See merge request OpenMW/openmw!1126
3 years ago
psi29a d852b10227 Merge branch 'Map-door-markers-flicker-in-some-cells' into 'master'
Do not update doors markers at each frame, only when needed

Closes #6214

See merge request OpenMW/openmw!1168
3 years ago
psi29a fff35dcb03 Merge branch 'Ignore-empty-pgrd' into 'master'
Do not store empty PGRD records.  Should resolve Issue #6209.

See merge request OpenMW/openmw!1121
3 years ago
psi29a e8057d9fd1 Merge branch 'aipursue_path' into 'master'
Make AiPursue path destination to be as close as possible to target (#6211)

Closes #6211

See merge request OpenMW/openmw!1154
3 years ago
psi29a b585aad81e Merge branch 'offset-bullet-debug' into 'master'
glPolygonOffset for Bullet debug geometry

See merge request OpenMW/openmw!684
3 years ago
Thunderforge 42ce22f568 Adding saveSettingInt() and loadSettingInt()
Convenience methods for saving and loading integer settings. Versions for QSpinBox and QComboBox are included. Right now, only simple settings are used for it; we have some additional settings that include validation that aren't using these new methods.
3 years ago
unelsson de3497d291 Fix undo-redo crash 3 years ago
unelsson 890ce1eefb Reverse action order for redo and undo 3 years ago
unelsson 0cfabd6f3b Move mapToSource back to constructor 3 years ago
unelsson b2fe591590 Don't do any storing in the constructor 3 years ago
unelsson 45549da0f5 For most commands, set mOld in redo, not in constructor 3 years ago
psi29a 716eebe616 Merge branch 'terrainselectioncrashfix' into 'openmw-47'
Fix terrain selection crash

See merge request OpenMW/openmw!1165

(cherry picked from commit ec4e3b04a7)

b84e41bd Avoid storing ref, dynamic cast worldspacewidget for safety
d62ddc00 Use QPointer to detect object existence, less verbose debug messages
cb42b528 Remove friend, make getEditMode public to allow editmode testing.
4b148180 Restucture code
08f7c73e Fix text
3 years ago
psi29a 855f491196 Merge branch 'splintercell' into 'master'
Clean up text key extraction

See merge request OpenMW/openmw!1163
3 years ago
Alexei Dobrohotov 0922d0b105 Clean up text key extraction 3 years ago
Petr Mikheev 3771e523f1 More object bindings 3 years ago
Alexei Dobrohotov 31e70f2ecc Merge branch 'minor_factorisation' into 'master'
Minor factorisation in apps/openmw/mwmechanics/actors.cpp

See merge request OpenMW/openmw!1143
3 years ago
cc9cii 28ad139464 Check if deleted, just in case. 3 years ago
psi29a d09c807a40 Merge branch 'fixbadcast' into 'master'
Fix std::bad_cast

Closes #6217

See merge request OpenMW/openmw!1130
3 years ago
unelsson 7801f42005 Don't do mapToSource at executeModify 3 years ago
psi29a 9751717b35 Merge branch 'components_qt' into 'master'
Do no link binaries with Qt where it's not used

See merge request OpenMW/openmw!1157
3 years ago
elsid e9b8933b2f
Do no link binaries with Qt where it's not used
Define components_qt static library with all qt dependent components that also
depends on other components. Link only cs, wizard and launcher with qt
dependent components.
3 years ago
psi29a 77e58abf0d Merge branch 'lua_input' into 'master'
Lua package 'openmw.input'

See merge request OpenMW/openmw!1073
3 years ago
elsid 193be0d5d1 Merge branch 'some_small_changes' into 'master'
Fix coverity warning and build on some osg

See merge request OpenMW/openmw!1153
3 years ago
cc9cii bd3ef506cd Empty Pathgrid record is considered as the modder's intention to delete any existing record. 3 years ago
cc9cii 802a202455 Remove warning log messages as they are more suitable for OpenCS. 3 years ago
cc9cii 8244ba8957 Erase old record instead (i.e. assume an empty Pathgrid record was placed in purpose) 3 years ago
cc9cii 1d925154f2 Do not store (or worse, overwrite) empty PGRD records. Should resolve Issue #6209. 3 years ago
glassmancody.info a6c7fcd436 don't pingpong depth function on character preview update 3 years ago
elsid fea4fb6e69
Make AiPursue path destination to be as close as possible to target
Even when target is not reachable actor will try to run there either because
target navmesh polygon is selected within extended area or because partial path
is built to the closest possible polygon.
3 years ago
elsid 9112c65afc
Use pathgrid path when destination is closer to different graph component node
Partially revert d863267d5c to restore 0.46
behaviour for pathgrid based pathfinding.
3 years ago
glassmancody.info d63eb3325f fix coverity warning and build on some osg 3 years ago
psi29a 6595c731f7 Merge branch 'fix_rc_poly_mesh_flags_length' into 'master'
Fix flags length for rcPolyMesh

See merge request OpenMW/openmw!1134
3 years ago
psi29a faa3e04494 Merge branch 'const_reff' into 'master'
Sprinkle some const-ref

See merge request OpenMW/openmw!1145
3 years ago
cc9cii b1fb3e2313 Add missing includes. 3 years ago
cc9cii 47a841d3b7 Fix/workaround for Issue #3246
OpenMW save file assumes the presence of NPC/Creature data but the vanilla save file provides only the delta changes in most situations.  The base data are not available without loading all the relevant dependency content files.  Duplicating that code in the ESSImporter is not desirable.

Ideally a flag should be set but that will mean a change in the save file format.  For a minor change such as this doing so seems like an overkill.  So a temporary workaround is introduced where the gold carried by the NPC/Creature is used as an indicator as the lack of ACDT data.
3 years ago
jvoisin 39cd679ca9 Minor factorisation in apps/openmw/mwmechanics/actors.cpp 3 years ago
Alexei Dobrohotov 6c1ac9ed9f Merge branch 'init_sky' into 'master'
Use an initialization list in WrapAroundOperator's constructor

See merge request OpenMW/openmw!1146
3 years ago
Alexei Dobrohotov 7665ebfa67 Merge branch 'another_fix' into 'master'
Fix #6219

Closes #6219

See merge request OpenMW/openmw!1137
3 years ago
Alexei Dobrohotov 873e16ae93 Merge branch 'emp' into 'master'
Use an emplace instead of an insert

See merge request OpenMW/openmw!1144
3 years ago
elsid f966fdb65e Merge branch 'noweak' into 'master'
use shared_ptr inside the physics simulation to simplify the code

See merge request OpenMW/openmw!1141
3 years ago
jvoisin ff2a51a484 Use an initialization list in WrapAroundOperator's constructor 3 years ago
jvoisin 7a015d24c6 Sprinkle some const-ref 3 years ago
jvoisin 0792bb212a Use an emplace instead of an insert 3 years ago
glassmancody.info ed72f3335b silence compiler warning 3 years ago
fredzio ec871e6bf7 Use shared_ptr instead of weak_ptr for actors handle inside the
simulation

The purpose of weak_ptr is to avoid performing the simulation on deleted
Actor by promoting it to a shared_ptr via a lock() call. This clutter
the code with a lot of branches, whereas the overwhelmingly common case is for the call to succeed.
Since the simulation is decoupled from the engine state, we can use a shared_ptr instead of a weak_ptr.
This allow us to ignore (ie not handle) the rarer case where the actor is delete from the scene. This means that the simulation
will run for one frame more than before for each actor, whereas the rest of the engine
will be ignorant of this.
3 years ago
AnyOldName3 7400050b38 Merge branch 'character_preview_alpha_fix' into 'master'
Fix transparent objects being invisible in character doll

See merge request OpenMW/openmw!1140
3 years ago
glassmancody.info 6cc71745ac ensure character preview is using standard depth 3 years ago
Mads Buvik Sandvei d40c18234a Double buffering the water's node position uniform 3 years ago
fredzio 713f612bdb Partially revert !1046: the player is added before the scene exists, so we need to check again the grounded state, as it correctly was. 3 years ago
jvoisin b01ef2629c Fix two Wreorder clang warnings 3 years ago
Alexei Dobrohotov 839cf36bdd Merge branch 'hidden_markers' into 'master'
Use common implementation to filter hidden markers

See merge request OpenMW/openmw!1132
3 years ago
elsid 54a676f2e3
Add functions to get length of recast type arrays
To avoid duplicating same formulas in multiple places.
3 years ago
elsid 05258ed644
Remove redundant TileCachedRecastMeshManager::hasTile function
It's used only for tests. getMesh is a valid replacement.
3 years ago
elsid 3caf45807f
Use common implementation to filter hidden markers 3 years ago
Cédric Mocquillon b0b60b05b8 Do not update doors markers at each frame, only when needed 3 years ago
unelsson 298db2ef76 Initialize and check pointer. 3 years ago
unelsson f1d05a93bf Get index and model from proxy 3 years ago
jvoisin bcdd0f55da Merge branch 'bc_refnum' into 'master'
Always print object refnum

See merge request OpenMW/openmw!1123
3 years ago
elsid e84a177a91
Always print object refnum
Also print content file index even when it's negative. To be able to identify
the object unambiguously.
3 years ago
fredzio de9ee2f196 Revert "Calls directly MovementSolver::traceDown instead of"
This reverts commit c1e50f530b.
3 years ago
Petr Mikheev 0e6fbbc126 Lua package 'openmw.input' 3 years ago
psi29a 45b45b3560 Merge branch 'fix_op_bzzt_whoopsie' into 'master'
resolve issue of OP meshes that cross boundaries

See merge request OpenMW/openmw!1117
3 years ago
Bret Curtis c99bddc8dc Revert "Move reference to the right cell according to its geographical position"
This reverts commit d0677c3f07.
3 years ago
Bret Curtis 7dfaef7644 resolve issue of meshes that cross boundaries; should only be calculating the maxBound, not the minBound of y; also fix it in groundcover as it was copied blindly over; 3 years ago
Cédric Mocquillon bfc9ea9e32 Fix warning on MSVC convertion from double to float 3 years ago
Cédric Mocquillon b0e30e4bb6 Change setting to clamp the local viewing distance to fix value (instead of coeff) 3 years ago
Cédric Mocquillon b27de8f188 Disable zooming when setting is off 3 years ago
Alexei Dobrohotov 73e83fd3d8 Merge branch 'dontcrash' into 'master'
Fix #6208 (hopefully)

Closes #6208

See merge request OpenMW/openmw!1113
3 years ago
fredzio 8e3984ae5a Clear mActors when reseting the simulation. Otherwise during next run we can try to read past the end of mActorsFrameData. 3 years ago
jvoisin 586d8684d0 Fix two coverity issues about uninitialised variables 3 years ago
psi29a cb7a4d20dd Merge branch 'killmutex' into 'master'
Remove mutex from PtrHolder

See merge request OpenMW/openmw!1110
3 years ago
psi29a 3afa9829b3 Merge branch 'tracedown' into 'master'
Correct calls to traceDown in addActor

See merge request OpenMW/openmw!1109
3 years ago
fredzio c1e50f530b Calls directly MovementSolver::traceDown instead of
PhysicsSystem::traceDown before inserting into mActors.

The latter does nothing until the actor is inserted into mActors.
We can't move the call after the insertion either because then
the actor is part of the simulation, and we'd have a race.
3 years ago
AnyOldName3 8d93748f87 Fix rebase issue 3 years ago
AnyOldName3 cf15803e67 Disable triangle detection workaround when Bullet actually uses triangles 3 years ago
AnyOldName3 8b4c2d205d WIP-ish glPolygonOffset for Bullet debug geometry 3 years ago
fredzio b4dd9e6b4d Avoid division by zero in movementsolver when an actor is immobile and
in a storm
3 years ago
fredzio ee09f3095f At last kill PtrHolder mutex 3 years ago
fredzio 07fa1803f7 Use btCollisionObject* instead of MWWorld::Ptr inside of Projectile
collision handling and castRay() to avoid calling getPtr(). It is a step forward
removing the mutex inside of PtrHolder.

Do the same for DeepestNotMeContactTestResultCallback. It is used
only for not-ranged combat for now, but do it anyway for parity with all
other callback. This way, once the PtrHolder mutex is gone one will not
have to worry about wether it is safe to use the callback in a specific
context.

To avoid use-after-free with projectile / projectile collision, defer deletion of projectile.
Since instead of storing a copy of target Ptr we have a pointer to its collision object,
we can't delete projectiles until after we finished iterating over the loops.
3 years ago
fredzio e88b94d0b0 Move btCollisionObject* into PtrHolder
Remove unused function
3 years ago
psi29a 8ad3d3d792 Merge branch 'freezeandcool' into 'master'
Don't use FreezeOnCull for any particle system (#4744)

Closes #4744

See merge request OpenMW/openmw!1103
3 years ago
psi29a 8c81191d09 Merge branch 'schneller' into 'master'
Optimize actors physics simulation

See merge request OpenMW/openmw!1048
3 years ago
Alexei Dobrohotov 1fc7cb8191 Don't use FreezeOnCull for any particle system (#4744) 3 years ago
fredzio 5fc3b80406 Don't query actor halfextent in a tight loop, use the already existing
variable. These repeated calls become costly with > 150 actors.
3 years ago
fredzio 7dd5e715d7 Compute and store actor half extents. This is faster for 2 reasons:
- half extents changes when actor scale is modified, which is very rare
- we don't need to protect them by the actor mutex.
3 years ago
fredzio bcd6541d3e Reorganize ActorFrameData members:
- constify all read-only variables
- order them so that all variables modified as aprt of the simulation
  fits in one cache line
3 years ago
fredzio 0c5cf6ec19 Store the btCollisionObject* of the object we're standing on instead of
MWWorld::Ptr:
- they are equivalent
- btCollisionObject* is readily available from the simulation, it saves
  a call to a mutex
- btCollisionObject* is smaller
3 years ago
fredzio 26d9052b8c Move the weak_ptr<Actor> outside of ActorFrameData. 3 years ago
fredzio f68273c3c0 Remove Actor* from ActorFrameData 3 years ago
fredzio 9e911cc8b5 Introduce helper function to write back updated values inside parent Actor class 3 years ago
fredzio b04c958410 Modify the way swimming is handled:
- compute the swimming state instead of storing it, it changes as part of the simulation and was not updated, so it was wrong anyway.
- store the swim level in ActorFrameData, it is constant per Actor so no need to compute it inside the simulation
3 years ago
fredzio 6e51a9a512 Simplify a bit the solver 3 years ago
fredzio 51514e44cc Handle jump as part of the simulation preparation (inside of
PhysicsSystem) instead of inside the simulaiton.
For mechanics, we don't care how the jump is handled, just that it will be.
3 years ago
fredzio 1bfaf353be Explicitely store all the potential states an Actor can have into the
ActActorFrameData structure. It makes it easier to reason about the
simulation (and hopefully simplify it).
Remove atomics from Actor class as a side effect.

Rename mFloatToSurface to mInert to make is explicit what it represent, not what it is used for
Store the Actor rotation (1 Vec2) instead of the whole ESM::Position (2 Vec3)
3 years ago
fredzio 9472728fa4 Do not generate data for immobile actors instead of early out from the solver 3 years ago
Evil Eye 29921bf9fa Don't stack cast packages 3 years ago
psi29a b770373491 Merge branch 'OpenCS-enforce-str-length' into 'master'
OpenCS - Disallow entry of strings longer than the lengths allowed by the file format (#3066)

See merge request OpenMW/openmw!1088
3 years ago
glassmancody.info 09e03fde2e refactor and fix wobbly shores 3 years ago
glassmancody.info cad0b151cb enable shaders path and dehardcode depth formats 3 years ago
glassmancody.info d89e37d689 add framebuffer extension check and fix issues with manual screenshots 3 years ago
glassmancody.info 70fac33940 initial reverse-z depth implementation 3 years ago
Petr Mikheev a94072243b Lua command `core.quit` 3 years ago
cc9cii 8aee84c46e Disallow entry of strings longer than the lengths allowed by the file format.
It is possible to allow longer strings but that will require an extension in the omwaddon format as well as changes to the reader to handle that extension.  Such changes should be a separate MR.

(applied the patch in https://gitlab.com/OpenMW/openmw/-/issues/3066)
3 years ago
psi29a 9fa7521fc5 Merge branch 'OpenCS-no-charconv' into 'master'
OpenCS - Avoid the inclusion of charconv header

See merge request OpenMW/openmw!1087
3 years ago
psi29a 9b7e14ec00 Merge branch 'OpenCS-moved-reference' into 'master'
OpenCS - Fix moved reference - Issues #3514 and #4752

See merge request OpenMW/openmw!1051

(cherry picked from commit 2bee171c7990522da33c2667f7d079fa35f4ede0)

36c30f7f Fix for Issue #3514 where moving a reference to another cell is not handled properly.
40327681 Update the changelog.
3 years ago
psi29a e10e9c0005 Merge branch 'navmesh_reduce_lock_wait' into 'master'
Reduce waiting duration on locks when updating navmesh object in the main thread (#6193)

Closes #6193

See merge request OpenMW/openmw!1079
3 years ago
psi29a 16d04cf76c Merge branch 'fixtexindex' into 'master'
Fix texture index search bug

See merge request OpenMW/openmw!1080
3 years ago
cc9cii bf06898a79 Retain the use of std::string_view in the function signature. 3 years ago
cc9cii 99e691fbe3 Avoid the inclusion of <charconv> header due to Ubuntu Bionic (18.04) which as gcc version less than 8.1
Partially reverts commit fd67ebde25
3 years ago
Petr Mikheev 3ce5e9e680 Improve error messages in components/lua/serialization.cpp 3 years ago
Petr Mikheev 0f7f5ce140 Remove Lua command "self:setDirectControl" 3 years ago
elsid c8987bda2f
Store reference to BulletShapeInstance for btCollisionShape
To keep btCollisionShape lifetime.
3 years ago
elsid 4574e5f565
Remove redundant Navigator API functions 3 years ago
psi29a bd1bf4ec73 Merge branch 'donoteraseme' into 'master'
#6192: Stop crashing in moveActors()

See merge request OpenMW/openmw!1085
3 years ago
fredzio bc738c5640 Use extract/insert instead of erase/emplace
When we call moveObject(), we might trigger a change of cell for the
actor, which in turn triggers updatePtr(). The erase/emplace
construct invalidate references, whereas extract/insert do not.

The reason is was working before !1075 is because we were always
"refreshing" the reference by a call to getActor().
3 years ago
unelsson 09ee2a0a36 fix texture brush index search 3 years ago
psi29a 4b48e62b64 Merge branch 'fixandclean' into 'master'
Fix opencs build and remove some clang warnings

See merge request OpenMW/openmw!1078
3 years ago
fredzio 1391194152 Remove unneeded return statement 3 years ago
fredzio 9ba459662d Remove unneeded std::move
[19/199] Building CXX object apps/opencs/CMakeFiles/openmw-cs.dir/model/world/commands.cpp.o
../../../apps/opencs/model/world/commands.cpp:298:12: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
    mOld = std::move(model.getRecord (id).clone());
           ^
../../../apps/opencs/model/world/commands.cpp:298:12: note: remove std::move call here
    mOld = std::move(model.getRecord (id).clone());
           ^~~~~~~~~~                            ~
../../../apps/opencs/model/world/commands.cpp:333:12: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
    mOld = std::move(model.getRecord (id).clone());
           ^
../../../apps/opencs/model/world/commands.cpp:333:12: note: remove std::move call here
    mOld = std::move(model.getRecord (id).clone());
           ^~~~~~~~~~                            ~
2 warnings generated.
3 years ago
fredzio 36e33b0cf2 Add missing override 3 years ago
fredzio bede1ea1ec Fix build 3 years ago
psi29a 15d278de55 Merge branch 'opt-out-compose' into 'master'
Make it possible to opt out of composing variables

Closes #6186

See merge request OpenMW/openmw!1076
3 years ago
cc9cii 67cad2c515 Fix `CSMWorld::InfoCollection::getTopicRange()` returning one too many. 3 years ago
AnyOldName3 04e9b6d242 Abort on duplicate content file 3 years ago
AnyOldName3 4727ae4b3b Make it possible to opt out of composing variables 3 years ago
psi29a 547bc4a252 Merge branch 'notonlyactors' into 'master'
Refactor the physics simulation to make it not actor centric.

See merge request OpenMW/openmw!1075
3 years ago
psi29a a3a079acc1 Merge branch 'projstats' into 'master'
Add projectiles number to the resources stats

See merge request OpenMW/openmw!1074
3 years ago
psi29a 4c5e6beb75 Merge branch 'canyouseeme' into 'master'
Solve actor awareness check without async physics

See merge request OpenMW/openmw!1071
3 years ago
fredzio 35928cf4d3 Refactor a bit the physics simulation to make it not actor centric:
- inline PhysicsSystem::applyQueuedMovements() into PhysicsSystem::stepSimulation()
- rename PhysicsTaskScheduler::moveActors() to PhysicsTaskScheduler::applyQueuedMovements()
- move the actor movement code from World::doPhysics() to
  PhysicsSystem::moveActors() (analogically to the projectile manager)
3 years ago
psi29a 141095b850 Merge branch 'OpenCS-loading-opt' into 'master'
OpenCS loading time improvements

See merge request OpenMW/openmw!1044
3 years ago
fredzio c76387162b Add projectiles number to the resources stats 3 years ago
psi29a ca011927f3 Merge branch 'ObjectPagingDisappearingTexture' into 'master'
Move reference to the right cell according to its geographical position

See merge request OpenMW/openmw!1065
3 years ago
Evil Eye 5cdf1e7e6b Merge branch 'vec3_vs_xyz' into 'master'
Use Vec3f instead of x,y,z in World API

See merge request OpenMW/openmw!730
3 years ago
fredzio a7b190ad29 Change rotateObject() to take a osg::Vec3f argument instead of 3 floats
for readability.
3 years ago
fredzio 88a5ca440b Change moveObject() to take a osg::Vec3f argument instead of 3 floats
for readability.
3 years ago
fredzio 4e7c128d25 The LOS cache is now unconditionally used without async physics as well
with a TTL of 0 frame. It helps performance when several subsystems
request the same LOS in the same frame (combat, headtracking, etc).
Except it doesn't work if the cache is never trimmed.
3 years ago
Cédric Mocquillon d0677c3f07 Move reference to the right cell according to its geographical position 3 years ago
psi29a 8c36eb56cf Merge branch 'stereo_friendly_water' into 'master'
Stereo friendly water and statesetupdater

See merge request OpenMW/openmw!563
3 years ago
psi29a c5d49b44ba Merge branch 'lua_settings' into 'master'
Add Lua package 'openmw.settings'

See merge request OpenMW/openmw!1017
3 years ago
Evil Eye 779795734f Remove calm/rally/demoralize and turn undead from the wrong targets 3 years ago
Evil Eye a366a85c4e Merge branch 'noalloc_dance_for_npcanimation' into 'master'
Don't do an unnecessarily complex memory allocation dance in npcanimation.cpp

See merge request OpenMW/openmw!1042
3 years ago
Evil Eye 88d207b0cd Merge branch 'land' into 'master'
Correct creature landing sound type (bug #6118)

Closes #6118

See merge request OpenMW/openmw!1054
3 years ago
psi29a ea05b958b8 Merge branch 'FixIssueWithTRData' into 'master'
Fix issue with Tamriel Data landscapes

See merge request OpenMW/openmw!1064
3 years ago
psi29a 292e6f1a9e Merge branch 'seducer_ice_queen' into 'master'
Prevent a missing weapon animation from partially freezing actors

See merge request OpenMW/openmw!1060
3 years ago
Cédric Mocquillon c98b0f713d If same area is defined in multiple plugin the last must wins 3 years ago
elsid 6adf7b10ae
Fix removing heightfield from navigator
It's added not as object so it shouldn't be removed as it.
3 years ago
Petr Mikheev 2938aaf05c Rename `API_VERSION` -> `API_REVISION` in Lua API. 3 years ago
Petr Mikheev 3e4c0b775d Add Lua package 'openmw.settings' 3 years ago
Petr Mikheev 68b8a148d7 Initialize Lua packages in LuaManager::init rather than in constructor. 3 years ago
Evil Eye 977f717f8b Prevent a missing weapon animation from partially freezing actors 3 years ago
Alexei Dobrohotov 536dc6a0c6 Correct creature landing sound type (bug #6118) 3 years ago
psi29a 5a434aebe0 Merge branch 'SortedStaticLands' into 'master'
Replace land static container from vector to flat_set

See merge request OpenMW/openmw!853
3 years ago
Cédric Mocquillon 7772f5111b std::set version 3 years ago
madsbuvi 41c08b1c3b Stereo friendly StateSetUpdater
(cherry picked from commit 496b3aef88b8fd867dcdd23a6ca43144573b1b2f)

Stereo friendly water

(cherry picked from commit 0e22c55e48a7f965367d3d430c1bef5357b22748)

Option to disable per view mapping.

Include memory header

De-hardcode settings and buffers.

formatting error

Update water.cpp (whitespace)

Update water.cpp (more whitespace)

include render order

c array -> c++ array
3 years ago
psi29a 44ceb9572a Merge branch 'recast_mesh_heightfield' into 'master'
Reduce navmesh cache size by special handling for heightfields

See merge request OpenMW/openmw!1032
3 years ago
glassmancody.info 166e23a6d9 fix CI artifacts, missing header 3 years ago
elsid 9a5ec5fd03
Store heightfields as array of heights instead of triangles
To reduce size of RecastMesh and therefore cache size.
3 years ago
elsid 28b2f769c2
Update navmeshtilescache benchmark generators 3 years ago
elsid fdee9db20c
Consider RecastMeshManager not empty when there is water 3 years ago
elsid 5d6c93566d
Rename DetourNavigator::Water -> Cell 3 years ago
elsid 753767d6d9
Store only water shift
Rotation is not used.
3 years ago
elsid a1549321d7
Move Water struct out of RecastMesh class 3 years ago
elsid d60edb36aa
Make RecastMesh independent from recast scale factor
To avoid scaling until it's required by delaying coordinates conversion until
navmesh generation.
3 years ago
elsid af7059373c
Make RecastMesh independent from the order of RecastMeshBuilder calls
To make sure RecastMesh objects are equal if built with the same data but in
different order. Will be used later when there will be more than one place
building RecasMesh objects.
3 years ago
elsid 100cba6260
Use navigator field in Scene 3 years ago
psi29a 6949dd89c2 Merge branch 'gui_shaders' into 'master'
Add shader path for mygui (#6162)

See merge request OpenMW/openmw!1019
3 years ago
psi29a b92c6985cd Merge branch 'auto_in_most_apps' into 'master'
Using auto keyword in most apps

See merge request OpenMW/openmw!885
3 years ago
psi29a 7d7427015e Merge branch 'removing_unused_launcher_imports' into 'master'
Removing unused imports in the Launcher

See merge request OpenMW/openmw!884
3 years ago
Petr Mikheev 200ccfab69 Merge branch 'Allow-Zoom-levels-on-the-World-Map' into 'master'
Allow Zoom levels on the World Map

See merge request OpenMW/openmw!275
3 years ago
fredzio 7145ef4ce0 Update AABB also in sync cases 3 years ago
Petr Mikheev e371831086 Merge branch 'esmstore_infix' into 'master'
Use prefix increment for iterators in esmstore.cpp

See merge request OpenMW/openmw!1041
3 years ago
jvoisin ce8c30bf07 Minor code simplification in npcanimation.cpp 3 years ago
Cédric Mocquillon 1051745f29 [Launcher] Add new setting 'allow zooming' to advanced tab in the launcher 3 years ago
CedricMocquillon 9fee9dbc9c [Global map] Regroup markers when the zoom out 3 years ago
CedricMocquillon 18f5853279 [Global <-> Local] Auto switch between local and global map when zoom in/out 3 years ago
CedricMocquillon 8c87defddf [Local map] Use the distance view in the local map 3 years ago
CedricMocquillon ed04ebe9ff [Local map] Allow zoom on local map 3 years ago
CedricMocquillon 9fadbd5b7a [Global map] Allow zoom on global map 3 years ago
CedricMocquillon 99cd4b6742 [Refactoring] Several refactorings:
[Refactoring] Add marker size method instead of using magic constant

[Refactoring] Simplify worldPosToImageSpace and cellTopLeftCornerToImageSpace usage

[Refactoring] Add a missing 'f' to specify the float type

[Refactoring] Make cellTopLeftCornerToImageSpace more homogenous with worldPosToImageSpace

[Refactoring] Extract createmakrercoords method

[Refactoring] Use worldPosToImageSpace instead of cellTopLeftCornerToImageSpace
Remove cellTopLeftCornerToImageSpace as it is not used anymore
Remove getCellSize as it is not used anymore

[Refactoring] Extract new method createMarker

[Refactoring] Extract new method getMarkerCoordinates

[Refactoring] Extract new method getPosition

[Refactoring] Extract new method centerView

[Refactoring] Extract new method createDoorMarker

[Refactoring] Simplify for loop

[Refactoring] Make the test before the loop
3 years ago
cc9cii 33dcd7585a OpenCS - Jump To Modified 3 years ago
psi29a 2eea590762 Merge branch 'spawn_fix' into 'master'
Fix #6173

Closes #6173

See merge request OpenMW/openmw!1046
3 years ago
cc9cii 3e466699c8 A better way to plug a potential memory leak in the event of an exception during push_back(). 3 years ago
cc9cii fd67ebde25 Changes based on review comments, including:
* replace murmurhash with std::unordered_map
* plug potential leak from unique_ptr release
* replacing some sections with cleaner code
4 years ago
fredzio f348b70733 Set mCanWaterWalk and mOnGround when adding Actor to the scene.
mCanWaterWalk was set to false and updated during next frame's simulation
mOnGround is set to true but then was updated as part of the scene
loading logic.
4 years ago
cc9cii ee3361a118 Fix table being sorted twice (at least it appeared that way according to the sample profiler)
- Quoting Qt-4.8: "Note: . Setting the property to true with setSortingEnabled() immediately triggers a call to sortByColumn() with the current sort section and order."

(copied the changes from commit SHA-1: 77394fce99)
4 years ago
cc9cii 725d689e8a Call push_back() if inserting to the end of the vector. It seems MSVC may be generating different code compared to insert().
(copied the changes from commit SHA-1: 257126ed69)
4 years ago
cc9cii 44a333b6db Don't attempt to open files yet to be created. 4 years ago
Petr Mikheev ec79f26320 Merge branch 'minor' into 'master'
Minor code cleanup

See merge request OpenMW/openmw!1038
4 years ago
cc9cii 5c504e4d22 Convert the CellRef record index lookup maps to use integer keys rather than strings.
- Morrowind load over 300,000 references, so even small inefficiencies add up to longer loading times.
- std::map is used, but should try others, std::unordered_map or even std::vector

(copied the changes from commit SHA-1: 86945d1912)
4 years ago
cc9cii 10c6304a1f Fix typo from commit cfdbd0d471. 4 years ago
cc9cii fc2f68a465 Change the loader's top progress bar to show total number of records processed rather than the number of files.
(copied the changes from commit SHA-1: ff072441fd)
4 years ago
cc9cii 5fffcab94f Performance improvements for loading Info records.
- The order of info records with the same topic are maintained in Collection::mRecords
- The index lookup data structure are not ordered.  The topic string is hashed.  The infos for the topic are simply placed in a vector.
- The index values for appending or inserting a record takes prev/next values (if exist)
- FIXME: prev/next values are not adjusted for adding or removing records
- FIXME: undo after reordering does not reset the modified flag

(copied the changes from commit SHA-1: 06f9922822)
4 years ago
cc9cii 66bda84240 Convert RefNum index map to use find().
(copied the changes from commits 68e16b6cee and 0de223c637)

NOTE: it is unclear how this change affects commit 61a4a0807b
4 years ago
cc9cii be45092e55 Use std::unique_ptr to store records in collections, RefidCollection and RefIdData.
(copied the changes from commit 23e7e3c165)
4 years ago
glassmancody.info e8c6f31e0c add shader path for mygui (#6162) 4 years ago
jvoisin 73c20be29a Use prefix increment for iterators in esmstore.cpp
See https://pvs-studio.com/en/docs/warnings/v803/
for the rationale.
4 years ago
jvoisin 74fab99b89 Use a const-ref for an osg::Quat
Since an osg::Quat contains at least 4 floats,
it should be worth it to use a const-ref instead
of passing it by value.
4 years ago
jvoisin f86ddef4db Minor code cleanup 4 years ago
psi29a 469cc44ef7 Merge branch 'tweaks' into 'master'
Change settings for async physics

See merge request OpenMW/openmw!778
4 years ago
jvoisin 5e3f000b66 Add a std::noboolalpha to a std::boolalpha 4 years ago
Nuri 36657698fb Added checks for paralysis, knocked down, and death when picking up items from inventory. Fixes #6165 4 years ago
psi29a cc642b5335 Merge branch 'slimfast' into 'master'
Reduce size of physics objects by 1/3

See merge request OpenMW/openmw!1024
4 years ago
Alexei Dobrohotov e5f96ab4ae Merge branch 'lol_so_random' into 'master'
Set the ptr's custom data before filling the store so leveled lists have access to the level

See merge request OpenMW/openmw!1028
4 years ago
Evil Eye b95cf4fd00 Set the ptr's custom data before filling the store so leveled lists have access to the level 4 years ago
elsid f92843e3d2
Fix UB: reference binding to misaligned address in Lua tests
/home/elsid/dev/openmw/apps/openmw_test_suite/lua/test_serialization.cpp:166:34: runtime error: reference binding to misaligned address 0x562ea892076c for type 'const struct TestStruct1', which requires 8 byte alignment
0x562ea892076c: note: pointer points here
  00 74 73 31 00 00 00 00  00 00 f8 3f 00 00 00 00  00 00 04 40 21 79 4b 08  00 00 00 74 65 73 74 5f
              ^
    #0 0x562ea6462b8e in deserialize /home/elsid/dev/openmw/apps/openmw_test_suite/lua/test_serialization.cpp:166
    #1 0x562ea68b7402 in deserializeImpl /home/elsid/dev/openmw/components/lua/serialization.cpp:172
    #2 0x562ea68b7bf6 in deserializeImpl /home/elsid/dev/openmw/components/lua/serialization.cpp:204
    #3 0x562ea68b86ea in LuaUtil::deserialize(sol::state&, std::basic_string_view<char, std::char_traits<char> >, LuaUtil::UserdataSerializer const*) /home/elsid/dev/openmw/components/lua/serialization.cpp:251
    #4 0x562ea6464d96 in TestBody /home/elsid/dev/openmw/apps/openmw_test_suite/lua/test_serialization.cpp:197
    #5 0x562ea6d9dac6 in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/elsid/dev/googletest/googletest/src/gtest.cc:2607
    #6 0x562ea6d9dac6 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/elsid/dev/googletest/googletest/src/gtest.cc:2643
    #7 0x562ea6d92e25 in testing::Test::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2682
    #8 0x562ea6d92e25 in testing::Test::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2672
    #9 0x562ea6d93024 in testing::TestInfo::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2861
    #10 0x562ea6d93728 in testing::TestInfo::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2834
    #11 0x562ea6d93728 in testing::TestSuite::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:3015
    #12 0x562ea6d94142 in testing::TestSuite::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2994
    #13 0x562ea6d94142 in testing::internal::UnitTestImpl::RunAllTests() /home/elsid/dev/googletest/googletest/src/gtest.cc:5855
    #14 0x562ea6d9e096 in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/elsid/dev/googletest/googletest/src/gtest.cc:2607
    #15 0x562ea6d9e096 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/elsid/dev/googletest/googletest/src/gtest.cc:2643
    #16 0x562ea6d93140 in testing::UnitTest::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:5438
    #17 0x562ea5d3fdc6 in RUN_ALL_TESTS() /home/elsid/dev/googletest/build/gcc/release/install/include/gtest/gtest.h:2490
    #18 0x562ea5d3fc6f in main /home/elsid/dev/openmw/apps/openmw_test_suite/openmw_test_suite.cpp:11
    #19 0x7fe3938d0b24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24)
    #20 0x562ea5d3fb7d in _start (/home/elsid/dev/openmw/build/gcc/ubsan/openmw_test_suite+0x173eb7d)

/home/elsid/dev/openmw/apps/openmw_test_suite/lua/test_serialization.cpp:176:34: runtime error: reference binding to misaligned address 0x562ea892078f for type 'const struct TestStruct2', which requires 4 byte alignment
0x562ea892078f: note: pointer points here
 75 63 74 32 04  00 00 00 03 00 00 00 04  00 6e 64 69 74 69 6f 6e  73 00 73 68 61 70 65 00  51 00 00
             ^
    #0 0x562ea6462df9 in deserialize /home/elsid/dev/openmw/apps/openmw_test_suite/lua/test_serialization.cpp:176
    #1 0x562ea68b7402 in deserializeImpl /home/elsid/dev/openmw/components/lua/serialization.cpp:172
    #2 0x562ea68b7bf6 in deserializeImpl /home/elsid/dev/openmw/components/lua/serialization.cpp:204
    #3 0x562ea68b86ea in LuaUtil::deserialize(sol::state&, std::basic_string_view<char, std::char_traits<char> >, LuaUtil::UserdataSerializer const*) /home/elsid/dev/openmw/components/lua/serialization.cpp:251
    #4 0x562ea6464d96 in TestBody /home/elsid/dev/openmw/apps/openmw_test_suite/lua/test_serialization.cpp:197
    #5 0x562ea6d9dac6 in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/elsid/dev/googletest/googletest/src/gtest.cc:2607
    #6 0x562ea6d9dac6 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /home/elsid/dev/googletest/googletest/src/gtest.cc:2643
    #7 0x562ea6d92e25 in testing::Test::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2682
    #8 0x562ea6d92e25 in testing::Test::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2672
    #9 0x562ea6d93024 in testing::TestInfo::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2861
    #10 0x562ea6d93728 in testing::TestInfo::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2834
    #11 0x562ea6d93728 in testing::TestSuite::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:3015
    #12 0x562ea6d94142 in testing::TestSuite::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:2994
    #13 0x562ea6d94142 in testing::internal::UnitTestImpl::RunAllTests() /home/elsid/dev/googletest/googletest/src/gtest.cc:5855
    #14 0x562ea6d9e096 in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/elsid/dev/googletest/googletest/src/gtest.cc:2607
    #15 0x562ea6d9e096 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /home/elsid/dev/googletest/googletest/src/gtest.cc:2643
    #16 0x562ea6d93140 in testing::UnitTest::Run() /home/elsid/dev/googletest/googletest/src/gtest.cc:5438
    #17 0x562ea5d3fdc6 in RUN_ALL_TESTS() /home/elsid/dev/googletest/build/gcc/release/install/include/gtest/gtest.h:2490
    #18 0x562ea5d3fc6f in main /home/elsid/dev/openmw/apps/openmw_test_suite/openmw_test_suite.cpp:11
    #19 0x7fe3938d0b24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24)
    #20 0x562ea5d3fb7d in _start (/home/elsid/dev/openmw/build/gcc/ubsan/openmw_test_suite+0x173eb7d)
4 years ago
fredzio 44f822da56 Do not store a btTransform into Projectile class: reduce its size by 112 bytes 4 years ago
fredzio f02d01ef0c Do not store btTransform into Object class: reduce its size by 104 bytes 4 years ago
fredzio 62ef708910 Do not store a btTransform into Actor class: reduce its size by 128 bytes 4 years ago
psi29a 42e50e487a Merge branch 'cleaning' into 'master'
Improve save cleaning

See merge request OpenMW/openmw!1015
4 years ago
psi29a 22068eed6b Merge branch 'navmesh_cache_without_off_mesh' into 'master'
Do not use off mesh connections as a part of navmesh cache key

See merge request OpenMW/openmw!1016
4 years ago
psi29a 6d08a1d731 Merge branch 'skip_async' into 'master'
Don't put player in the air after going out of tcl

See merge request OpenMW/openmw!1009
4 years ago
Evil Eye 087e933326 Close windows using Ptrs that are about to be deleted 4 years ago
elsid beeb882ea8
Do not use off mesh connections as a part of navmesh cache key
To reduce cache size and make it more flexible.

Adding off mesh connections to the navmesh is the last step of navmesh
generation and it's very fast comparing to other steps (microseconds vs
milliseconds). Having less cache size makes get and set operations almost 2x
times faster that also have an order of microseconds. So in total there is
no performance impact.
4 years ago
elsid 6128fcfc82
Use empty off mesh connections in benchmark
To get proper comparison with the next change removing it from the cache key.
4 years ago
Evil Eye 1e1ebb049e Workaround clang and actually erase from the vector 4 years ago
Evil Eye 86c50ece92 Improve save cleaning 4 years ago
elsid 5c9af1742a
Dump moved cell refs in esmtool 4 years ago
elsid cfdbd0d471
Indicate moved cell refs explicitly
This is less error prone approach than use of MovedCellRef fields.

Also make separate functions for skipping and reading moved cell refs to avoid
passing special flags  logic and null pointers for unused arguments.
4 years ago