1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 12:23:53 +00:00
Commit graph

17873 commits

Author SHA1 Message Date
Pi03k
e641bea606 Toggling table columns visibility 2021-09-22 10:47:08 +02:00
Petr Mikheev
5893b88409 Ignore time to destination when giving way (#6296) 2021-09-22 01:46:04 +02:00
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
2021-09-21 22:39:31 +02:00
Evil Eye
786b6b7c9a Merge branch 'lua_util' into 'master'
Move LuaState::makeReadOnly(sol::table) out of the class

See merge request OpenMW/openmw!1229
2021-09-21 15:14:09 +00:00
florent.teppe
d9c3ba03f4 Uses limits instead of climits 2021-09-20 21:01:28 +02:00
Bo Svensson
99df1c695c
fixes wireframe is broken (#3123)
* renderingmanager.cpp [ci skip]

* groundcover.hpp [ci skip]

* groundcover.cpp

* renderingmanager.cpp [ci skip]

* renderingmanager.hpp
2021-09-20 20:17:55 +02:00
florent.teppe
2d32954888 Replaced Assert_true with expect_eq 2021-09-20 19:56:47 +02:00
psi29a
15bcbb5844 Merge branch 'getsquareroot' into 'master'
Remove duplicate GetSquareRoot implementation

See merge request OpenMW/openmw!1231
2021-09-19 19:49:55 +00:00
Evil Eye
831055f878 Merge branch 'OpenCS-fix-modify' into 'master'
OpenCS - Re-implement the fix for Issue #6067.

See merge request OpenMW/openmw!1173
2021-09-19 19:23:30 +00:00
florent.teppe
0e06e9b221 Removed useless comment and converted the file to UTF8 to keep special characters 2021-09-19 20:31:22 +02:00
Evil Eye
6d7cb38834 Remove duplicate GetSquareRoot implementation 2021-09-19 19:53:38 +02:00
florent.teppe
c1c501ca35 Added test to make sure keyword search works even with non ascii characters 2021-09-19 15:05:48 +02:00
florent.teppe
bcb0526268 Added climits, it compiled on VS2019, but not with g++ 2021-09-19 15:00:51 +02:00
Petr Mikheev
2f25257a3e Move LuaState::makeReadOnly(sol::table) out of the class because it doesn't need to access LuaState internals. 2021-09-19 14:38:27 +02:00
Petr Mikheev
f1e3c55ea3 Fix deadlock in Lua worker thread (#6286) 2021-09-19 11:32:52 +02:00
florent.teppe
76be2e91e5 Fixed an issue where keyword search expected the text to be all ASCII characters 2021-09-18 18:25:04 +02:00
psi29a
68db9869f5 Merge branch 'DistantTerrainDebugChunks' into 'master'
Debug terrain chunks

See merge request OpenMW/openmw!1169
2021-09-18 15:21:26 +00:00
psi29a
18f5762a76 Merge branch 'master' into 'OpenCS-preserve-blocked'
# Conflicts:
#   CHANGELOG.md
2021-09-18 15:20:26 +00:00
unelsson
70e210735a Optimize terrain editing brush drawing performance 2021-09-18 15:57:00 +03:00
Pi03k
4ff5a04e9b Remove redundant qt-related cmake macros 2021-09-17 14:41:04 +02:00
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.
2021-09-16 22:11:19 +02:00
psi29a
2be3a76b6a Merge branch 'spin_me_right_round' into 'master'
Reset rotation when respawning actors

Closes #6273

See merge request OpenMW/openmw!1219
2021-09-15 08:27:25 +00:00
psi29a
24d1c2b5fa Merge branch 'recurse_directory_iterator' into 'master'
VFS manager refactoring

See merge request OpenMW/openmw!1218
2021-09-15 07:20:52 +00:00
Cédric Mocquillon
6817282097 Move getFileExtension to common header and use instead of repeating same code 2021-09-14 18:09:55 +02:00
Cédric Mocquillon
c2df0949e2 Change normalizeFilename signature 2021-09-14 18:09:55 +02:00
Cédric Mocquillon
d4e26746a3 Use recurse subdirectory iterator to iterate over the VFS without exposing internal details 2021-09-14 18:09:54 +02:00
Evil Eye
60298cd66d Reset rotation when respawning actors 2021-09-14 16:53:57 +02:00
pi03k
e4eeb9cce9 Remove 'no relevant classes' moc warning 2021-09-14 11:20:18 +02:00
Bo Svensson
b6f572578e
Groundcover optimisation (#3101)
* groundcover.cpp share state

* groundcover.hpp share state
2021-09-13 12:20:00 +02:00
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
2021-09-12 14:15:11 +00:00
psi29a
c40f921396 Revert "actoranimation.cpp faster getbonebyname (#3099)"
This reverts commit c284d0cf5c
2021-09-12 07:56:20 +00:00
Cédric Mocquillon
080c909c28 Merge the 'debug chunks' and 'object paging debug batches' settings into a single one 2021-09-11 21:53:05 +02:00
Bo Svensson
e2d0e86020
cellpreloader.cpp unused variable (#3102) 2021-09-11 20:58:42 +02:00
psi29a
f8c7664234 Merge branch 'copy_before_move' into 'master'
Maybe fix #6259

Closes #6259

See merge request OpenMW/openmw!1197
2021-09-11 09:32:50 +00:00
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]
2021-09-10 17:58:57 +02:00
Bret Curtis
1edeffbafc constify getBoneByName 2021-09-09 23:57:20 +02:00
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]
2021-09-09 23:10:22 +02:00
Bo Svensson
c284d0cf5c
actoranimation.cpp faster getbonebyname (#3099) 2021-09-09 23:04:38 +02:00
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]
2021-09-09 22:56:57 +02:00
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). 2021-09-09 20:46:27 +02:00
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.
2021-09-09 18:39:50 +02:00
psi29a
149241daae Merge branch 'dead_animation_code_removal' into 'master'
Dead animation code removal

Closes #6264

See merge request OpenMW/openmw!1198
2021-09-08 10:07:54 +00:00
JanuarySnow
bdbc6c0cba Dead animation code removal 2021-09-08 10:07:54 +00:00
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
2021-09-08 09:55:42 +00:00
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.
2021-09-07 14:52:42 +02:00
psi29a
aef6ec464c Merge branch 'optimize_add_item' into 'master'
Optimize ContainerStore::stacks (attempt #2)

See merge request OpenMW/openmw!1200
2021-09-07 08:40:02 +00:00
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.
2021-09-06 22:52:09 +02:00
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.
2021-09-06 22:52:08 +02:00
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.
2021-09-06 22:44:52 +02:00
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. 2021-09-06 12:51:25 +02:00
psi29a
6170971ea3 Merge branch 'bettermoveinstance' into 'master'
Set instance movement based on camera zoom

See merge request OpenMW/openmw!1186
2021-09-06 09:48:30 +00:00
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 "";
      |                    ^~
2021-09-04 18:04:45 +02:00
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
2021-09-04 12:41:52 +00:00
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
2021-09-03 15:16:14 +00:00
psi29a
a0201feb97 Merge branch 'lua_tostring' into 'master'
Function LuaUtil::toString

See merge request OpenMW/openmw!1187
2021-09-03 13:09:17 +00:00
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.
2021-09-03 13:14:05 +02:00
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.
2021-09-03 10:24:05 +02:00
jvoisin
d4e3575f1d Don't use const for objects returned by value.
This prevents the usage of std::move semantics,
and makes clang-tidy sad.
2021-09-01 22:23:50 +02:00
unelsson
f876ff2c14 Clear temporary movement data at the end of the drag 2021-09-01 02:04:04 +03:00
unelsson
53d315c862 XYZ-locking, mouse wheel move fix 2021-09-01 02:04:04 +03:00
unelsson
23fe3d74ab Use floats, not doubles 2021-09-01 02:04:04 +03:00
unelsson
840e7615f5 Store object origins and move difference 2021-09-01 02:04:04 +03:00
unelsson
0d511da615 Test of basic mouse-plane use 2021-09-01 02:04:04 +03:00
fredzio
d1a5bc207b Iterate over mInactiveCells when unloading cells in TestCells / TestInteriorCells. Otherwise we dereference an invalid iterator after deactiveCell(). 2021-08-31 16:53:52 +02:00
elsid
0daf6f5d0b Merge branch 'comma' into 'master'
Don't use comma where there is no need to.

See merge request OpenMW/openmw!1179
2021-08-31 12:33:15 +00:00
Petr Mikheev
33d4d88447 Function LuaUtil::toString 2021-08-31 09:41:58 +02:00
Evil Eye
18f51e1026 Merge branch 'nonull' into 'master'
Don't pass a nullptr to a std::string constructor

See merge request OpenMW/openmw!1178
2021-08-30 18:59:06 +00:00
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
2021-08-29 19:39:51 +00:00
jvoisin
db4fe11a44 Don't pass a nullptr to a std::string constructor
This is undefined behaviour.
2021-08-29 20:41:15 +02:00
jvoisin
deb2af6acc Dont copy-construct from a const-ref when used only as a const-ref
This also makes clang-tiny a bit happier
2021-08-29 20:22:34 +02:00
jvoisin
a15cca5763 Use reserve on vectors for fixed loops
This is a bit useless, but has the merit of appeasing clang-tiday
2021-08-29 20:18:49 +02:00
jvoisin
a6b1e38eab Don't use comma where there is no need to. 2021-08-29 14:12:14 +02:00
cc9cii
0a5571f19e Disable editing for blocked records in both table and dialogue edit widget. 2021-08-29 15:27:59 +10:00
Evil Eye
b4486992f0 Allow Rieklings and Goblins to attack again 2021-08-28 10:45:00 +02:00
cc9cii
b0d5ca386d Update original cell column and do not modify the refnum when moving a reference to another cell with 3D editing. 2021-08-28 16:12:40 +10:00
cc9cii
2eb210f31a Partially undo commit 71be4cdd20 so that moved references retain the original refnum. This is consistent with vanilla CS's behaviour. 2021-08-28 16:12:40 +10:00
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.
2021-08-28 14:09:55 +10:00
cc9cii
7264a10c07 Partially revert commit dab1a9e7fb 2021-08-28 09:49:45 +10:00
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.
2021-08-28 09:42:54 +10:00
psi29a
66f028c4a1 Merge branch 'correctcommandimplementation' into 'master'
Don't do storage in constructors of the commands

See merge request OpenMW/openmw!1126
2021-08-27 07:30:45 +00:00
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
2021-08-26 15:06:38 +00:00
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
2021-08-26 14:29:49 +00:00
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
2021-08-26 07:55:12 +00:00
psi29a
b585aad81e Merge branch 'offset-bullet-debug' into 'master'
glPolygonOffset for Bullet debug geometry

See merge request OpenMW/openmw!684
2021-08-25 07:26:21 +00:00
unelsson
de3497d291 Fix undo-redo crash 2021-08-22 23:42:27 +03:00
unelsson
890ce1eefb Reverse action order for redo and undo 2021-08-22 23:42:27 +03:00
unelsson
0cfabd6f3b Move mapToSource back to constructor 2021-08-22 23:42:27 +03:00
unelsson
b2fe591590 Don't do any storing in the constructor 2021-08-22 23:42:27 +03:00
unelsson
45549da0f5 For most commands, set mOld in redo, not in constructor 2021-08-22 23:42:27 +03:00
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
2021-08-22 19:22:54 +00:00
psi29a
855f491196 Merge branch 'splintercell' into 'master'
Clean up text key extraction

See merge request OpenMW/openmw!1163
2021-08-22 14:51:54 +00:00
Alexei Dobrohotov
0922d0b105 Clean up text key extraction 2021-08-22 05:56:30 +03:00
Petr Mikheev
3771e523f1 More object bindings 2021-08-21 17:18:11 +02:00
Alexei Dobrohotov
31e70f2ecc Merge branch 'minor_factorisation' into 'master'
Minor factorisation in apps/openmw/mwmechanics/actors.cpp

See merge request OpenMW/openmw!1143
2021-08-21 06:22:17 +00:00
cc9cii
28ad139464 Check if deleted, just in case. 2021-08-21 07:20:10 +10:00
psi29a
d09c807a40 Merge branch 'fixbadcast' into 'master'
Fix std::bad_cast

Closes #6217

See merge request OpenMW/openmw!1130
2021-08-20 20:36:44 +00:00
unelsson
7801f42005 Don't do mapToSource at executeModify 2021-08-20 22:32:41 +03:00
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
2021-08-20 19:29:42 +00:00
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.
2021-08-20 19:02:09 +02:00
psi29a
77e58abf0d Merge branch 'lua_input' into 'master'
Lua package 'openmw.input'

See merge request OpenMW/openmw!1073
2021-08-20 11:44:42 +00:00