Commit Graph

17796 Commits (4ff5a04e9b3470847dd77efe3261e43c047c2b4f)

Author SHA1 Message Date
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
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
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