1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-22 15:23:58 +00:00
Commit graph

20363 commits

Author SHA1 Message Date
Petr Mikheev
b0a6e4e510 [Lua] Add memory usage test 2023-02-26 19:59:53 +01:00
Cody Glassman
924ba11826 Default shader at root
Assign a default shader to the scene root, otherwise objects without an assigned shader will use the FFP. An example of this is a trishape with no material, resulting in an empty stateset on the drawable level.
2023-02-26 09:32:25 -08:00
psi29a
2aac6abb85 Merge branch 'sun_writes' into 'master'
Sun flickering on Mac (part of #7052)

See merge request OpenMW/openmw!2768
2023-02-26 15:32:07 +00:00
psi29a
e8e97679f7 Merge branch 'vsync' into 'master'
Add support for non-adaptive VSync

Closes #7129

See merge request OpenMW/openmw!2769
2023-02-26 13:28:56 +00:00
uramer
552614768f Fix clang format 2023-02-26 14:07:48 +01:00
Andrei Kortunov
be488649c3 Add support for non-adaptive VSync (feature 7129) 2023-02-26 15:19:19 +04:00
Andrei Kortunov
83d15ef786 Fix Clang-Format complaints 2023-02-26 14:34:56 +04:00
Alexei Kotov
c3c61e1cd3 Merge branch 'conjure_cheap_tricks' into 'master'
Increase priority of Bound and Summon spells

Closes #2623

See merge request OpenMW/openmw!2745
2023-02-26 07:42:56 +00:00
Cody Glassman
fb5979312f fix sunglare flash, make sure all bound render targets have color masks set 2023-02-25 15:14:01 -08:00
psi29a
8651ea4412 Merge branch '7214-add-searching-to-ingame-console' into 'master'
Searching in the in-game console

Closes #7214

See merge request OpenMW/openmw!2759
2023-02-25 23:13:12 +00:00
psi29a
c02a159a26 Merge branch 'shader_refactor_v2' into 'master'
Shader refactor

See merge request OpenMW/openmw!2667
2023-02-25 23:11:21 +00:00
Cody Glassman
ac4787aeec shade refactor 2023-02-25 11:03:39 -08:00
psi29a
99acfdccb8 Merge branch 'rm_id_accessor' into 'master'
Remove redundant IdAccessor type

See merge request OpenMW/openmw!2764
2023-02-25 14:38:31 +00:00
Evil Eye
702de406ff Take skill into account when summoning weapons 2023-02-25 14:20:04 +01:00
Evil Eye
ad76b0374a Increase priority of Bound and Summon spells 2023-02-25 14:19:50 +01:00
elsid
4ed0960856
Remove redundant IdAccessor type
Use overloaded free functions instead.
2023-02-25 13:49:22 +01:00
Petr Mikheev
1c2f24d1ca Remove unused searchInContainers in WorldModel::getPtr 2023-02-23 01:57:23 +01:00
Petr Mikheev
47b7c71c73 Remove unused functions 2023-02-23 01:57:23 +01:00
Shihan42
902cad77c8 Resolve minor errors 2023-02-22 20:15:45 +01:00
Shihan42
274afff5c3 Minimal length of search string is now 1 2023-02-22 11:21:04 +01:00
Shihan42
b83cf9a92e Search is case-insensitive 2023-02-22 11:20:50 +01:00
Shihan42
ef879b5865 Rewriting the search methods 2023-02-21 15:01:16 +01:00
Shihan42
54f1f380e1 Add complete search functionality for forward and backward searching 2023-02-21 13:51:27 +01:00
Shihan42
b80556b5af Add buttons to search for next and previous occurrence 2023-02-21 12:25:17 +01:00
Shihan42
63659224fd Add new EditBox for searching to console layout 2023-02-20 18:18:00 +01:00
Cédric Mocquillon
6e23ad82d5 Load esm files from vfs 2023-02-19 21:58:19 +01:00
psi29a
a43b6fba4b Merge branch 'fix_7223' into 'master'
Fix #7223

Closes #7223

See merge request OpenMW/openmw!2736
2023-02-18 22:19:00 +00:00
psi29a
0f331a4fc5 Merge branch 'lua_callback' into 'master'
Fix potential memory leak in LuaUtil::Callback

See merge request OpenMW/openmw!2733
2023-02-18 21:05:07 +00:00
Petr Mikheev
0c3237ad78 Fix #7223 2023-02-18 16:24:10 +01:00
Evil Eye
f5c5ebc1dc Prevent consumption of ingredients that don't have a first effect 2023-02-18 15:30:02 +01:00
psi29a
0ed1310417 Merge branch 'fix_fog_state_load' into 'master'
Fix loading fog state

See merge request OpenMW/openmw!2743
2023-02-18 07:27:05 +00:00
elsid
b5ec584be2
Replace ESM::RefId::sEmpty by default constructed RefId where possible
Static const is only required to provide a reference or a pointer when it is not
possible with default constructed temporary.
2023-02-18 01:07:15 +01:00
elsid
8a62a4fe4d
Support dump for ESM3 CSTA record in esmtool 2023-02-17 23:51:22 +01:00
elsid
28f7a89530
Reuse dtNavMeshQuery
To avoid redundant allocations.
2023-02-17 15:05:25 +01:00
elsid
540ee5399c
Do expensive navmesh calls on timer
Reducing the number of them on each frame.
2023-02-17 15:05:24 +01:00
psi29a
d846a9fc15 Merge branch 'cs_optimize_saving' into 'master'
Fix editor saving performance

See merge request OpenMW/openmw!2741
2023-02-17 13:30:20 +00:00
elsid
e618026c69
Use ESM::RefId as index key in collections 2023-02-17 11:08:46 +01:00
elsid
b2299ef914
Optimize saving in editor 2023-02-17 11:05:25 +01:00
elsid
8383fa3547
Log time spent on document operations in editor 2023-02-17 00:23:02 +01:00
psi29a
18d488d968 Merge branch 'ref_id_class' into 'master'
Convert RefId to class

See merge request OpenMW/openmw!2739
2023-02-15 23:41:58 +00:00
elsid
996153f78d
Convert RefId to class 2023-02-15 23:20:44 +01:00
elsid
b6a2fd8fc1
Simplify InfoCollection
There was additional logic to create topic infos index by topic id to make
getTopicInfos and removeDialogueInfos functions faster. In practice it makes
loading slower.

Move infos index by topic to CSMWorld::Data and use only on loading.
2023-02-15 23:10:35 +01:00
elsid
de24cdc12c
Log content files loading time by editor 2023-02-15 21:29:13 +01:00
psi29a
a0cea6569b Merge branch 'took_an_arrow_to_the_disposition_cap' into 'master'
Cap temporary disposition gain and compute permanent changes accordingly

Closes #7224

See merge request OpenMW/openmw!2734
2023-02-14 21:16:21 +00:00
Petr Mikheev
eceeb15ee5 Fix bug in lua_ui/content.lua: getmetatable(ui.content{}) shouldn't return a global mutable table 2023-02-14 21:08:19 +01:00
Petr Mikheev
65885d994f Don't expose LuaUtil::Callback to lua 2023-02-14 21:08:19 +01:00
Evil Eye
0aa4235096 Cap temporary disposition gain and compute permanent changes accordingly 2023-02-14 20:08:11 +01:00
Petr Mikheev
71ba7b88e2 Move asyncpackage from apps/openmw/mwlua to components/lua 2023-02-14 20:03:32 +01:00
elsid
6d261d38dd
Add functions to read and write ESM::RefId and use them
To be later changed with another implementation.
2023-02-13 22:07:58 +01:00
psi29a
bf0da418f9 Merge branch 'feet_stay_wet' into 'master'
Use the teleported Ptr to determine if water walking should be canceled

Closes #7227

See merge request OpenMW/openmw!2731
2023-02-13 17:51:42 +00:00
Evil Eye
8cabc1bf3b Use the teleported Ptr to determine if water walking should be canceled 2023-02-13 16:38:39 +01:00
elsid
80e6d6cbe3
Support variable size strings in ESM3 2023-02-13 10:18:32 +01:00
elsid
beb017e699
Do not truncate too long strings on writing ESM 2023-02-13 10:18:32 +01:00
elsid
12d36fb1d7
Add missing include 2023-02-13 10:02:30 +01:00
elsid
076e772e3d
Use shared locks in physics system when using multithreaded bullet 2023-02-12 14:51:46 +01:00
psi29a
bfb6bab33b Merge branch 'luaclothingbinds' into 'master'
Lua API for Clothing records

See merge request OpenMW/openmw!2723
2023-02-12 09:47:53 +00:00
Alexei Kotov
09716c644e Assault victims are always aware of the committed crime (bug #7064) 2023-02-12 03:59:20 +03:00
Kindi
4734504e2c Lua binding for Clothing 2023-02-12 00:19:08 +08:00
elsid
1e9e7b7607
Add tests to save and load some ESM3 records 2023-02-11 16:20:10 +01:00
elsid
2e64155c0f
Use signed type for left record and files size in ESM3 reader context
Otherwise reading some of the records like ESM::CellRef without a subrecord
after could lead to underflow of ESM_Context::leftRec which makes
ESM::ESMReader::hasMoreSubs to return true and load hangs for a while trying to
read the same subrecord many times.

Fix ESM::Variant tests since it's now required to have a record for any ESM
data. Add 16 (size of record header) to all expected data sizes.
2023-02-11 16:09:14 +01:00
psi29a
f87b9e7bcb Merge branch 'postprocesshud' into 'master'
Improve post-process HUD search field usability (#7198)

Closes #7198

See merge request OpenMW/openmw!2717
2023-02-11 10:50:04 +00:00
psi29a
8040d7a72a Merge branch 'hopechess' into 'master'
Unequip the weapon only after finishing the attack (bug #4610)

Closes #4610

See merge request OpenMW/openmw!2719
2023-02-11 10:49:08 +00:00
Alexei Kotov
0485b23b5f Reimplement region for TES3 cells 2023-02-11 09:36:15 +03:00
Alexei Kotov
0f7822fff8 Unequip the weapon only after finishing the attack (bug #4610) 2023-02-11 09:00:20 +03:00
Alexei Kotov
1df5fd341b Don't override post-processing HUD search field focus 2023-02-11 03:04:39 +03:00
Alexei Kotov
3b8001d55d Make post-processing HUD search case-insensitive 2023-02-11 02:56:15 +03:00
psi29a
a31d381611 Merge branch 'esm_format_version' into 'master'
Name all custom ESM format versions and add tests

See merge request OpenMW/openmw!2712
2023-02-10 20:43:06 +00:00
elsid
080700f8fe
Name all custom ESM format versions and add tests 2023-02-10 19:54:15 +01:00
psi29a
5eba755174 Merge branch 'forwardtothepast' into 'master'
Support /-separated big effect icon paths

See merge request OpenMW/openmw!2711
2023-02-10 17:44:26 +00:00
psi29a
886600a1dd Merge branch 'consoledisposal' into 'master'
Check if the console's selected object is available (bug #5870)

Closes #5870

See merge request OpenMW/openmw!2713
2023-02-10 17:26:54 +00:00
psi29a
d3874644c1 Merge branch 'oripaging' into 'master'
Try printing template textures if instance textures are unavailable for any reason

See merge request OpenMW/openmw!2709
2023-02-10 16:53:02 +00:00
Alexei Kotov
7b62d47abc Support /-separated big effect icon paths 2023-02-10 18:34:20 +03:00
Andrei Kortunov
5836bd8d87 Remove redundant include 2023-02-10 19:24:12 +04:00
Alexei Kotov
e96448d66f Use model template as a fallback in BetaComment 2023-02-10 17:24:02 +03:00
Alexei Kotov
f356d0a2fc Check if the console's selected object is available (bug #5870) 2023-02-10 16:08:38 +03:00
psi29a
b385f27f86 Merge branch 'console_history' into 'master'
Remembering console commands between sessions

Closes #7125

See merge request OpenMW/openmw!2603
2023-02-10 11:54:45 +00:00
Kindi
044d82a842 Remembering console commands between sessions 2023-02-10 11:54:45 +00:00
psi29a
f14031b30b Merge branch 'ori' into 'master'
Print bound textures in BetaComment (feature #7194)

See merge request OpenMW/openmw!2705
2023-02-10 07:45:57 +00:00
Alexei Kotov
192f79841b Print bound textures in BC (feature #7194) 2023-02-10 03:05:33 +03:00
Alexei Kotov
5340c2c816 Fix Lua ingredient bindings 2023-02-10 02:50:13 +03:00
elsid
d20b05c7fb
Support reading specific nif files from archive by niftest 2023-02-08 22:59:33 +01:00
elsid
2c43a8558a
Add option to disable debug log for unsupported nif files
It becomes quite extensive and not very useful when loading oblivion content
files.
2023-02-08 22:59:29 +01:00
elsid
ac5f22445e
Support compressed BSA archives by niftest 2023-02-08 22:07:37 +01:00
elsid
1a2c56fefb
Fix checking for file extension in niftest 2023-02-08 21:54:25 +01:00
elsid
36b33cc1a5
Support absence of player and other actors in physics system 2023-02-08 20:19:59 +01:00
psi29a
944931c9bf Merge branch 'load_esm4_lights' into 'master'
Adds ESM4 light into ESM4 Cells

See merge request OpenMW/openmw!2692
2023-02-07 16:50:10 +00:00
florent.teppe
486d15b19e moved light common to its own file
moved esm4light to it's own file
2023-02-07 16:29:17 +01:00
elsid
4b8941677d
Do not write binary data to std::cout by esmtool 2023-02-07 10:40:31 +01:00
florent.teppe
dc961e3189 Adds the light into the scene.
Common struct for ESM3 and ESM4 light
2023-02-07 10:07:59 +01:00
elsid
f09789002a
Define hardcoded global variable names as constants 2023-02-07 00:47:34 +01:00
elsid
af003d94f8
Log error when failed to open stats file 2023-02-06 21:52:35 +01:00
psi29a
a0795ba7ae Merge branch 'launch_fix' into 'master'
Fix some non-ASCII path issues

Closes #6817

See merge request OpenMW/openmw!2686
2023-02-06 19:50:30 +00:00
psi29a
91a4c09fa6 Merge branch 'oldtelvanniheart' into 'master'
Use correct exterior cell when positioning

See merge request OpenMW/openmw!2688
2023-02-06 19:46:00 +00:00
florent.teppe
a71a86e64a Load light models in the engine. Doesn't emit light 2023-02-06 20:22:17 +01:00
psi29a
4f001d8736 Merge branch 'qt6' into 'master'
Add an initial Qt6 support

See merge request OpenMW/openmw!2684
2023-02-06 16:55:20 +00:00
Evil Eye
97c6d25d54 Use correct exterior cell when positioning 2023-02-06 16:36:45 +01:00
Andrei Kortunov
7e2aedf637 Add an initial Qt6 support 2023-02-06 18:38:59 +04:00
Andrei Kortunov
5836d27928 Fix ContentSelector usage with non-ASCII paths 2023-02-06 13:36:02 +04:00
psi29a
4032c447e9 Merge branch 'load-ESM4-Cell' into 'master'
Can load and coc into an interrior oblivion cell

See merge request OpenMW/openmw!2647
2023-02-06 08:56:23 +00:00
glassmancody.info
e778ffee9b po2 scaling for average luminance 2023-02-05 12:30:38 -08:00
psi29a
aee7716c3a Merge branch 'launcher_typed_settings' into 'master'
Typed launcher settings

See merge request OpenMW/openmw!2650
2023-02-04 23:41:59 +00:00
psi29a
8b0e55dd5f Merge branch 'remove-water-walking-teleport-underwater' into 'master'
teleporting to an underwater marked location will remove water walking spell effects from actor

Closes #7122

See merge request OpenMW/openmw!2656
2023-02-04 23:41:29 +00:00
psi29a
822c6ac6a7 Merge branch 'fix_warnings' into 'master'
Enable and fix new warnings

See merge request OpenMW/openmw!2679
2023-02-04 23:40:06 +00:00
florent.teppe
084207af64 Avoids a lot a special cases for ESM3 vs ESM4 cells. 2023-02-04 23:25:06 +01:00
James-Deciutiis
273a2ae323 teleporting to an underwater marked location will remove water walking spell effects from actor
fix formatting

addressing hasWaterWalking comment

refactor to address remaining comments

clean up formatter changes

adding suggested condition to if statement

move isWaterWalking check into if statement

refactor if block to see if actor needs to have water walking purged

added entry to changelog.md and authors.md

removing redundant check from if statement

Sort previous changelog entry
2023-02-04 11:30:37 -08:00
florent.teppe
f3d5f6345e Fixed large lambdas that affected readability. 2023-02-04 17:16:42 +01:00
florent.teppe
1caed2de2a Applies some review comments.
Proper visit for ESM::CellVariant

Fixed MWWorldCell constructor
2023-02-04 17:09:54 +01:00
unelsson
fe70285ac1 Fixes 2023-02-04 15:32:17 +02:00
elsid
f1dbd9b959
Fix -Wduplicated-branches warnings 2023-02-04 00:10:30 +01:00
elsid
c79c14da91
Fix -Wnon-virtual-dtor warnings 2023-02-03 23:00:09 +01:00
psi29a
3f9cae7947 Merge branch 'dragdetails' into 'master'
[OpenMW-CS] Generate record filters based on cell content and column header

Closes #7161

See merge request OpenMW/openmw!2617
2023-02-03 09:29:36 +00:00
psi29a
68b3b90255 Merge branch 'ui_content_leak' into 'master'
Move implementation of UI Content to Lua (#7155)

See merge request OpenMW/openmw!2661
2023-02-01 22:51:47 +00:00
psi29a
9c92a8ab57 Merge branch 'fix_gpu_osg_stats' into 'master'
Delay OSG stats reporting for 3 frames

See merge request OpenMW/openmw!2677
2023-02-01 22:49:18 +00:00
elsid
96ea1903c5
Delay OSG stats reporting for 3 frames
Instead of 2 to make sure GPU draw time taken is always reported.
2023-02-01 22:01:55 +01:00
Evil Eye
31b2112e4a Don't lowerCase twice when getting globals 2023-02-01 18:15:49 +01:00
uramer
e96681151c Get rid of the LuaUI::Content namespace 2023-02-01 17:18:50 +01:00
uramer
d24c506b0e Move metatable protection asserts to tests 2023-02-01 16:34:32 +01:00
uramer
fb0646dda1 Remove Ui Content counter in Lua profiler 2023-01-31 19:52:28 +01:00
uramer
bbbef96087 Switch to loadInternalLib 2023-01-31 19:50:33 +01:00
Petr Mikheev
c4e8d38e30 Do several passes of garbage collecting in LuaManager::clear() 2023-01-31 11:08:01 +00:00
psi29a
3a986d9a51 Merge branch 'macos_water_compile_fix' into 'master'
Fix building water.cpp on macos

See merge request OpenMW/openmw!2670
2023-01-31 11:00:55 +00:00
florent.teppe
4e7cde5d72 applied some review changes.
crashfix tests
2023-01-30 20:49:34 +01:00
psi29a
92f88c16a9 Merge branch 'remove-strerror' into 'master'
Remove strerror usages

Closes #7151

See merge request OpenMW/openmw!2664
2023-01-30 17:09:39 +00:00
psi29a
68ad3f8f10 Fix building water.cpp on macos 2023-01-30 17:04:41 +00:00
psi29a
ac8ae3f226 Merge branch 'journalbooks' into 'master'
Use string_view in journalbooks

See merge request OpenMW/openmw!2663
2023-01-30 13:25:12 +00:00
psi29a
6559860310 Merge branch 'water_nm_to_vfs' into 'master'
Move water normal to vfs (#7180)

Closes #7180

See merge request OpenMW/openmw!2657
2023-01-30 13:18:27 +00:00
psi29a
ef0a81e811 Merge branch 'integration_tests_crash_log' into 'master'
Use proper log paths and print crash log in integration tests CI job

See merge request OpenMW/openmw!2668
2023-01-30 12:12:21 +00:00
Petr Mikheev
3096111abb Merge branch 'docs_fixes' into 'master'
Documentation and API fixes (part of !2529)

See merge request OpenMW/openmw!2649
2023-01-30 10:13:26 +00:00
uramer
c17eedd348 Documentation and API fixes (part of !2529) 2023-01-30 10:13:26 +00:00
elsid
c44bc5ade5
Setup logging with properly initialized configuration manager
Default constructed instance may provide different paths from initialized one.
2023-01-30 09:30:55 +01:00
Andrzej Głuszak
9b0a499b58 Remove strerror usages 2023-01-29 22:41:59 +01:00
Andrzej Głuszak
66e5fbb286 Use string_view in journalbooks 2023-01-29 21:31:21 +01:00
unelsson
5bbe9bc5d8 cleanup and style (const ref instead of value, consistent ifndef naming) 2023-01-29 21:42:01 +02:00
unelsson
6b0998ff85 Implement enum class FilterType 2023-01-29 21:23:28 +02:00
glassmancody.info
897ee702d1 move water normal to vfs 2023-01-29 11:14:08 -08:00
uramer
259f104311 Clean up 2023-01-29 19:40:13 +01:00
unelsson
2e7d41373b Remove unused includes, fix std::get logic at editwidget 2023-01-29 20:35:00 +02:00
uramer
3618b3f409 Fix Content::View::remove 2023-01-29 18:52:18 +01:00
uramer
fc1430af95 Move implementation of UI Content to Lua 2023-01-29 17:07:38 +01:00
unelsson
2fac4d0e40 Use struct with sensible member names 2023-01-29 17:25:25 +02:00
psi29a
3a9a60a453 Merge branch 'esmtool_esm4_globals' into 'master'
Support more fields in esmtool for ESM4

See merge request OpenMW/openmw!2659
2023-01-29 11:30:01 +00:00
psi29a
29aa18659d Merge branch 'handle_bad_navmeshtool_message_magic' into 'master'
Stop updating navmeshtool progress on first bad message

See merge request OpenMW/openmw!2654
2023-01-29 11:28:40 +00:00
florent.teppe
144e0197fb fix charge int + struct vs class mismatch 2023-01-29 12:27:41 +01:00
florent.teppe
ebfee18e35 implements std::visit for CellVariant, fixes struct vs class forward decl 2023-01-29 11:28:39 +01:00
florent.teppe
0723c32428 flags no longer bitfield 2023-01-29 10:59:39 +01:00
florent.teppe
aa29f86efe fixed struct vs class. 2023-01-29 10:59:39 +01:00
fteppe
808c7367c9 Fix compile 2023-01-29 10:54:21 +01:00
elsid
d541436b15
Support parent, type and value fields in esmtool for ESM4 2023-01-29 03:02:00 +01:00
elsid
e7acced5e9
Move metafunctions to check ESM4 field existence to a separate header 2023-01-29 03:00:48 +01:00
elsid
5bb088218e
Restore original formId
To make sure esmtool prints original value and not a result of conversion.
2023-01-29 02:35:06 +01:00
glassmancody.info
165013ddd6 remove redunant conditional checks when getting uniforms 2023-01-28 10:40:24 -08:00
florent.teppe
9054722f4a std::visit everywhere! 2023-01-28 19:21:13 +01:00
florent.teppe
f9da66e9ee Greatly improved how the variant on MWWorld::CellRef works 2023-01-28 18:57:55 +01:00
florent.teppe
216ca71149 Applied review comments
getEditorName => getNameId
restored cosntructor in CoordinateConverter
2023-01-28 12:14:00 +01:00
florent.teppe
e6e27413d9 gives MWWorld::CellRef the MWWorld::Cell treatment
MWWorld::CellRef now has a variant, and datas that are part of the intersection of both ESM4::Reference and ESM::CellRef are part of MWWorld::CellRef

For ESM4 most data isn't filled in, so it returns default values.
2023-01-27 19:40:45 +01:00
elsid
8be2fc9fd7
Stop updating navmeshtool progress on first bad message 2023-01-27 19:10:53 +01:00
florent.teppe
23614ae2ae Renamed esm3esm4bridge => esmbridge 2023-01-27 18:40:15 +01:00
florent.teppe
5037dcf9bc Fixes a crash on launch and some compile issue
also uses std::visit in cellstore comparison to avoid missing combinasion

split loadrefs in loadref of ESM4 and ESM3.
2023-01-27 16:41:00 +01:00
florent.teppe
cb8cdd8831 ESM::CellVariant aans MWWorld:Cell now take reference in constructor: signals that nullptr isn't accepted.
also applied other review comments.
2023-01-27 14:07:50 +01:00
florent.teppe
531e55e04c Better handling of the esm3 vs esm4 cell problem
Common attribute are in one structure that has two constructors, one for ESM3 vs ESM4 Cell
Mood part of MWWorld::Cell
2023-01-27 13:39:39 +01:00
elsid
cf75363290
Typed launcher settings
QMultiMap is not clear about what settings exist and it's not efficient way to
access them after they are loaded.
2023-01-27 12:42:05 +01:00
elsid
b1d0ee1f1b
Load only launcher.cfg from user folder
There is no other launcher.cfg.
2023-01-27 12:41:33 +01:00
elsid
0961720835
Join path components using path::operator/ instead of string::operator+ 2023-01-27 01:07:15 +01:00
florent.teppe
6d25d4bc13 It loads cells and palce sstatics in them
Many missing meshes, no lights etc... But can coc into interior cells and see them.
2023-01-26 22:37:32 +01:00
florent.teppe
3515c8e61a Static references are created as refcells, nothing displayed yet. 2023-01-26 22:37:32 +01:00
florent.teppe
c896a2ca48 Crashfix on launch 2023-01-26 22:37:32 +01:00
florent.teppe
0018bcf7de Should make cellvariant safer to use.
Hopefully clang tidy agrees.
2023-01-26 22:37:32 +01:00
florent.teppe
562e129bd0 encapsulations of esm3 cell and esm4 cells. 2023-01-26 22:37:31 +01:00
florent.teppe
08b68fcd48 Cannot load a cell yet, but getting more necessary parts in 2023-01-26 22:36:11 +01:00
florent.teppe
cddf6f29d6 Nothing can be loaded yet. Just foundations. 2023-01-26 22:36:11 +01:00
unelsson
9b808a495c Use std::variant and std::visit instead of function overloads, add float type search, fix QMetaType and Type conversion 2023-01-26 00:05:51 +02:00
Evil Eye
7ca25e6467 Fix more case issues with cells 2023-01-25 20:59:10 +01:00
psi29a
9f3025257a Merge branch 'local_nwah' into 'master'
Use worldspace coords in AiWanderStorage

See merge request OpenMW/openmw!2645
2023-01-24 09:52:32 +00:00
fteppe
889de35b99 fix coc search extbyname 2023-01-23 22:49:01 +01:00
Evil Eye
d40a9ec5bc Use worldspace coords in AiWanderStorage 2023-01-23 21:06:50 +01:00
psi29a
a9dbb023d7 Merge branch 'lua_create' into 'master'
Lua commands to create/move/remove objects; consistent handling of disabled objects (#6726, #6893)

See merge request OpenMW/openmw!2627
2023-01-22 13:27:10 +00:00
Andrei Kortunov
a774a51699 Improve duration tooltip 2023-01-22 14:32:47 +04:00
Petr Mikheev
c294898246 Lua commands to create/move/remove objects; consistent handling of disabled objects (#6726, #6893) 2023-01-22 00:08:21 +01:00
psi29a
7be20301af Merge branch '24-7lofibeatstoachievechimto' into 'master'
Rework music playback (bug #7172)

Closes #7172

See merge request OpenMW/openmw!2640
2023-01-21 23:07:25 +00:00
Petr Mikheev
e7120f189b Unset RefNums after copying containers (otherwise copies will have the same RefNums, but they should be unique) 2023-01-21 23:43:00 +01:00
Petr Mikheev
5983f22290 Remember actor in the actor's InventoryStore instead passing the actor in every call 2023-01-21 23:43:00 +01:00
psi29a
1422053fa9 Merge branch 'more_uniforms' into 'master'
[Postprocessing] Add sky and ambient colors

See merge request OpenMW/openmw!2638
2023-01-21 22:42:21 +00:00
florent.teppe
a4137e941c std::string_view can be used in map and unordered map
This avoids some unecessary dynamic allocations.
Also applies some review advice.
2023-01-21 19:19:26 +01:00
florent.teppe
63e44eddc9 Navigator doesn't use RefId anymore 2023-01-21 18:39:57 +01:00
florent.teppe
150e2ba885 Revert "Use ESM::RefId for worldspace in detournavigator"
This reverts commit b4ab153418.

# Conflicts:
#	apps/navmeshtool/worldspacedata.cpp
2023-01-21 18:39:57 +01:00
florent.teppe
3780033837 Reverts Cell name to a string 2023-01-21 18:39:42 +01:00
psi29a
1390c7ed7c Merge branch 'wizard_encodings' into 'master'
Do not use Qt streams with legacy encodings in the Wizard code

Closes #7165

See merge request OpenMW/openmw!2634
2023-01-21 16:37:43 +00:00
psi29a
761aef61ae Merge branch 'normal_fix' into 'master'
Fix pass normals (#7146, #7145)

See merge request OpenMW/openmw!2635
2023-01-21 16:36:45 +00:00
psi29a
757cf7098d Merge branch 'minor-cleanup' into 'master'
Use dedicated function to convert QString to std::filesystem::path

See merge request OpenMW/openmw!2636
2023-01-21 16:36:07 +00:00
Alexei Kotov
fd6e96576a Rework music playback (bug #7172) 2023-01-21 05:56:12 +03:00
glassmancody.info
564c408663 expose more uniforms to postprocessing 2023-01-20 17:43:54 -08:00
AnyOldName3
438b03908d Use dedicated function to convert QString to std::filesystem::path II
Some missed conversions identified in review.
2023-01-20 23:39:30 +00:00
Andrei Kortunov
9a7c57874d Do not use Qt streams with legacy encodings in the Wizard code 2023-01-20 11:24:23 +04:00
Alexei Kotov
f0e58d1c59 Merge branch 'ensure_utf8_encoding' into 'master'
Move ensureUtf8Encoding to named namespace

See merge request OpenMW/openmw!2632
2023-01-20 05:17:44 +00:00
AnyOldName3
f757ac642a Use dedicated function to convert QString to std::filesystem::path
I noticed this while reviewing something else and trying to find the
function to recommend using it.
2023-01-19 22:36:51 +00:00
glassmancody.info
27fe8d42ae fix pass normals 2023-01-19 09:28:51 -08:00
elsid
dd89403df0
Move ensureUtf8Encoding to named namespace
To follow https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#sf21-dont-use-an-unnamed-anonymous-namespace-in-a-header

Add QtGlobal include to define QT_VERSION and QT_VERSION_CHECK macroses before
they're used.
2023-01-18 22:58:35 +01:00
Evil Eye
08f998eeb1 Delay teleportation till the menu is closed 2023-01-18 19:57:05 +01:00
psi29a
ee980721b8 Merge branch 'debug_lua_memory' into 'master'
Additional information in Lua profiler

See merge request OpenMW/openmw!2612
2023-01-18 14:33:05 +00:00
psi29a
3fea82c06c Merge branch 'remove_ptr_conversion' into 'master'
Remove implicit conversion MWWorld::Ptr -> bool

See merge request OpenMW/openmw!2626
2023-01-18 14:32:58 +00:00
elsid
cf1d8544e3
Check agent bounds on adding agent to navigator
Do not add agent bounds which are not supported by recastnavigation with given
settings and log such events.

To avoid reaching navmesh tile generation to find out it can't be generated for
such agent bounds.
2023-01-18 12:00:48 +01:00
Petr Mikheev
e9420b2b68 Remove implicit conversion MWWorld::Ptr -> bool 2023-01-18 02:40:56 +01:00
unelsson
ba6c47bb07 Implement record filter search by value and QVariant type recognition 2023-01-17 02:55:47 +02:00
unelsson
fc64ab0f5a Promise constness 2023-01-17 02:55:03 +02:00
unelsson
6a864cd9f6 Implement basic filter generation from the dragged table cell (cell content and column header) 2023-01-16 23:47:32 +02:00
unelsson
bc1027ee95 First draft of getting the exact drag start location 2023-01-16 23:47:32 +02:00
Alexei Kotov
b261f3bf65 Fix animated object physics 2023-01-16 17:08:48 +03:00
psi29a
ee862fe825 Merge branch 'qt6_fixes' into 'master'
Do not use reprecated Qt API where we can avoid it

See merge request OpenMW/openmw!2621
2023-01-15 21:05:51 +00:00
psi29a
ea91d861ef Merge branch 'safely_on_the_other_side_of_the_door' into 'master'
End combat when the target is outside the active grid

See merge request OpenMW/openmw!2619
2023-01-15 19:00:03 +00:00
elsid
1cbe295030
Extend navigator tests for update with big object
Check for the number of generated recast mesh tiles and navmesh tiles.
2023-01-15 17:25:13 +01:00
Andrei Kortunov
cc1c8b2bb1 Do not use a deprecated way to get dimensions of screen where current widget is located 2023-01-15 20:23:18 +04:00
Andrei Kortunov
99a575b663 Init QVariant in Qt6-compatible way 2023-01-15 20:23:07 +04:00
Andrei Kortunov
0b3ba26d86 Init style in Qt6-compatible way 2023-01-15 20:09:56 +04:00
Andrei Kortunov
0de635dcdc Do not use deprecated init() method 2023-01-15 20:09:56 +04:00
Andrei Kortunov
0864d997d0 Add missing includes 2023-01-15 20:09:56 +04:00
Evil Eye
358fa98bd3 End combat when the target is outside the active grid 2023-01-15 17:08:57 +01:00
psi29a
a7a89ba7c1 Merge branch 'launcher' into 'master'
Rework how OpenMW launcher looks

Closes #6922

See merge request OpenMW/openmw!2587
2023-01-15 16:00:59 +00:00
psi29a
dc3ec1a0a0 Merge branch 'mwscript' into 'master'
Multiple mwscript optimizations and some refactoring

See merge request OpenMW/openmw!2600
2023-01-15 15:59:30 +00:00
psi29a
32733d23fa Merge branch 'xanim' into 'master'
X-file handling fixes (bug #5371)

Closes #5371

See merge request OpenMW/openmw!2614
2023-01-15 15:57:27 +00:00
psi29a
9198a4e46a Merge branch 'fix_navigator_update_for_big_object' into 'master'
Limit NavMeshManager update range by player tile and max tiles (#7149)

See merge request OpenMW/openmw!2618
2023-01-15 15:53:37 +00:00
Andrei Kortunov
902c48d1bb Rework launcher UI 2023-01-15 12:36:08 +04:00
elsid
44429f0393
Limit NavMeshManager update range by player tile and max tiles
Object AABB may be much larger than area currently covered by navmesh. In this
case all tiles beyond covered range should be ignored. Attempt to iterate over
them will not result in any new tile updates but can take quite a while. At
maximum this can be pow(INT_MAX - INT_MIN, 2) iterations.

Use arbitrary time limit to check for update call to finish in the test.
2023-01-15 04:46:29 +01:00
Alexei Kotov
6ff9b5d326 Make use of ends_with for KF 2023-01-15 01:48:06 +03:00
unelsson
50726636ba clang-format 2023-01-14 21:42:33 +02:00
unelsson
7fce4bc8c4 Issue command passing through QLineInput 2023-01-14 21:30:25 +02:00
unelsson
0310b1cddf Dragging Topics to TopicInfo window opens create TopicInfo BottomBox with the correct id 2023-01-14 20:36:49 +02:00
unelsson
7f8a84f2f2 Move Response column earlier 2023-01-14 16:19:37 +02:00
Alexei Kotov
e24db874dc Correct xnif use for creatures 2023-01-14 04:55:12 +03:00
Alexei Kotov
434b4deda1 Don't use xkf if xnif is merely the base model (bug #5371) 2023-01-14 04:55:12 +03:00
elsid
b88f0d2dbd
Replace mwscript program serialization into a vector with simple struct
Mostly to avoid string literal lookup by index with iteration over all preciding
literals and calling strlen. This is very inefficient. In genral this makes code
much more straightforward but also makes it portable since now int and float of
different sizes are properly supported.
2023-01-14 00:07:37 +01:00
Petr Mikheev
d9e9db0983 Additional information in Lua profiler 2023-01-13 21:14:23 +01:00
psi29a
203eb80afd Merge branch 'qregexp' into 'master'
Simplify regex search in the editor

See merge request OpenMW/openmw!2610
2023-01-13 15:55:19 +00:00
psi29a
599f68029e Merge branch 'only_snow' into 'master'
Fix invisible weather effects

See merge request OpenMW/openmw!2601
2023-01-13 09:58:51 +00:00
psi29a
b7e5759599 Merge branch 'noanchor' into 'master'
Replace usage of QRegularExpression::anchoredPattern with `^` and `$`

See merge request OpenMW/openmw!2607
2023-01-13 09:55:59 +00:00
Andrei Kortunov
7c8fb79745 Suppress a warnings spam when user entered an invalid regular expression 2023-01-13 12:08:42 +04:00
Andrei Kortunov
7c709167d9 Simplify regex search in the editor 2023-01-13 11:28:49 +04:00
jvoisin
c90d22f3b2 Replace usage of QRegularExpression::anchoredPattern with ^ and $
Using `^` and `$` is shorter than `QRegularExpression::anchoredPattern`,
and even allows us in one case to get rid of a trailing `.*`.
2023-01-12 22:52:00 +01:00
jvoisin
853ca5827e Simplify a regex and fix a typo
- The usage of `|` is wrong
- It's `mWhiteListQuotes` and not `mWhiteListQoutes`
- Replace weird usage of `{}`-based quantifiers
2023-01-12 22:49:23 +01:00
Andrei Kortunov
bfcbc2350d Handle UTF-8 in Qt streams in the Qt6-compatible way 2023-01-12 15:39:50 +04:00
Andrei Kortunov
307a60e87c Migrate from QRegExp to more modern QRegularExpression 2023-01-11 11:21:46 +04:00
glassmancody.info
7ddf47908f only enable occlusion for snow 2023-01-10 14:09:02 -08:00
psi29a
7c078883d5 Merge branch 'default_ref_num' into 'master'
Use default initializers for ESM::RefNum members

See merge request OpenMW/openmw!2598
2023-01-10 09:12:37 +00:00
psi29a
0028127b42 Merge branch 'lua_mwscript' into 'master'
Access local mwscript variables in Lua scripts

See merge request OpenMW/openmw!2589
2023-01-10 08:47:12 +00:00
elsid
c173348cbe
Use default initializers for ESM::RefNum members
Instead of unset function that is removed now and assignments all over the code.
2023-01-10 00:44:51 +01:00
glassmancody.info
23708b1ba6 correct shader name 2023-01-09 10:27:52 -08:00
psi29a
b1571b92bf Merge branch 'fix_7135' into 'master'
Add missing initializer in mwworld/worldmodel.cpp (fixes #7135)

Closes #7135

See merge request OpenMW/openmw!2596
2023-01-09 09:15:23 +00:00
psi29a
c24f43ec32 Merge branch 'occlusion_tweaks' into 'master'
Weather occlusion updates

See merge request OpenMW/openmw!2595
2023-01-08 22:13:36 +00:00
Petr Mikheev
2b4e613522 Add missing initializer in mwworld/worldmodel.cpp (fixes #7135) 2023-01-08 21:55:42 +01:00
psi29a
2754d63e45 Merge branch 'cleanup_actions' into 'master'
Cleanup unused actions

See merge request OpenMW/openmw!2591
2023-01-08 20:14:35 +00:00
glassmancody.info
ee1acd6eb1 add sfc setting, only add to subgraph when enabled 2023-01-08 11:55:33 -08:00
florent.teppe
0de6b79966 Fixes issue with topic info edition.
Also future proofs reference on RefId's string.
2023-01-08 12:59:47 +01:00
Petr Mikheev
7a0b998d4f Cleanup unused actions 2023-01-07 23:42:53 +01:00
psi29a
b6d0d09c5a Merge branch 'cell_hastag' into 'master'
[Lua] New function `cell.hasTag`

See merge request OpenMW/openmw!2567
2023-01-07 22:22:31 +00:00
psi29a
6a250c5900 Merge branch 'baby_it_is_occluded_outside' into 'master'
Weather Particle Occlusion (#5492)

Closes #5492

See merge request OpenMW/openmw!1328
2023-01-07 22:18:45 +00:00
psi29a
83718878b2 Merge branch 'Load_ESM4' into 'master'
Loading ESM4 data and storing them in the ESMStore

See merge request OpenMW/openmw!2557
2023-01-07 22:17:17 +00:00
psi29a
a9d3186173 Merge branch 'fix_esm_fixed_string_warning' into 'master'
Fix gcc warning: array subscript n is outside array bounds of ‘const char [n]’

See merge request OpenMW/openmw!2585
2023-01-07 22:15:16 +00:00
Petr Mikheev
8c7cad024b Access local mwscript variables in Lua scripts 2023-01-07 22:10:10 +01:00
Alexei Kotov
fa7991fcb3 For hit state, cancel non-biped idle if there is an active animation 2023-01-07 22:35:29 +03:00
Alexei Kotov
152bdb2f65 Prevent missing KO animations from cancelling KO 2023-01-07 22:21:56 +03:00
Andrei Kortunov
9630246cae Sort quests in journal by name (bug 7054) 2023-01-07 18:55:51 +04:00
glassmancody.info
9a4977d334 rain occlusion 2023-01-06 22:23:03 -08:00
elsid
2bbed8cc06
Fix gcc warning: array subscript 5 is outside array bounds of ‘const char [5]’
In function ‘bool ESM::operator==(const FixedString<capacity>&, const T* const&) [with long unsigned int capacity = 5; T = char; <template-parameter-1-3> = void]’,
    inlined from ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = ESM::FixedString<5>; T2 = const char*]’ at /home/elsid/dev/googletest/build/gcc/release/install/include/gtest/gtest.h:1358:11,
    inlined from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = ESM::FixedString<5>; T2 = const char*; typename std::enable_if<((! std::is_integral<_Tp>::value) || (! std::is_pointer<_Dp>::value))>::type* <anonymous> = 0]’ at /home/elsid/dev/googletest/build/gcc/release/install/include/gtest/gtest.h:1377:64,
    inlined from ‘virtual void {anonymous}::EsmFixedString_equality_operator_for_not_convertible_to_uint32_with_const_char_pointer_Test::TestBody()’ at apps/openmw_test_suite/esm/test_fixed_string.cpp:165:9:
components/esm/esmcommon.hpp:134:19: warning: array subscript 5 is outside array bounds of ‘const char [5]’ [-Warray-bounds]
  134 |         return rhs[capacity] == '\0';
      |                ~~~^
apps/openmw_test_suite/esm/test_fixed_string.cpp: In member function ‘virtual void {anonymous}::EsmFixedString_equality_operator_for_not_convertible_to_uint32_with_const_char_pointer_Test::TestBody()’:
apps/openmw_test_suite/esm/test_fixed_string.cpp:164:20: note: at offset 5 into object ‘other’ of size 5
  164 |         const char other[5] = { 'a', 'b', 'c', 'd', '\0' };
      |                    ^~~~~
2023-01-06 22:09:07 +01:00
elsid
c80ba92ab7
Add more tests for ESM::FixedString 2023-01-06 21:00:29 +01:00
elsid
7c60905266
Put ESM::FixedString tests into unnamed namespace 2023-01-06 21:00:29 +01:00
psi29a
c9d57788fb Merge branch 'save_fix' into 'master'
Clear character name in the loading menu when there are no saves left

See merge request OpenMW/openmw!2583
2023-01-06 18:09:00 +00:00
Andrei Kortunov
760135591b Clear character name in the loading menu when there are no saves left (bug 7088) 2023-01-06 19:36:53 +04:00
psi29a
452ea3d353 Merge branch 'skeleton_b_gone' into 'master'
Don't use a levelled creature's base pointer when spawning a new instance

See merge request OpenMW/openmw!2578
2023-01-06 10:14:32 +00:00
psi29a
0d8d15a732 Merge branch 'fixcolladaanimopbug' into 'master'
Fix Collada animated object bug #7051

Closes #7051

See merge request OpenMW/openmw!2565
2023-01-06 10:10:27 +00:00
unelsson
bfa0e751dd Skip merging for only animated models (Collada) 2023-01-05 01:34:26 +02:00
psi29a
c2b0c01ff2 Merge branch 'addScript' into 'master'
Raise an error if initData in obj:addScript has incorrect type

See merge request OpenMW/openmw!2577
2023-01-04 22:53:50 +00:00
psi29a
319aa11d84 Merge branch 'l10n_rename' into 'master'
Reorganize l10n files

See merge request OpenMW/openmw!2546
2023-01-04 21:48:00 +00:00
Evil Eye
a08f37cfe8 Don't use a levelled creature's base pointer when spawning a new instance 2023-01-04 22:18:56 +01:00
Petr Mikheev
4b8b3a9187 Raise an error if initData in obj:addScript has incorrect type. 2023-01-04 21:40:35 +01:00
psi29a
1e62b84f9a Merge branch 'lua_initdata' into 'master'
Allow passing `initData` to the :addSript call (#7091)

Closes #7091

See merge request OpenMW/openmw!2568
2023-01-04 14:32:23 +00:00
unelsson
d065dbbefa Add named-based Collada recognition 2023-01-04 16:07:47 +02:00
florent.teppe
400d51c099 Fix compile MSVC 2023-01-04 14:19:12 +01:00
florent.teppe
b88eee08c2 Store display's the ESM4's RecnameInt when not found 2023-01-04 14:07:47 +01:00
florent.teppe
631fa26872 Applies review advice. 2023-01-04 12:22:16 +01:00
florent.teppe
e80dbd7c95 Moved the test to test_store.cpp where it belongs 2023-01-04 00:17:45 +01:00
florent.teppe
64a9f742da Improves check: throws an error that says which RecName is used twice. 2023-01-03 23:28:31 +01:00
florent.teppe
9b1c405467 On store creation checks that each record has a different RecordId. 2023-01-03 22:16:42 +01:00
glassmancody.info
6b6c732a59 properly update postprocess uniform for sun position in interiors 2023-01-03 10:16:30 -08:00
psi29a
a24fa3ea51 Merge branch 'collada_animation_layering' into 'master'
Collada animation layering

See merge request OpenMW/openmw!2475
2023-01-03 08:53:23 +00:00
psi29a
28dcde8909 Merge branch 'controls' into 'master'
Fix jumping (was broken by !2541)

See merge request OpenMW/openmw!2572
2023-01-03 08:51:21 +00:00
florent.teppe
1b66be9c70 Fix dangling reference. 2023-01-02 19:47:12 +01:00
florent.teppe
3b2d9161c4 Applied review advice
better deals with templated functions meant for esm3 used by esm4s.
simplified loading of esm4 and dealing with unhandled record types.
2023-01-02 19:20:03 +01:00
Petr Mikheev
f0a06258fb [Lua] New function cell:hasTag 2023-01-02 18:24:37 +01:00
Petr Mikheev
18088e3e31 Fix jumping (was broken by !2541) 2023-01-02 17:37:31 +01:00
Petr Mikheev
8c7d347179 Reorganize l10n files 2023-01-02 13:21:05 +01:00
florent.teppe
077cf97bc4 The esm4 reader logic is mutualised
to avoid copy pasting code, readerutils gives functions that take visitors as params to decide how a record must be handled

Check encoder exists, and get value of stateless encoder.

fixes code formatting conventions

Fixed output of record with RefId

also fixed readTypedRecord and readRecord to have the proper return types

Check if the type has a sRecordId
2023-01-01 19:22:27 +01:00
florent.teppe
c721a6cafa Initial commit to load ESM4
Some data is actually loaded and store in ESM Store
Any new ESM4 will go through the same code path and be automatically sent to the right store
2023-01-01 16:22:57 +01:00
Petr Mikheev
b248c3e173 Allow passing initData to the :addSript call (#7091) 2022-12-31 22:08:17 +01:00
Petr Mikheev
aabd5a98c7 Fix 'toggle spell' control (was broken by !2541) 2022-12-31 13:12:12 +01:00
unelsson
fe7660eec8 clang-format again 2022-12-31 00:53:36 +02:00
unelsson
d60fd86719 clang format 2022-12-31 00:52:05 +02:00
unelsson
33afcbdc13 Use common function for blendmask detection, remove extra debug logs 2022-12-31 00:35:50 +02:00
unelsson
ffc64205c5 Force collada animation layers, remove nif blend mask detection. 2022-12-31 00:35:50 +02:00
psi29a
d5f5e53714 Merge branch 'playercontrols' into 'master'
Move some of player controls logic from C++ to Lua

See merge request OpenMW/openmw!2541
2022-12-30 16:57:40 +00:00
psi29a
e6064645db Merge branch 'esm_ref_id_refactor' into 'master'
Simplify ESM::RefId

See merge request OpenMW/openmw!2563
2022-12-30 13:27:35 +00:00
psi29a
4b6fd63044 Merge branch 'detournavigator_ref_id' into 'master'
Use ESM::RefId for worldspace in detournavigator

See merge request OpenMW/openmw!2562
2022-12-30 13:26:55 +00:00
elsid
755067f0f3
Remove redundant ESM::RefId member functions 2022-12-30 00:32:47 +01:00
elsid
b4ab153418
Use ESM::RefId for worldspace in detournavigator 2022-12-29 23:49:49 +01:00
Evil Eye
0a4f65c20b Prioritise Absorb Attribute and Skill similarly to Damage and Drain 2022-12-29 12:41:37 +01:00
Evil Eye
dfca5d95c2 Don't apply spell multiplier to on hit enchantments 2022-12-29 12:40:10 +01:00
Petr Mikheev
103908ffc7 Move getNorthVector out of MWWorld::World (used only in one place) 2022-12-28 22:06:49 +01:00
Petr Mikheev
310acaeee9 Don't pass MWLua::WorldView to MWLua::Action 2022-12-28 22:06:49 +01:00
Petr Mikheev
aef2e9d8de Replace World::getExterior with WorldModel::getCell 2022-12-28 22:06:49 +01:00
Petr Mikheev
1869aeae5c Move some of player controls logic from C++ to Lua 2022-12-28 22:04:19 +01:00
Petr Mikheev
0fef8f12d0 Remove functions WorldModel::rest and WorldModel::recharge 2022-12-28 12:45:11 +01:00
Petr Mikheev
b8fb013edf Merge MWLua::ObjectRegistry and MWWorld::WorldModel 2022-12-28 12:45:11 +01:00
psi29a
80e2cd79ec Merge branch 'boat_closer_to_todd' into 'master'
Ignore special characters preceding script commands

Closes #6807

See merge request OpenMW/openmw!2555
2022-12-28 11:21:24 +00:00
psi29a
ba2ececa93 Merge branch 'resolution' into 'master'
Improve window mode change

Closes #7087

See merge request OpenMW/openmw!2530
2022-12-28 10:45:14 +00:00
psi29a
7827d3ae8f Merge branch 'fix_hour_modulo' into 'master'
Fix hour modulo expression (#7121)

Closes #7121

See merge request OpenMW/openmw!2556
2022-12-28 10:33:20 +00:00
elsid
25ead80d8b
Fix hour modulo expression
Round result of std::fmod(hours, 24) to the nearest float below 24 on double to
float conversion when it is not. Add special type and conversion function along
with tests to be used in all places where such conversion happens.

To avoid producing hours equal to 24 due to double to float precision loss.
2022-12-28 00:04:04 +01:00
florent.teppe
afed7e60ef Upgraded Filesave version for RefIDs
Fix logic issue
2022-12-27 23:05:31 +01:00
florent.teppe
dc21df97c8 Fixed issue with getSummonedCreature( that returned a reference to a non const static value
Fix compile, and apply review comment

Fixed greater vs more typo.

getCellname is back to a string view.

Because in most cases was used as a strong not a refId.
and there was a fundamental issue with region names used as a cellname
2022-12-27 19:16:22 +01:00
florent.teppe
1ef1de974d script blacklist => RefId
Applies changes from review

Fixed clang format

Clang format + review.
2022-12-27 19:16:21 +01:00
florent.teppe
2c30575b3b CellName is now a RefId, makes more sense that way. 2022-12-27 19:16:21 +01:00
florent.teppe
6ff90b34a8 Fixed an issue with RefId in CellRefs where Ids wouldn't be loaded
Fixed multiple issues from the review.
2022-12-27 19:15:58 +01:00
florent.teppe
42e45723b7 Fixes issue in MW script compilation that would silently produce the wrong bytecode
Fixes issue when fetching MyGui values that were stored as RefId but fetched as String

Removed some uncessary copies, fixed issues with lowercase and uneeded changes
2022-12-27 19:15:57 +01:00
florent.teppe
0f3499f504 Renamed string => Id, makes more sense considering the new underlying type
Fixes unnecessary copies, and issues with case sensitive comparisons.

fixed modification that wasn't necessary

Fixed type mismatch, and unecessary copy
2022-12-27 19:15:57 +01:00
florent.teppe
30a020883e Avoids unecessary copies
Fixed issue with lowerCase

Oups fixed compialtion on openMW_test_suite
2022-12-27 19:15:57 +01:00
florent.teppe
b61d5d8123 Some RefId == ESM::RefId::StringRefId('constString') still existed 2022-12-27 19:15:57 +01:00
florent.teppe
a7d0a8d9d1 Replaced some RefId* => RefId&
Rebase fix commit
2022-12-27 19:15:57 +01:00
florent.teppe
d49f60d2d6 To change fewer things with the master implementation, the Id isn't changed to lower case on creation
lower case utility functions used in comparison functions
2022-12-27 19:15:57 +01:00
florent.teppe
65cdd489fb create a specific esm reader function for RefID to avoid allocation for string and then again for RefId
Fixed some types

removed useless header

applied clang format

fixed compile tests

fixed clang tidy, and closer to logic before this MR

Removed hardcoded refids

unless there is a returned value we don't use static RefIds
can use == between RefId and hardcoded string

Fix clang format

Fixed a few instances where std::string was used, when only const std::string& was needed

removed unused variable
2022-12-27 19:15:57 +01:00
florent.teppe
874ff88288 In the interpretter, the id is no longer passed by vallue, but as a const reference instead.
In getMembersLocal(, a reference to a reference wrapper is used, because the id can change, bu all we need to do is change a pointer.No need to change the value
2022-12-27 19:15:56 +01:00
fteppe
09d461a8cd fixed Topic selected event
Fix rebase
2022-12-27 19:15:56 +01:00
fteppe
c283ea0ae8 string_view& => string_view
fixed ref to temp variable
2022-12-27 19:15:56 +01:00
fteppe
7da38113be Changed more hardcoded RefId to be static to avoid multiple runtime creations
adresses multiple review comments
2022-12-27 19:15:56 +01:00
fteppe
b57dd6d083 Fixed search random, it is a prefix so not a refId
Fixed situation where we return a const reference to a static variable that may change if the same function is called multiple times
2022-12-27 19:15:55 +01:00
fteppe
62d8fe3fc2 changed a few hardcoded refIds used in mutliple places to be defined only once in a variable 2022-12-27 19:15:55 +01:00
fteppe
20da0892ef openMW_test_suite compiles and runs
Slowly moving through the open-cs errors

Good progress in openCS

Very good progress on openCS

Getting closer with openCS

OpenCS compiles and runs! Didn't have time to test it all though

ix openMW

everything compiles on windows??

Fix gcc

Fix Clang
2022-12-27 19:15:55 +01:00
fteppe
2f2e401559 is Hidden marker now takes a const RefId& instead of a string_view 2022-12-27 19:15:55 +01:00
fteppe
c8bb733360 removed clear() function, the only way to change the Id from the outside is from the assignment operator
replaced ciEqual with == operator
2022-12-27 19:15:55 +01:00
fteppe
ee941f9b09 RefId's mId can't be get as mutable from the outside
also removed useless operator= defintion
2022-12-27 19:15:55 +01:00
fteppe
69d70d64f6 Fixed GUI that used RefId when it should have used strings 2022-12-27 19:15:54 +01:00
fteppe
125b21de20 Initial commit: In ESM structures, replace the string members that are RefIds to other records, to a new strong type
The strong type is actually just a string underneath, but this will help in the future to have a distinction so it's easier to search and replace when we use an integer ID

Slowly going through all the changes to make, still hundreds of errors

a lot of functions/structures use std::string or stringview to designate an ID. So it takes time

Continues slowly replacing ids. There are technically more and more compilation errors

I have good hope that there is a point where the amount of errors will dramatically go down as all the main functions use the ESM::RefId type

Continue moving forward, changes to the stores

slowly moving along

Starting to see the fruit of those changes.

still many many error, but more and more Irun into a situation where a function is sandwiched between two functions that use the RefId type.

More replacements. Things are starting to get easier

I can see more and more often the issue is that the function is awaiting a RefId, but is given a string
there is less need to go down functions and to fix a long list of them.

Still moving forward, and for the first time error count is going down!

Good pace, not sure about topics though, mId and mName are actually the same thing and are used interchangeably

Cells are back to using string for the name, haven't fixed everything yet. Many other changes

Under the bar of 400 compilation errors.

more good progress <100 compile errors!

More progress

Game settings store can use string for find, it was a bit absurd how every use of it required to create refId from string

some more progress on other fronts

Mostly game settings clean

one error opened a lot of other errors. Down to 18, but more will prbably appear

only link errors left??

Fixed link errors

OpenMW compiles, and launches, with some issues, but still!
2022-12-27 19:15:54 +01:00
Evil Eye
b19ad079c2 Ignore special characters preceding script commands 2022-12-27 14:59:56 +01:00
psi29a
8b0eba8906 Merge branch 'blockofcoal' into 'master'
Play blocked hit sound on the victim, not the attacker

See merge request OpenMW/openmw!2551
2022-12-27 13:20:04 +00:00
Andrei Kortunov
9e77654ab4 Add a hint about disabled resolution list in the Windowed Fullscreen mode 2022-12-27 13:42:39 +04:00
Andrei Kortunov
08f7554e38 Improve window mode change (feature #7087) 2022-12-27 13:42:37 +04:00
Alexei Kotov
cdd6a8c007 Merge branch 'models_for_the_model_god' into 'master'
Implement TestModels/T3D

Closes #7058

See merge request OpenMW/openmw!2506
2022-12-27 00:41:39 +00:00
Alexei Kotov
83d563e2ff Merge branch 'classless' into 'master'
Don't call getClass on an empty Ptr

See merge request OpenMW/openmw!2552
2022-12-27 00:26:14 +00:00
Alexei Kotov
f11d4b76d1 Merge branch 'stay_mad' into 'master'
Update a reference's base record pointer on resurrection

Closes #7084

See merge request OpenMW/openmw!2527
2022-12-27 00:20:47 +00:00
Evil Eye
1cf0befd07 Don't call getClass on an empty Ptr 2022-12-26 21:13:24 +01:00
Alexei Kotov
74225991ca Play blocked hit sound on the victim, not the attacker 2022-12-26 19:07:02 +03:00
Cédric Mocquillon
76d77bf3c3 Connect zoom in/out only when the option is allowed 2022-12-25 17:03:28 +01:00
elsid
0b399a9d1a
Fix detournavigator tests
d40c09c18c changed the logic in parallel with
15e8f0b53c making this check invalid.
2022-12-23 19:26:15 +01:00
elsid
15e8f0b53c
Check input and report errors via RecastContext
Recast functions have preconditions for arguments they don't validate. This may
produce garbage data which may lead to crash. Check arguments and log when they
are invalid.

Do not throw exceptions when these function calls fail, capture Recast reported
errors via RecastContext inherited from rcContext and log them.
2022-12-19 19:46:45 +01:00
Petr Mikheev
de57a95c9d Rename mCells -> mWorldModel 2022-12-16 00:15:11 +01:00
Petr Mikheev
ac6303a83a Rename MWWorld::Cells -> WorldModel 2022-12-15 20:45:18 +01:00
AnyOldName3
66b8d4fb29 Add a setting to control coverage adjustment
With it on, which was always the case before this setting was added,
vanilla content and poorly-made mods will look acceptable, but well-made
mods will have alpha-tested meshes appear to grow and potentially gain a
weird outline as they get further away.

With it off, which replicates the 0.46 behaviour, well-made mods will
look really good, but vanilla content and poorly-made mods will have
alpha-tested meshes shrink as they get further away.

It's been bugging me that this was forced on since 0.47 released, and
I'd hoped to figure out a solution for automatic detection at some point
before 0.48 branched off, but I didn't, so now this is what we're
getting to have Tamriel Rebuilt look right.
2022-12-09 00:22:08 +00:00
psi29a
1d55be8214 Merge branch 'lua_profiler' into 'master'
Lua profiler

See merge request OpenMW/openmw!2523
2022-12-07 10:53:47 +00:00
psi29a
eabb230de2 Merge branch 'keep_calm_and_get_hit' into 'master'
Add option to restore non-MCP Calm spell behaviour

Closes #7063

See merge request OpenMW/openmw!2522
2022-12-07 10:33:17 +00:00
Evil Eye
69fe4594fc Reset mCharGen along with the other MyGUI-holding members 2022-12-05 17:48:24 +01:00
psi29a
06a626452c Merge branch 'ptr2' into 'master'
Refactoring; slightly reduce amount of code in worldimp.cpp

See merge request OpenMW/openmw!2498
2022-12-05 08:54:18 +00:00
Petr Mikheev
7c36a7eb49 Run Lua GC in every frame 2022-12-03 17:09:11 +01:00
Petr Mikheev
55db95d4cf Update Lua profiler; add ability to run OpenMW with old LuaJit that doesn't allow custom allocator (Lua profiler will be disabled in this case) 2022-12-03 16:58:03 +01:00
Evil Eye
209a102061 Update a reference's base record pointer on resurrection 2022-12-01 17:07:10 +01:00
Petr Mikheev
02a9069a0e Lua Profiler 2022-11-30 00:06:14 +01:00
Petr Mikheev
6fa65e4729 Track memory and CPU usage per script in LuaUtil::LuaState 2022-11-30 00:06:14 +01:00
Evil Eye
a648e4cc11 Add option to restore non-MCP Calm spell behaviour 2022-11-23 20:59:37 +01:00
Cédric Mocquillon
dde8ee0611 Delay the deletion of esm versions after the deletion of the scene as it is used in one of its workers (the objectpaging one) 2022-11-20 20:48:48 +01:00
Petr Mikheev
aa230698a8 Apply clang-format 2022-11-13 15:35:26 +01:00
Petr Mikheev
313df72be0 Remove raycasting functions from MWWorld::World 2022-11-13 15:35:26 +01:00
Petr Mikheev
7a354d8c78 Remove from MWWorld::World a few functions that already exist in MWWorld::Cells and MWWorld::Scene 2022-11-13 12:37:37 +01:00
Petr Mikheev
2df993004c Make MWWorld:Cells and MWWorld::Scene to be accessible via Environment 2022-11-13 12:37:37 +01:00
AnyOldName3
08361a6682 Merge branch 'LOD-support-to-Object-Paging' into 'master'
Add LOD support to Object Paging

See merge request OpenMW/openmw!2459
2022-11-12 15:25:57 +00:00
Cédric Mocquillon
7142bb4ce7 Select only one level of LOD outside the active grid
Do not create group when not needed
2022-11-11 20:56:46 +01:00
psi29a
518bd03547 Merge branch 'post_ui' into 'master'
Improve postprocess HUD layout

See merge request OpenMW/openmw!2505
2022-11-10 22:36:04 +00:00
Evil Eye
b94818b24a Tweak message and temporarily set model ttl to 0 2022-11-10 17:24:58 +01:00
Andrei Kortunov
da5b442fcf Improve postprocess HUD layout 2022-11-10 08:31:21 +04:00
Alexei Kotov
1d31c5eb6f Remove the correct bound item when the effect expires 2022-11-10 01:18:46 +03:00
psi29a
d29d68f1ba Merge branch 'allycache' into 'master'
Always consider an actor their own ally (bug #6313)

Closes #4229 and #6313

See merge request OpenMW/openmw!2504
2022-11-09 21:01:57 +00:00
Cédric Mocquillon
4140e4ea05 Remove LOD which could never be displayed in a chunk 2022-11-09 21:57:48 +01:00
psi29a
577c9ad5fb Merge branch 'deprecated' into 'master'
Replace gmtime with safer equivalents

See merge request OpenMW/openmw!2503
2022-11-09 09:20:07 +00:00
Evil Eye
0ae5755abb Implement TestModels/T3D 2022-11-08 22:36:15 +01:00
Alexei Kotov
5d11238723 Always consider an actor their own ally (bug #6313) 2022-11-08 20:13:20 +03:00
psi29a
7669a43495 Merge branch 'dialogue_result_scripts' into 'master'
Reimplement --script-all-dialogue to be more useful to modders

See merge request OpenMW/openmw!2494
2022-11-08 15:46:16 +00:00
psi29a
fa50890633 Merge branch 'sm-snap-to-reference' into 'master'
Open-CS: Snap to Reference

See merge request OpenMW/openmw!2484
2022-11-08 15:30:26 +00:00
Alexei Kotov
914fba229d Replace gmtime with safer equivalents 2022-11-08 16:38:40 +03:00
Alexei Kotov
a5adb73900 Make idle emitters emit ripples every 1.5 seconds (bug #5883) 2022-11-08 12:48:24 +03:00
psi29a
3ca17e5183 Merge branch 'landofwindandshade' into 'master'
Handle landing in the frame the jump is over (bug #5849)

Closes #5849

See merge request OpenMW/openmw!2499
2022-11-08 08:25:31 +00:00
Alexei Kotov
1db9247c45 Restart player block animation during blocking if necessary 2022-11-07 22:09:56 +03:00
Alexei Kotov
180963488f Play shield hit sound when the hit is blocked (bug #6645) 2022-11-07 22:02:30 +03:00
Alexei Kotov
9b8399c353 Handle landing in the frame the jump is over (bug #5849) 2022-11-07 19:06:01 +03:00
Petr Mikheev
6025943fed Add missing content=builtin.omwscripts if openmw is started via openmw-cs (fixes #7056) 2022-11-05 16:30:44 +01:00
Max Henzerling
897cdc62d8 Add snap to reference 2022-11-04 15:04:42 -07:00
Evil Eye
f61083d02c Replace switch statements 2022-11-04 12:20:37 +01:00
Evil Eye
29a46b0fc0 Reimplement --script-all-dialogue to be more useful to modders 2022-11-03 20:54:44 +01:00
psi29a
6960fc9304 Merge branch 'opencs_iwyu' into 'master'
Run IWYU on the opencs

See merge request OpenMW/openmw!2481
2022-11-02 21:41:53 +00:00
psi29a
fd176d6faf Merge branch 'shutup_no_one_cares' into 'master'
Ignore 0 attributes on dead NPCs

See merge request OpenMW/openmw!2490
2022-11-02 08:19:37 +00:00
elsid
013f56088b
Support negative days in TimeStamp
As vanilla engine does.
2022-11-01 22:17:39 +01:00
Evil Eye
45cd5bdbd7 Ignore 0 attributes on dead NPCs 2022-11-01 20:14:40 +01:00
jvoisin
1a326294c0 Run IWYU on the opencs 2022-10-31 21:04:01 +01:00
Evil Eye
4a48156378 Only force adjust the player and NPCs teleported out of the active grid 2022-10-31 12:29:29 +01:00
Evil Eye
5448338b21 Allow bound effects to be recast if they're attached to a recastable effect 2022-10-28 23:10:47 +02:00
Petr Mikheev
4f5443118e Merge branch 'fix_coroutine_crash' into 'master'
Fix coroutine-related crashes

Closes #6996

See merge request OpenMW/openmw!2447
2022-10-18 22:30:13 +00:00
uramer
a2fa1fe0a5 Execute async callbacks on the main Lua stack 2022-10-18 22:12:11 +02:00