1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 20:29:57 +00:00
Commit graph

19978 commits

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