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

21198 commits

Author SHA1 Message Date
psi29a
354798fc7f Merge branch 'terrain_fixes' into 'master'
Do not copy QVectors twice

See merge request OpenMW/openmw!3308
2023-08-02 08:10:32 +00:00
psi29a
4aafcf5fdc Merge branch 'rm_path_to_next_path_point' into 'master'
Do not build path to next path point via navmesh

See merge request OpenMW/openmw!3306
2023-08-02 07:53:01 +00:00
elsid
22981af2ea
Make sure ESM4 cell description is not empty
To avoid logging empty cell descriptions on loading and unloading. Not all cells
have editor id but every has id and coordinates. Add world to distinguish cell
coordinates in different worldspaces.
2023-08-01 14:42:53 +02:00
Andrei Kortunov
0723b44a65 Do not copy QVectors twice 2023-08-01 15:45:18 +04:00
psi29a
c86eecb2ea Merge branch 'movable_objects' into 'master'
Move objects instead of copying where possible

See merge request OpenMW/openmw!3289
2023-08-01 10:43:44 +00:00
psi29a
6ff2bb8aeb Merge branch 'more_esm4_fields' into 'master'
Support ESM4 record FullName, CellFlags, X, Y fields by esmtool

See merge request OpenMW/openmw!3299
2023-08-01 07:25:34 +00:00
psi29a
23671ced33 Merge branch 'fix_use_after_move' into 'master'
Fix use after move in InfoOrder::insertInfo

See merge request OpenMW/openmw!3296
2023-08-01 07:25:17 +00:00
elsid
fbeb3ab03a
Do not build path to next path point via navmesh
To void a situation when next path point continuously changing making actor go
in circles.

This is unnecessary but also creates problems since pathgrid is used to build
path for AiWander.
2023-07-31 22:02:21 +02:00
Andrei Kortunov
35561450f1 Do not copy osg::ref_ptr when possible 2023-07-31 20:43:46 +04:00
Andrei Kortunov
d3d7a663c6 Move some objects instead of copying 2023-07-31 20:43:46 +04:00
Andrei Kortunov
dee9ebd05e Fix operations order 2023-07-31 20:15:30 +04:00
Andrei Kortunov
b1c8a968ae Do not use invalid iterators 2023-07-31 17:53:33 +04:00
Andrei Kortunov
deba5b4d47 Catch unhandled exceptions 2023-07-31 16:35:31 +04:00
Andrei Kortunov
da06cd005e Init variables 2023-07-31 16:35:31 +04:00
Andrei Kortunov
c50769c8c5 Catch filesystem exceptions 2023-07-31 16:35:31 +04:00
psi29a
1d207ed318 Merge branch 'test_load_deleted_dialinfo' into 'master'
Add test to ensure deleted DialInfos are removed

See merge request OpenMW/openmw!3297
2023-07-31 10:50:07 +00:00
psi29a
4990f786eb Merge branch 'fix_esm4_exterior_cell' into 'master'
Treat ESM4 exterior cells as exterior

See merge request OpenMW/openmw!3282
2023-07-31 10:49:54 +00:00
psi29a
b2f669ca48 Merge branch 'fix_async_load' into 'master'
Fix crash related to async content loading (#7508)

Closes #7508

See merge request OpenMW/openmw!3290
2023-07-31 10:49:33 +00:00
Petr Mikheev
3814830e9f Fix build (missing include) 2023-07-31 09:32:52 +02:00
Petr Mikheev
0487bf95d1 Merge branch 'coverity49' into 'master'
Fix some Coverity warnings

See merge request OpenMW/openmw!3286
2023-07-31 00:09:14 +00:00
Petr Mikheev
e077ca5aa3 Merge branch 'clean_includes_4' into 'master'
Cleanup includes

See merge request OpenMW/openmw!3288
2023-07-31 00:04:18 +00:00
Petr Mikheev
abde92e207 Merge branch 'active-spells-rework' into 'master'
Lua: active spell params and active spell effects

See merge request OpenMW/openmw!3179
2023-07-31 00:02:05 +00:00
Mads Buvik Sandvei
c18a7801ed Lua: active spell params and active spell effects 2023-07-31 00:02:05 +00:00
Petr Mikheev
5702cb4b30 Merge branch 'effective-effect-indexing' into 'master'
Lua: String overload for effects store index.

See merge request OpenMW/openmw!3285
2023-07-30 23:55:19 +00:00
Mads Buvik Sandvei
edb7081ea6 Lua: String overload for effects store index. 2023-07-30 23:55:19 +00:00
elsid
798f3cc385
Support ESM4 record FullName, CellFlags, X, Y fields by esmtool 2023-07-30 18:20:10 +02:00
elsid
385dab3df3
Cache cell description
It should not change over time and it's relatively small enough to trade some
CPU time for some memory.
2023-07-30 17:13:50 +02:00
elsid
d59a993351
Treat ESM4 exterior cells as exterior
Prevent adding exterior cells to WorldModel::mInteriors. Otherwise CellStore
might be created twice because it's not present in mExteriors but present in
mCells. This happens on teleport to a cell using its name (e.g. --start
"AnvilMainGate" flag).
2023-07-30 16:50:50 +02:00
elsid
662991dda9
Add test to ensure deleted DialInfos are removed 2023-07-30 14:11:13 +02:00
elsid
66c5944ecf
Fix use after move in InfoOrder::insertInfo
When it->second.mPosition->mPrev != value.mPrev value is first moved into
*mPosition and then used to get mPrev. Since mPrev is RefId and it's copy-only
type there is no real problem but coverity complains about it.

Also enforce contract of insertInfo to support move-only types by adding a test
for a value type with deleted copy constructors.
2023-07-30 13:37:53 +02:00
Evil Eye
79b3855c5b Move TimeStamp to ESM3 and remove sized reads 2023-07-30 11:37:32 +02:00
Petr Mikheev
f344c26465 Apply delayed Lua actions before making a save 2023-07-30 02:50:22 +02:00
Petr Mikheev
9a9f9d7081 Adjust FormId in FormIdRefId and for items in containers when loading saves 2023-07-30 02:01:09 +02:00
Petr Mikheev
2b601eea6d Fix crash related to async content loading (#7508) 2023-07-29 21:13:57 +02:00
Evil Eye
c47489ef6e Don't replace tags when dealing with console input 2023-07-29 17:07:37 +02:00
elsid
dd54857610
Add missing array include 2023-07-29 00:29:03 +02:00
elsid
c9c32d9a0d
Cleanup includes 2023-07-29 00:16:43 +02:00
Andrei Kortunov
d8ec78d732 Fix some Coverity warnings 2023-07-28 20:58:18 +04:00
psi29a
81deb3796b Merge branch 'loadSSEAlchemyTable' into 'master'
Load SSE alchemy table

See merge request OpenMW/openmw!3267
2023-07-28 07:46:20 +00:00
alekulyn
d2896945e8 Load SSE alchemy table 2023-07-28 07:46:20 +00:00
psi29a
a6d6e16d48 Merge branch 'readsize' into 'master'
Disallow implicitly sized reads of ESM structs

See merge request OpenMW/openmw!3100
2023-07-28 07:01:32 +00:00
elsid
9acb93ab29
Use settings values for Map settings 2023-07-27 22:53:53 +02:00
psi29a
e76ce6b696 Merge branch 'fix_find_path' into 'master'
Remove stepping from findSmoothPath and other tweaks (#7241 , #7485)

Closes #7485 and #7241

See merge request OpenMW/openmw!3264
2023-07-27 09:34:50 +00:00
psi29a
3e16ef7445 Merge branch 'esm4_achr' into 'master'
Load ESM4 actors (no rendering yet)

See merge request OpenMW/openmw!3278
2023-07-27 09:34:28 +00:00
psi29a
f5677aa352 Merge branch 'settings_values_input' into 'master'
Use settings values for Input settings (#6876)

See merge request OpenMW/openmw!3265
2023-07-27 09:33:14 +00:00
psi29a
e073eab05e Merge branch 'more_evade_directions' into 'master'
Use more evade directions and filter by supporting animation (#7450)

Closes #7450

See merge request OpenMW/openmw!3210
2023-07-27 09:32:39 +00:00
psi29a
3032b340a2 Merge branch 'teleporting' into 'master'
A few Lua changes related to teleporting

See merge request OpenMW/openmw!3246
2023-07-27 09:32:28 +00:00
psi29a
cf8af70764 Merge branch 'fix_remove_from_inventory' into 'master'
[Lua] Fix removing from inventory

See merge request OpenMW/openmw!3229
2023-07-27 09:32:08 +00:00
Petr Mikheev
bc1d412aaa Merge branch 'fix-7503' into 'master'
[#7503]: pass full count of coins to createGold() in moveToCell()

See merge request OpenMW/openmw!3279
2023-07-27 09:31:24 +00:00
Petr Mikheev
9b511fdf7a Load ESM4 actors 2023-07-26 11:47:50 +02:00
Petr Mikheev
f99582e671 [Lua] Fix removing from inventory 2023-07-25 23:34:25 +02:00
psi29a
488657d9b4 Merge branch 'refnum-for-items-in-spellcast' into 'master'
Use refnum instead of slot for items during spellcast

Closes #4508

See merge request OpenMW/openmw!3244
2023-07-25 21:23:59 +00:00
Mads Buvik Sandvei
364f2a98e9 Use refnum instead of slot for items during spellcast 2023-07-25 21:23:59 +00:00
psi29a
94d8c50df2 Merge branch 'lua_activation' into 'master'
Lua scripts can handle activation of mwscripted objects

See merge request OpenMW/openmw!3263
2023-07-25 21:23:20 +00:00
jvoisin
090f823c17 Fix a coverity warning 2023-07-25 14:39:03 +02:00
Mads Buvik Sandvei
1162323e96 Do not redundantly take and set count in moveToCell(). moveToCell() should always be moving the full stack. 2023-07-25 14:22:00 +02:00
Mads Buvik Sandvei
8867e76fd7 pass full count of coins to createGold() in moveToCell() 2023-07-25 13:38:14 +02:00
psi29a
b9460afdfd Merge branch 'save-game-string-view' into 'master'
Refactor saveGame to use string_view

See merge request OpenMW/openmw!3271
2023-07-25 11:14:51 +00:00
psi29a
baf7ef2525 Merge branch 'copying' into 'master'
Avoid unnecessary LiveCellRef copying; Fix potential use-after-free in WorldModel

See merge request OpenMW/openmw!3276
2023-07-25 08:21:17 +00:00
AnyOldName3
6246b479ea Merge branch 'async_content_load' into 'master'
Speedup loading - load content files during logo video playing

See merge request OpenMW/openmw!3249
2023-07-24 23:42:46 +00:00
Petr Mikheev
4d004e4730 Avoid unnecessary LiveCellRef copying in a couple of places; change initialization order in WorldModel; 2023-07-24 23:36:24 +02:00
Christian Bouwense
4b5d64f9e5 inline asUTF8() instead of constructing a whole new string_view 2023-07-24 14:41:17 -04:00
psi29a
f9cb752b25 Merge branch 'resistanceisnotfutile' into 'master'
Resist failed normal weapon hits (bug #7284)

Closes #7284

See merge request OpenMW/openmw!3220
2023-07-24 11:24:14 +00:00
psi29a
7ead12e103 Merge branch 'dropit' into 'master'
Drop empty stacks that aren't overriding anything

See merge request OpenMW/openmw!3268
2023-07-24 09:11:08 +00:00
psi29a
09e1ff9a4b Merge branch 'fix_world_model' into 'master'
Fix WorldModel (#7474)

Closes #7474

See merge request OpenMW/openmw!3270
2023-07-24 09:10:06 +00:00
psi29a
b68ca259ae remove unused variables and commented out code 2023-07-23 22:43:28 +02:00
Christian Bouwense
7d0caf9eec refactor saveGame to use string_view instead of a const standard string reference 2023-07-23 14:45:01 -04:00
elsid
8ceb79caf5
Load present cell store when requested 2023-07-23 18:36:32 +02:00
elsid
1a7b4283e7
Avoid duplicated emplace for interior cell store 2023-07-23 18:35:49 +02:00
Evil Eye
c80574299d Drop non-carriable lights and empty stacks that aren't overriding anything 2023-07-23 14:51:58 +02:00
Petr Mikheev
59d17d3eb6 Fix #7491 2023-07-22 19:45:39 +02:00
elsid
6c18723bc7
Use settings values for Input settings 2023-07-22 18:27:53 +02:00
elsid
5a27ccacb7
Pass const float* to vanityRotateCamera 2023-07-22 18:24:55 +02:00
elsid
e00eb50587
Remove stepping from findSmoothPath
This is not used anyway. There are features like smooth movement which remove
all redundant points.

Use single findStraightPath call instead of multiple.
2023-07-22 18:08:40 +02:00
elsid
b4868c6094
Filter evade directions by supported animations
To avoid trying those which will not lead to any actor movement due to absent
animation.
2023-07-22 17:30:40 +02:00
elsid
80ae8ce116
Cache supported animations 2023-07-22 17:30:40 +02:00
elsid
579e533621
Add more evade directions and order them to make a circle 2023-07-22 17:30:38 +02:00
elsid
53a129a762
Include pathgrid to all AI packages paths 2023-07-22 17:24:50 +02:00
Petr Mikheev
2c212b18e4 Remove World::activate since all activation now goes trough LuaManager 2023-07-22 17:22:43 +02:00
Petr Mikheev
c5871a5a7a Allow to handle activation in Lua even for mwscripted objects 2023-07-22 16:57:39 +02:00
Petr Mikheev
9105a073fc Handle ESM4::Rec_Deleted and ESM4::Rec_Disabled flags. 2023-07-22 15:22:02 +02:00
psi29a
4973230b84 Merge branch 'settings_values_hud' into 'master'
Use settings values for HUD settings (#6876)

See merge request OpenMW/openmw!3250
2023-07-21 08:36:45 +00:00
psi29a
9410eed9e5 Merge branch 'bump-cmake-version' into 'master'
Bump required CMake version to 3.16

See merge request OpenMW/openmw!3242
2023-07-20 17:40:29 +00:00
Evil Eye
45ba05c0ed Disallow implicitly sized reads of ESM structs 2023-07-20 19:16:53 +02:00
psi29a
ec9b4c4563 Merge branch 'caius4friends' into 'master'
Fix dialogue insertion again

See merge request OpenMW/openmw!3212
2023-07-20 15:29:57 +00:00
psi29a
03dbe1c9f3 Merge branch 'stringrefidskills' into 'master'
Assign StringRefIds to skills

See merge request OpenMW/openmw!3146
2023-07-20 07:15:49 +00:00
Petr Mikheev
38f409e687 Fix #7446: Incorrect height after teleporting from one worldspace to another 2023-07-20 02:15:27 +02:00
AnyOldName3
34fcfb63cf Eliminate redundant version checks 2023-07-20 00:43:56 +01:00
Petr Mikheev
1bfe59e2fb Load content files during playing logo video 2023-07-20 01:22:01 +02:00
elsid
fac1927f5e
Use settings values for HUD settings 2023-07-19 22:53:35 +02:00
Petr Mikheev
f2edf05a55 Move camera update after teleporting from worldimp to camera.lua 2023-07-19 10:42:58 +02:00
Petr Mikheev
4016e8b383 Lua engine handler onTeleported 2023-07-19 10:42:58 +02:00
Petr Mikheev
086fdb1f37 Run onNewGame handler in LuaManager::synchronizedUpdate 2023-07-19 10:07:30 +02:00
psi29a
baa67893b6 Merge branch 'settings_values_gui' into 'master'
Use settings values for GUI settings (#6876)

See merge request OpenMW/openmw!3238
2023-07-18 10:25:36 +00:00
psi29a
5a31320d8d Merge branch 'preserve-refnum-on-drop' into 'master'
Preserve refnum when dropping items from inventory to ground.

Closes #6148

See merge request OpenMW/openmw!3207
2023-07-18 10:25:28 +00:00
psi29a
85822eca45 Merge branch 'darkmagic' into 'master'
Implement the NegativeLight flag

Closes #7477

See merge request OpenMW/openmw!3240
2023-07-18 10:25:19 +00:00
Alexei Kotov
7e1e43f9c6 Allow GMSTs with empty EDID 2023-07-17 22:51:25 +03:00
Mads Buvik Sandvei
61f1f4a013 signed/unsigned comparison warning. 2023-07-17 20:41:49 +02:00
Evil Eye
7573004efc Implement the NegativeLight flag 2023-07-17 18:00:15 +02:00
Mads Buvik Sandvei
fe0b640f85 Use copyItem() when not moving full stack. 2023-07-17 17:58:39 +02:00
Mads Buvik Sandvei
b8a9fcad68 fixes based on comments by ptmikheev 2023-07-17 17:06:28 +02:00
Mads Buvik Sandvei
e22eec0585 optimize moveItem() by unsetting refnum instead of calling unstackItem. 2023-07-17 15:15:27 +02:00
Petr Mikheev
b583aad14a Fix bug in LuaManager::reloadAllScripts 2023-07-17 02:21:46 +02:00
elsid
d113f0fc44
Use settings values for GUI settings 2023-07-16 20:46:54 +02:00
psi29a
98bb9fc125 Merge branch 'deserializedeez' into 'master'
Make RefId::deserializeText return an empty RefId if no pre-existing StringRefId can be found

See merge request OpenMW/openmw!3226
2023-07-16 08:46:48 +00:00
psi29a
f4295cf67a Merge branch 'fix_getall' into 'master'
Fix argument validation in Lua command `cell:getAll`

See merge request OpenMW/openmw!3195
2023-07-16 08:45:54 +00:00
psi29a
b383efabf5 Merge branch 'urinvalid' into 'master'
Don't allow saves with an invalid last generated RefNum to load

Closes #7134

See merge request OpenMW/openmw!3233
2023-07-16 08:45:41 +00:00
psi29a
abb71eeb53 Merge branch 'plannedobsolescence' into 'master'
Allow compilation with MYGUI_DONT_USE_OBSOLETE

See merge request OpenMW/openmw!3232
2023-07-16 08:44:59 +00:00
Alexei Kotov
80b7dec571 Prevent object paging from leaking Vvardenfell into other exteriors 2023-07-16 00:05:59 +03:00
Mads Buvik Sandvei
64e55b37ec Clang'd 2023-07-15 18:59:16 +02:00
Mads Buvik Sandvei
6e03d710ba Remove ItemModel::copyItem(), it is obsolete. 2023-07-15 18:19:52 +02:00
Evil Eye
44ab0ff8ef Don't allow saves with an invalid last generated RefNum to load 2023-07-15 16:26:28 +02:00
Evil Eye
a0127dd7e4 Allow compilation with MYGUI_DONT_USE_OBSOLETE 2023-07-15 15:02:27 +02:00
Evil Eye
cd8f2355c0 Only allow StringRefId for Skill ids 2023-07-14 17:33:32 +02:00
Evil Eye
b082afd5b0 Fix price enchantment price calculation to use the correct item count 2023-07-14 17:06:33 +02:00
Evil Eye
f7be94aa21 Address feedback 2023-07-13 18:55:23 +02:00
Evil Eye
967b5d205b Use StringRefId for skills 2023-07-13 18:55:22 +02:00
Evil Eye
ac9378fa08 Replace Skill::mIndex with Skill::refIdToIndex 2023-07-13 18:55:21 +02:00
Evil Eye
c59032fd66 Make RefId::deserializeText return an empty RefId if no pre-existing StringRefId can be found 2023-07-13 16:49:23 +02:00
Alexei Dobrohotov
39c84c84da Cap global map cell size (bug #6222) 2023-07-13 14:53:08 +03:00
Petr Mikheev
95bce836ee Add non-carriable lights to nearby.items 2023-07-12 22:26:06 +02:00
Petr Mikheev
e96864a79c Fix argument validation in Lua command cell:getAll 2023-07-12 22:23:42 +02:00
Evil Eye
974b4739fa Add a test for three way merges 2023-07-12 21:38:20 +02:00
Alexei Kotov
89c18d85de Merge branch 'settings_values_groundcover' into 'master'
Use settings values for Groundcover settings (#6876)

See merge request OpenMW/openmw!3204
2023-07-11 13:58:03 +00:00
Alexei Kotov
4bbbfe74b3 Merge branch 'finishdrag' into 'master'
Finish draganddrop before startdrag

See merge request OpenMW/openmw!3186
2023-07-11 12:29:35 +00:00
Kindi
00e5f31242 Finish draganddrop before startdrag 2023-07-11 12:29:35 +00:00
psi29a
429e911da1 Merge branch 'lua_journal' into 'master'
Add Lua bindings for journal (second iteration of !3133)

See merge request OpenMW/openmw!3189
2023-07-11 07:37:13 +00:00
Alexei Dobrohotov
411c71062c Resist failed normal weapon hits (bug #7284) 2023-07-11 09:53:56 +03:00
Alexei Dobrohotov
d589b46f96 Launcher, content selector: support ESM4 files
Cell name loader ignores ESM4 files
2023-07-11 05:31:58 +03:00
Alexei Dobrohotov
2de8c6b3c0 Don't discard collision for the entire tree if BSXFlags marker flag is set 2023-07-10 23:37:37 +03:00
unknown
09147934fb Adjust unit tests 2023-07-09 18:48:14 +02:00
Mads Buvik Sandvei
0c37a64a84 Remove resolved TODO 2023-07-09 13:43:00 +00:00
psi29a
a755fa0f34 Merge branch 'cleanup_includes' into 'master'
Cleanup includes

See merge request OpenMW/openmw!3203
2023-07-09 10:15:09 +00:00
Alexei Dobrohotov
3b85f9f8cf Autocomplete ESM4::Cell editor IDs 2023-07-09 01:34:18 +03:00
Mads Buvik Sandvei
8c3c5238d7 Preserve refnum when dropping items from inventory to ground. 2023-07-08 17:24:13 +02:00
psi29a
fbe6a398f8 Merge branch 'unstack-refnum' into 'master'
Generate new refnum for the new stack created when unstacking.

See merge request OpenMW/openmw!3206
2023-07-08 14:58:28 +00:00
Mads Buvik Sandvei
0f608f388e Generate new refnum for the new stack created when unstacking. 2023-07-08 14:51:49 +02:00
psi29a
29ffc2840e Merge branch 'fix_7448' into 'master'
Fix #7448 (onConsume don't work after loading a save if inventory wasn't accessed from Lua)

Closes #7448

See merge request OpenMW/openmw!3194
2023-07-08 12:36:52 +00:00
Petr Mikheev
a09fb8d8f8 Rework Lua bindings for journal 2023-07-08 14:32:58 +02:00
Tobias Tribble
c792582376 Add Lua bindings for journal 2023-07-08 13:37:39 +02:00
elsid
0851f0705d
Use settings values for Groundcover settings 2023-07-08 12:08:27 +02:00
elsid
f6fce5ee15
Cleanup includes 2023-07-08 11:28:56 +02:00
psi29a
63e9a63c67 Merge branch 'i-can-see-nearly-now-the-grass-is-gone' into 'master'
Maybe compute an accurate near and far plane using primitives for groundcover

See merge request OpenMW/openmw!2960
2023-07-08 08:58:13 +00:00
psi29a
cab47d0a2a Merge branch 'settings_values_general' into 'master'
Use settings values for General settings (#6876)

See merge request OpenMW/openmw!3198
2023-07-07 13:07:13 +00:00
psi29a
aa820be986 Merge branch 'cell_for_drafts' into 'master'
Add special cell for objects created via Lua scripts and not yet added into the world

Closes #7383

See merge request OpenMW/openmw!3193
2023-07-07 13:06:54 +00:00
Petr Mikheev
fb7ba40385 Merge branch 'lua-bb-once-and-for-all' into 'master'
Lua - Fix BB once and for all

See merge request OpenMW/openmw!3143
2023-07-05 20:21:38 +00:00
elsid
ebb8fdc698
Use settings values for General settings 2023-07-04 21:40:04 +02:00
glassmancody.info
a659d2eaeb lua - fix bounding box once and for all 2023-07-04 09:55:11 -07:00
Petr Mikheev
d830ae37b1 Add special cell for objects created via Lua scripts and not yet added into the world 2023-07-04 17:15:14 +02:00
elsid
a6dbd819a1
Fix writing IndexRefId to ESM3
Use correct enum value.
2023-07-04 11:34:52 +02:00
psi29a
8a33edd64a Merge branch 'cleanup_includes' into 'master'
Cleanup includes

See merge request OpenMW/openmw!3191
2023-07-03 16:01:48 +00:00
psi29a
050fc20379 Merge branch 'settings_values_game' into 'master'
Use settings values for Game settings (#6876)

See merge request OpenMW/openmw!3188
2023-07-03 07:20:36 +00:00
Petr Mikheev
e3fa3a3712 Fix 7448 (onConsume don't work after loading a save if inventory wasn't accessed from Lua) 2023-07-03 02:13:41 +02:00
psi29a
6601b0cb15 Merge branch 'fastandloose' into 'master'
Drop support for --fs-strict

Closes #7394

See merge request OpenMW/openmw!3093
2023-07-02 19:24:14 +00:00
psi29a
b1e00b59f2 Merge branch 'lua_mwscript' into 'master'
Change MWScript Lua bindings (#7142)

See merge request OpenMW/openmw!2881
2023-07-02 19:23:09 +00:00
elsid
05a42a1816
Cleanup includes 2023-07-01 13:52:09 +02:00
psi29a
023e8f72cd Merge branch 'master' into 'master'
pass time on OnTrainingFinished callback instead of before the fadeScreenIn

See merge request OpenMW/openmw!3181
2023-07-01 08:48:57 +00:00
Dave Corley
dfa4f5da8a pass time on OnTrainingFinished callback instead of before the fadeScreenIn 2023-07-01 08:48:57 +00:00
elsid
6e8dcc16c6
Use settings values for Game settings 2023-07-01 00:59:35 +02:00
elsid
fb5e5335aa
Initialize mTimerDisposeSummonsCorpses in class definition 2023-07-01 00:59:35 +02:00
elsid
86e5b94ef6
Convert setting value int to CollisionShapeType on initialization 2023-07-01 00:59:35 +02:00
elsid
47978dcb71
Remove unused getActorsProcessingRange function 2023-07-01 00:59:15 +02:00
Petr Mikheev
866f67ed19 Change MWScript Lua bindings (#7142) 2023-06-30 22:26:17 +02:00
psi29a
2a271cdecc Merge branch 'fix_7439' into 'master'
Fix #7439: world.players and nearby.players returns "0_-1" instead of "1_-1"

Closes #7439

See merge request OpenMW/openmw!3183
2023-06-30 09:09:44 +00:00
psi29a
2b11c2cf36 Merge branch 'fix-exterior-regression' into 'master'
Fixes #7437

Closes #7388 and #7437

See merge request OpenMW/openmw!3187
2023-06-29 13:33:34 +00:00
florent.teppe
950cc7be83 gets the right worldspace when calculating exterior positions. 2023-06-29 11:09:06 +02:00
Petr Mikheev
39fc832fde Fix #7441: Objects that are removed and disabled in the same frame via lua remain in the world but become uninteractable 2023-06-28 21:43:30 +02:00
psi29a
fc5d73648a Merge branch 'schooled' into 'master'
Merge magic schools into skills

See merge request OpenMW/openmw!3148
2023-06-28 09:32:48 +00:00
Kindi
a176e0f9ea Partial ammo equipping 2023-06-28 09:32:15 +00:00
Petr Mikheev
8ca7770d56 Fix #7439: world.players and nearby.players returns "0_-1" instead of "1_-1" 2023-06-27 23:56:45 +02:00
Evil Eye
73c2387708 Merge schools into skills 2023-06-26 20:42:52 +02:00
Evil Eye
9947a41c37 Combine magic school properties into structs 2023-06-26 16:34:12 +02:00
psi29a
31efad1dd0 Merge branch 'fix_model_path' into 'master'
Fix #7403: incorrect model path for records created by Lua scripts

Closes #7403

See merge request OpenMW/openmw!3151
2023-06-25 20:11:43 +00:00
psi29a
dd0d66513d Merge branch 'clickbait' into 'master'
Mostly dehardcode attributes

See merge request OpenMW/openmw!3164
2023-06-25 20:11:19 +00:00
psi29a
0ce98ccc0a Merge branch 'idontwannatalkaboutit' into 'master'
Return the actual topic the info came from

See merge request OpenMW/openmw!3176
2023-06-25 20:11:04 +00:00
Evil Eye
c5344b7069 Return the actual topic the info came from 2023-06-24 11:40:25 +02:00
Andrei Kortunov
aad7c5066d Do not lose existing callbacks for sky node 2023-06-22 15:18:53 +04:00
Evil Eye
9663f4f473 Address jvoisin's remarks 2023-06-21 22:11:01 +02:00
psi29a
47b1247fa2 Merge branch 'l10n' into 'master'
Make configurable whether GMST strings have priority over built-in interface messages

See merge request OpenMW/openmw!3134
2023-06-21 06:52:30 +00:00
psi29a
bb7eb0f527 Merge branch 'chargingup' into 'master'
Autocalculate enchantment costs and charges

Closes #7428

See merge request OpenMW/openmw!3152
2023-06-21 06:52:01 +00:00
psi29a
c4b62c8380 Merge branch 'objlist_serialize' into 'master'
Support LObjectList, GObjectList in Lua serialization

See merge request OpenMW/openmw!3153
2023-06-21 06:51:46 +00:00
Evil Eye
6e5b423d04 Fix saving skill increases 2023-06-20 20:26:08 +02:00
psi29a
a59f22fd30 Merge branch 'esm4_fix' into 'master'
Add a safeguard to load only supported records

Closes #7406

See merge request OpenMW/openmw!3158
2023-06-20 10:00:46 +00:00
psi29a
abdd4f5207 Merge branch 'lua_potion_magic' into 'master'
Lua: Add effects to potionRecord, ingredientRecord

See merge request OpenMW/openmw!3160
2023-06-20 10:00:06 +00:00
Zackhasacat
611a6429a9 Lua: Add effects to potionRecord, ingredientRecord 2023-06-20 10:00:05 +00:00
psi29a
68415a952e Merge branch 'lua_quat' into 'master'
Breaking change in Lua API: change obj.rotation from Euler angles to Quaternion

See merge request OpenMW/openmw!3123
2023-06-20 09:59:06 +00:00
Evil Eye
abcebd49d2 Allow for more than 8 attributes 2023-06-19 20:41:54 +02:00
Petr Mikheev
57e028fcc9 Merge branch 'container_resolve_lua' into 'master'
Lua: Add functions to resolve inventories

See merge request OpenMW/openmw!3157
2023-06-19 18:15:42 +00:00
Zackhasacat
f4980c178d Lua: Add functions to resolve inventories 2023-06-19 18:15:42 +00:00
psi29a
bbfd906f08 Merge branch 'lua_effect_icon' into 'master'
Add icon path to core.MagicEffect

See merge request OpenMW/openmw!3154
2023-06-18 20:58:06 +00:00
Zackhasacat
835a67d876 Add icon path to core.MagicEffect 2023-06-18 20:58:06 +00:00
Mads Buvik Sandvei
5c32b32c58 Lua: ESM::Enchantment bindings 2023-06-18 20:57:21 +00:00
Evil Eye
8edbb9f005 Add attributes to the level up dialog dynamically 2023-06-18 22:55:05 +02:00
Evil Eye
9a4bfed852 Dynamically build the attribute list in the review dialog 2023-06-18 20:08:10 +02:00
Evil Eye
75f0ad4e95 Dynamically build the attribute selection dialog 2023-06-18 19:55:33 +02:00
Evil Eye
ea2cedb5ea Build the attribute list in the stats window dynamically 2023-06-18 19:10:29 +02:00
Andrei Kortunov
04be1526b2 Add a safeguard to load only supported records 2023-06-18 19:56:06 +04:00
Evil Eye
bac6777fae Reduce the number of magic numbers 2023-06-18 16:21:06 +02:00
Petr Mikheev
2f16a8d27c Fix incorrect model part for records created by Lua scripts 2023-06-18 00:19:50 +02:00
Petr Mikheev
8e59c6b67b Support LObjectList, GObjectList in Lua serialization 2023-06-18 00:07:22 +02:00
Evil Eye
e9bcad4e05 Autocalculate enchantment costs and charges 2023-06-17 22:25:47 +02:00
Petr Mikheev
9d15629ae2 [Lua] Add nearby.players and world.players 2023-06-17 19:56:25 +02:00
Petr Mikheev
0b9bcf58e2 Merge branch 'active-effect-modifiers' into 'master'
Lua bindings for modifying active effects/spells

See merge request OpenMW/openmw!3128
2023-06-17 16:34:40 +00:00
Mads Buvik Sandvei
698316fd2e Lua bindings for modifying active effects/spells 2023-06-17 16:34:40 +00:00
psi29a
0755954b78 Merge branch 'openmwcs-pref-size' into 'master'
Add white space and larger default opening size of OpenMW-CS preferences

See merge request OpenMW/openmw!3145
2023-06-17 09:01:33 +00:00
Matjaž Lamut
d12426f1b0 Add white space and larger default opening size of OpenMW-CS preferences window. Improves first-impression and overall readability. 2023-06-16 20:03:42 +00:00
Bret Curtis
73c5909387 small revert, "It is copying a texture, it is not a default initialized one. The source texture may or may not want GL_CLAMP_TO_EDGE." 2023-06-16 09:16:07 +02:00
Bret Curtis
ff6944701f Be more explicit about use of CLAMP_TO_EDGE instead of defaulting to GL CLAMP 2023-06-16 09:16:07 +02:00
psi29a
44c3c40058 Merge branch 'lua-world-to-viewport' into 'master'
[Lua] Add world to viewport function to camera

See merge request OpenMW/openmw!3139
2023-06-16 06:47:16 +00:00
elsid
04215ca9ec
Use settings values for Fog settings 2023-06-15 22:01:14 +02:00
psi29a
1630e04d1b Merge branch 'fix_7423' into 'master'
Fix #7422, #7423, #7424

Closes #7424, #7423, and #7422

See merge request OpenMW/openmw!3136
2023-06-15 11:02:21 +00:00
Petr Mikheev
8da6fd1095 Fix #7424 2023-06-15 11:33:12 +02:00
psi29a
3a707d8b98 Merge branch 'herebedreugh' into 'master'
Spawn creatures in newly generated exteriors

Closes #7413

See merge request OpenMW/openmw!3126
2023-06-15 07:41:35 +00:00
psi29a
d5f0f44afb Merge branch 'raise_lower_rank_refactor' into 'master'
Refactor raiserank and lowerrank

See merge request OpenMW/openmw!3135
2023-06-15 07:03:26 +00:00
psi29a
807893eb45 Merge branch 'clickbait' into 'master'
Mostly dehardcode skills

See merge request OpenMW/openmw!3112
2023-06-15 07:03:13 +00:00
Zackhasacat
3e52971a13 Add duration to core.MagicEffectWithParams 2023-06-14 22:28:45 +00:00
glassmancody.info
c27904aa92 lua - add world to viewport function to camera 2023-06-14 11:47:11 -07:00
Petr Mikheev
ab7eebb356 Fix #7423 (too strict fallback validation) 2023-06-14 20:04:16 +02:00
Kindi
dccf6a2b8c Refactor raiserank and lowerrank 2023-06-14 21:42:02 +08:00
psi29a
428642d2cf Merge branch 'fix_7420' into 'master'
Fix #7420 (Local scripts on items cause the game to crash when activated)

Closes #7420

See merge request OpenMW/openmw!3131
2023-06-14 07:33:18 +00:00
Evil Eye
f02dd0ef03 Implement onNewExterior to spawn fish in generated exteriors 2023-06-13 17:04:22 +02:00
Petr Mikheev
718d5e4a71 Add setting "gmst overrides l10n" 2023-06-13 10:06:59 +02:00
psi29a
825d862f52 Merge branch 'lua_lock_trap' into 'master'
Allow Lua to access lock and trap data for doors and containers

See merge request OpenMW/openmw!2985
2023-06-13 07:37:33 +00:00
Zackhasacat
c108989b26 Allow Lua to access lock and trap data for doors and containers 2023-06-13 07:37:32 +00:00
psi29a
d4e1f9c5de Merge branch 'fallbacks2' into 'master'
Validate fallbacks in openmw.cfg with a whitelist and add them to GMST store

See merge request OpenMW/openmw!3129
2023-06-13 07:36:38 +00:00
Kindi
43e92fa1c9 Add type prop for types.Creature 2023-06-13 03:55:44 +08:00
Petr Mikheev
790ddcf32e Fix #7420 (Local scripts on items cause the game to crash when activated) 2023-06-12 21:25:48 +02:00
Petr Mikheev
256db78c6c [Lua] core.getGMST returns nil if there is no such game setting 2023-06-12 17:59:40 +02:00
Petr Mikheev
96399b3d23 Add fallbacks to Store<ESM::GameSetting> 2023-06-12 17:59:40 +02:00
Petr Mikheev
be45b8199e Whitelist and type validation for fallbacks 2023-06-12 17:59:40 +02:00
Petr Mikheev
e35bf97603 Merge branch 'awildmoonappeared' into 'master'
Expose levelled creatures to Lua

See merge request OpenMW/openmw!3127
2023-06-12 15:57:59 +00:00
Petr Mikheev
3b43cc2aea Lua: change obj.rotation from Euler angles to Quaternion 2023-06-12 00:16:42 +02:00
Evil Eye
9772845f7b Address feedback 2023-06-11 21:13:34 +02:00
psi29a
1d5b73f20a Merge branch 'youonlyneedtounlockonce' into 'master'
Don't unlock unlocked objects now that unlock is no longer idempotent

See merge request OpenMW/openmw!3125
2023-06-11 17:41:23 +00:00
Evil Eye
66d9d7e585 Expose levelled creatures to Lua 2023-06-11 15:13:46 +02:00
Evil Eye
24c1909d52 Don't unlock unlocked objects now that unlock is no longer idempotent 2023-06-11 09:43:42 +02:00
Evil Eye
3c588900dd Apply elsid's suggestion and revert 3a888ef543 2023-06-10 22:04:14 +02:00
elsid
e6e6b65ab3
Remove redundant manipulators 2023-06-10 13:14:52 +02:00
psi29a
724d29aa63 Merge branch 'add_getBounty_to_types_Player' into 'master'
Lua: Add getCrimeLevel() to types.Player

See merge request OpenMW/openmw!3118
2023-06-10 08:48:33 +00:00
psi29a
3fcf9dc1d2 Merge branch 'set_scale' into 'master'
Allow Lua to set and get GameObject's in game scale

See merge request OpenMW/openmw!3114
2023-06-10 08:48:14 +00:00
psi29a
ec2f0e4645 Merge branch 'fragile' into 'master'
More closely replicate Morrowind.exe's locks

Closes #7415

See merge request OpenMW/openmw!3116
2023-06-10 08:47:27 +00:00
psi29a
2686e586e5 Merge branch 'dev-7019' into 'master'
Fix improper access of stereo manager by other shared components

See merge request OpenMW/openmw!2437
2023-06-09 21:25:21 +00:00
psi29a
766b829ce6 Merge branch 'fix_7385' into 'master'
Fix #7385

Closes #7385

See merge request OpenMW/openmw!3117
2023-06-09 21:23:54 +00:00
psi29a
ca57bbe644 Merge branch 'debug_tgm_tcl' into 'master'
Lua commands debug.toggleGodMode and debug.toggleCollision

See merge request OpenMW/openmw!3113
2023-06-09 07:26:44 +00:00
Tobias Tribble
0e6155c529 Added delayed action 2023-06-08 23:50:54 -05:00
Kindi
8962cb818c Add getCrimeLevel() to types.Player 2023-06-09 07:01:12 +08:00
Petr Mikheev
801a5a3213 Fix #7385 2023-06-08 22:45:37 +02:00
Evil Eye
a5b147d44d Add a clarifying comment 2023-06-08 21:56:54 +02:00
Evil Eye
e791d2b498 Fix unit tests 2023-06-08 21:10:11 +02:00
Evil Eye
eeda48ec50 Drop support for --fs-strict 2023-06-08 21:10:09 +02:00
Evil Eye
da4e04522b More closely replicate Morrowind.exe's locks 2023-06-08 20:10:32 +02:00
jvoisin
583a0b4d04 Apply jvoisin's suggestions 2023-06-08 18:35:53 +02:00
Evil Eye
3a888ef543 Prevent a static initialization order fiasco 2023-06-08 18:35:52 +02:00
Evil Eye
627bfa1155 Silence a clang warning 2023-06-08 18:35:52 +02:00
Evil Eye
f62ba346e1 Appease the formatting gods 2023-06-08 18:35:52 +02:00
Evil Eye
2cb77ed48f Dehardcode skill selection 2023-06-08 18:35:52 +02:00
Evil Eye
9a93dcc39e Dehardcode the list of skills in the stats window 2023-06-08 18:35:51 +02:00
Evil Eye
15a5fa84f6 Use std::variant in CachedStat 2023-06-08 18:35:51 +02:00
Evil Eye
65b22975c9 Remove SkillEnum 2023-06-08 18:35:50 +02:00
Evil Eye
72f8f9d1ad Replace remaining skill indices in NpcStats 2023-06-08 18:35:49 +02:00
Evil Eye
1e0ed42294 Use RefId for skills in StatsListener 2023-06-08 18:35:48 +02:00
Evil Eye
28025e84f7 Replace more instances of ESM::Skill::Length 2023-06-08 18:35:48 +02:00
Evil Eye
47c1569961 Use RefId key for NPC skills 2023-06-08 18:35:48 +02:00
Evil Eye
1b956521fc Reduce skill lookups by index 2023-06-08 18:35:47 +02:00
Evil Eye
16c0f0d5cc Use a regular TypedDynamicStore for ESM:Skill 2023-06-08 18:35:47 +02:00
Tobias Tribble
41a2c82f93 Added scale property and setScale function 2023-06-07 19:23:36 -05:00
Petr Mikheev
e773b9d055 Lua commands debug.toggleGodMode and debug.toggleCollision 2023-06-07 23:41:29 +02:00
Petr Mikheev
3b5849add8 Move content files functions to core.contentFiles and add obj.contentFile 2023-06-07 20:57:48 +02:00
Petr Mikheev
a778dff61d Add Lua functions to get the current load order and search objects by RefNum/FormId 2023-06-07 20:57:48 +02:00
Petr Mikheev
773669e69b Add Lua script to handler ESM4 doors with Flag_AutomaticDoor 2023-06-07 20:57:48 +02:00
psi29a
75c371de66 Merge branch 'classyimage' into 'master'
Handle non-string RefIds when displaying a class image

See merge request OpenMW/openmw!3111
2023-06-07 06:51:24 +00:00
Evil Eye
6e39c0336c Handle non-string RefIds when displaying a class image 2023-06-06 17:41:13 +02:00
psi29a
54b0ab9e01 Merge branch 'addpropstartingposandrot' into 'master'
Add startingPosition and startingRotation property to GameObject

See merge request OpenMW/openmw!3106
2023-06-06 13:16:33 +00:00
Petr Mikheev
7cecf2844a Fix #7411 2023-06-05 22:22:58 +02:00
psi29a
25c1e6abee Merge branch 'clickbait' into 'master'
Use std::array in various ESM structs

See merge request OpenMW/openmw!3103
2023-06-05 07:19:38 +00:00
elsid
457fa16e37
Load existing exterior CellStore when required 2023-06-04 22:33:27 +02:00
elsid
01775dd6f0
Try create CellStore for interior cell when not found 2023-06-04 22:33:22 +02:00
psi29a
1843345510 Merge branch 'world_model_absent_cell' into 'master'
Do not rely on exceptions to handle absent cell

See merge request OpenMW/openmw!3098
2023-06-04 11:28:54 +00:00
psi29a
2f5bfb4df2 Merge branch 'fix-#7410' into 'master'
fix #7410

Closes #7410

See merge request OpenMW/openmw!3104
2023-06-04 11:28:26 +00:00
psi29a
d8463a34d3 Merge branch 'quotes' into 'master'
Remove redundant quotes

See merge request OpenMW/openmw!3091
2023-06-04 11:28:14 +00:00
Kindi
dfafac72e9 add startingPosition and startingRotation lua property to gameobject 2023-06-04 14:35:33 +08:00
florent.teppe
04e026c53f getRecNameString now constexpr
getTypeDescription uses a static constexpr variable so we don't return ref to temp memory.
2023-06-03 20:28:25 +02:00
Evil Eye
6b7e7acd16 Replace a number of incorrect index types 2023-06-03 16:30:35 +02:00
Evil Eye
e01a3076dd Use std::array in NpcStats 2023-06-03 14:26:37 +02:00
Evil Eye
a5bb6c7d8d Use std::array in NPDTstruct52 2023-06-03 13:27:45 +02:00
Evil Eye
dd83da5eba Use std::array in FADTstruct 2023-06-03 13:11:49 +02:00
Evil Eye
7be005c9a5 Use std::array in CLDTstruct 2023-06-03 11:58:09 +02:00
Evil Eye
8a474b9807 Use std::array in RADTstruct 2023-06-03 10:45:32 +02:00
psi29a
55cd30ea3b Merge branch 'string_ref_id_utf8' into 'master'
Support UTF-8 by StringRefId::toDebugString (#7407)

Closes #7407

See merge request OpenMW/openmw!3096
2023-06-03 08:17:19 +00:00
elsid
4a8471ce78
Use original RefId to remove info from InfoOrder 2023-06-03 01:12:21 +02:00
elsid
a91f376892
Do not rely on exceptions to handle absent cell 2023-06-02 13:18:09 +02:00
psi29a
25bbaa2343 Merge branch 'fix_remove_deleted_dialogue_info' into 'master'
Fix handling deleted DIAL records (#7397)

Closes #7397

See merge request OpenMW/openmw!3097
2023-06-02 08:56:24 +00:00
psi29a
d41c7bcaf4 Merge branch 'fix_esmstore_double_initialization' into 'master'
Fix the bug "ESMStore::setUp() is called twice" that causes duplicated objects in ESM4 cells

See merge request OpenMW/openmw!3084
2023-06-02 07:31:02 +00:00
psi29a
0bb652d7ce Merge branch 'clickbait' into 'master'
Resolve Attribute GMSTs

See merge request OpenMW/openmw!3090
2023-06-02 07:30:40 +00:00
elsid
b621bfcef0
Define SharedIterator as proper random access iterator
Drop Container template argument as it's always std::vector.
2023-06-01 23:48:49 +02:00
elsid
6a3b6c6e4f
Fix handling deleted DIAL records
* Use composite RefId to remove INFO record of deleted DIAL record. OrderedInfo
  stores original RefId while InfoCollection stores composite one.
* Do not erase deleted topic from InfoOrderByTopic map. To keep all deleted
  record ids for InfoCollection::sort call to make sure reorderRowsImp is called
  with correct number of indices.
2023-06-01 23:35:40 +02:00
elsid
78b3f7288a
Support UTF-8 by StringRefId::toDebugString 2023-06-01 22:16:47 +02:00
Petr Mikheev
420916327d Fix the bug "ESMStore::setUp() is called twice" that causes duplicated objects in ESM4 cells 2023-06-01 11:58:03 +02:00
psi29a
8e3e351015 Merge branch 'hide_ptr_registry' into 'master'
Make WorldModel a front-end for PtrRegistry

See merge request OpenMW/openmw!3087
2023-06-01 09:32:57 +00:00
psi29a
27a879de9a Merge branch 'tree_and_furniture' into 'master'
Load ESM4::Tree and ESM4::Furniture

See merge request OpenMW/openmw!3040
2023-06-01 09:15:46 +00:00
psi29a
83c8312060 Merge branch 'esm4_cell_fixes' into 'master'
A few fixes related to ESM4::Cell

See merge request OpenMW/openmw!3083
2023-06-01 07:51:34 +00:00
psi29a
9306cb2cfd Merge branch 'rm_cell_store_equality' into 'master'
Replace operator== for CellStore with pointer equality

See merge request OpenMW/openmw!3081
2023-06-01 07:51:09 +00:00
Andrei Kortunov
9001dc8f88 Remove redundant single quotes 2023-06-01 09:38:08 +04:00
elsid
9012207e32
Make WorldModel a front-end for PtrRegistry 2023-05-31 21:44:27 +02:00
Evil Eye
08f35fe839 Add ESM::Skill::mWerewolfValue 2023-05-31 17:45:20 +02:00
Evil Eye
7b0680de5f Resolve attribute GMST members 2023-05-31 17:02:18 +02:00
Evil Eye
eea730768b Replace sIconNames with ESM::Skill::mIcon 2023-05-30 20:22:04 +02:00
Evil Eye
9c819b5705 Disallow formatting of UString 2023-05-30 17:35:26 +02:00
elsid
cfab425fb2
Replace operator== for CellStore with pointer quality
Equality operator is confusing and redundant in this case.

It should not be possible to have 2 CellStores for the same cell. There is no
copy constructor defined so it's not possible to get a copy. It's possible to
independently create second store when another one already exist but it would
mean a bug.

Explicitly delete CellStore copy and move constructors and assignment operators
to enforce this.
2023-05-30 08:46:44 +02:00
Petr Mikheev
84d7da1f2c Ignore per-cell water height in exterior ESM4::Cell 2023-05-29 22:39:26 +02:00
Petr Mikheev
5cb4c66266 Avoid using ESM4::Cell with uninitialized fields 2023-05-29 22:37:25 +02:00
elsid
97fed756c8
Properly support portable configuration for bulletobjectool and navmeshtool 2023-05-29 22:29:36 +02:00
Petr Mikheev
01c410d6b1 Remove mPersistentExteriors index; fix incorrect Rec_Persistent flag check. 2023-05-29 22:16:56 +02:00
psi29a
8976a1594f Merge branch 'clickbait' into 'master'
Replace sSkillNameIds with ESM::Skill::mName

See merge request OpenMW/openmw!3080
2023-05-29 18:13:20 +00:00
elsid
4cbaa722dd Merge branch 'wazabear/lambdascope' into 'master'
Fix lambda scope for postprocess bindings

See merge request OpenMW/openmw!3070
2023-05-29 17:12:38 +00:00
Cody Glassman
6747619cb1 Fix lambda scope for postprocess bindings 2023-05-29 17:12:37 +00:00
Petr Mikheev
bf49855d9f Test handling of BSXFlags in bulletnifloader 2023-05-29 18:47:27 +02:00
Petr Mikheev
788a4d32aa Handle DoubleSided and TreeAnim flags in BSLightingShaderProperty. 2023-05-29 18:47:27 +02:00
Petr Mikheev
1b669db017 Load ESM4::Tree and ESM4::Furniture 2023-05-29 18:47:27 +02:00
Evil Eye
9c60a6fa4d Replace sSkillNameIds with ESM::Skill::mName 2023-05-29 17:56:14 +02:00
elsid
731ff90c37
Remove unused include 2023-05-29 15:53:19 +02:00
elsid
947e8f0e94
Use CellStore::mStore instead of MWBase::Environment::get() 2023-05-29 15:53:19 +02:00
psi29a
df57f8004b Merge branch 'default' into 'master'
Replace some empty constructors and destructors with default

See merge request OpenMW/openmw!3078
2023-05-29 13:06:19 +00:00
Evil Eye
9214ffb50b Replace some empty constructors and destructors with default 2023-05-29 13:37:19 +02:00
florent.teppe
ff9e04062d Applies changes from previous commit
from commit bb1d040ac8
Was lost during rebase.
2023-05-29 12:10:42 +02:00
florent.teppe
ad8cfde4e0 ESM::LandData no longer a virtual interface
instead it is constructed from ESM::Land or ESM4::Land
2023-05-29 12:10:42 +02:00
florent.teppe
4c4ed77bd7 Fixes Quad tree terrain missing in some places
the function that queried if data existed or not didn't take the worlspace into account.
2023-05-29 12:10:42 +02:00
florent.teppe
b29be74491 ground cover manager and object paging exists per worldspace.
They don't work though. But at least it doesn't crash. You get a morrowind world on top of the skyrim world.
But it fixes the crashes.
2023-05-29 12:10:42 +02:00
fteppe
22dc383f63 fixes errors and warnings
Applies review comments

getWorldspaceTerrain => returns a reference because never null
crashfix in navigator
updateLandPositions fixes naming of it
const ESM4::Land* MWWorld::Store<ESM4::Land>::search(ESM::ExteriorCellLocation cellLocation) const removes useless else
ExteriorCellLocation uses default initializers
get terrain height returns -MAX_FLOAT when there is no esm4 terrain.

applied review comments

use default initlializer when possible
factorise code
uses pattern matching in for loop.
2023-05-29 12:10:42 +02:00
florent.teppe
7d88a240d3 no default terrain for esm4 exterior. 2023-05-29 12:10:41 +02:00
florent.teppe
2bb17279df linux build
clang format 14.0

Arm64 build
2023-05-29 12:10:41 +02:00
florent.teppe
a9e0489867 fixes stutters => bugs in the way cells were updated. 2023-05-29 11:32:14 +02:00
florent.teppe
0e4d21a40c takes the right terrain bounds. 2023-05-29 11:32:14 +02:00
florent.teppe
7bc4fc6bf9 Fix issues on terrain change
terrain Preloader now preloads the right terrain
2023-05-29 11:32:14 +02:00
florent.teppe
d0211acf9e Fixes bug in terrain loading + collision heightmap works
although terrain rendering is 100% broken right now
2023-05-29 11:32:13 +02:00
florent.teppe
c35c7b3640 ESM4::Land loaded, added to store and to land objects
it does not work yet. Some things are displayed, but it looks all wrong.
2023-05-29 11:31:37 +02:00
florent.teppe
fffcf52316 land manager cache's key is an ExteriorCellLocation
ESM4::Land is now a ESM::LandData
2023-05-29 11:31:37 +02:00
florent.teppe
e0fa15b727 Abstracted Land data that can be used by esm3 and esm4. 2023-05-29 11:31:37 +02:00
florent.teppe
e09cf6ac61 enable terrain takes a worldspace as input
enable terrain anslo switches the worldspace.
2023-05-29 11:31:37 +02:00
florent.teppe
1b718f09c5 adding worldspace info to terrain data structures
Rendering manager can have multiple terrain, one for each queried worldspace
Terrain::World has a worldspace member
storage functions require a worldspace parameter.
2023-05-29 11:31:37 +02:00
florent.teppe
93e7b0d946 Terrain has a mandatory worldspace in constructor
getTerrainHeightAt takes a worldspace.

Doesn't change anything for now => Therrain is created with the default ESM3 worldspace, and is never changed.
2023-05-29 11:31:36 +02:00
psi29a
4399748889 Merge branch 'clickbait' into 'master'
Move more arrays to the ESM::Attribute struct

See merge request OpenMW/openmw!3074
2023-05-29 09:00:22 +00:00
elsid
02adb91859
Simplify WorldModel::getAll
There is no need to have generic forEach template function.
2023-05-29 00:01:46 +02:00
psi29a
c368c188f2 Merge branch 'fix_position_cell_crash' into 'master'
Use sDefaultWorldspaceId as fallback worldspace for PositionCell command

See merge request OpenMW/openmw!3073
2023-05-28 17:42:16 +00:00
Evil Eye
90a3a7b62f Add mWerewolfGMST 2023-05-28 15:28:34 +02:00
Evil Eye
a5e1c87fb8 Remove sGmstAttributeIds, sGmstAttributeDescIds, sAttributeIcons 2023-05-28 15:10:53 +02:00
elsid
06af4cb56a
Use sDefaultWorldspaceId as fallback worldspace for PositionCell command
store is nullptr at this point because there was no cell found.
2023-05-28 14:25:53 +02:00
elsid
86db640c8b
Increment revision on clearing PtrRegistry
Setting it to 0 may not lead to the change detected by clients. Potentially
mRevision may already have value 0. For example on overflow.
2023-05-28 13:04:20 +02:00
elsid
a581e394b4
Check for revision inequality
It's not possible to have SafePtr with mLastUpdate from the future. But
theoretically it's possible to get PtrRegistry::mRevision overflow so operator
less would return false when there is a change.
2023-05-28 13:04:20 +02:00
elsid
ce91784085
Move Ptr registry into a separate type
There is no dependency on the rest of the WorldModel state.
2023-05-28 13:04:17 +02:00
unknown
14600de185 Remove sAttributeIds and sSkillIds 2023-05-27 21:54:13 +02:00
elsid
d98852fdbe
Use std::count_if to implement WorldModel::countSavedGameRecords 2023-05-27 15:49:36 +02:00
elsid
3a66854c3c
Avoid confusion for generated cell flags 2023-05-27 15:49:36 +02:00
elsid
60139c6bd5
Use WorldModel::mStore instead of MWBase::Environment::get().getESMStore() 2023-05-27 15:49:36 +02:00
elsid
183202cd65
Remove WorldModel::getCellByPosition function
It's used in a single place. Move the code there.
2023-05-27 15:49:36 +02:00
elsid
235eb65c97
Rename positionToCellIndex to match return type 2023-05-27 15:49:36 +02:00
elsid
98e80d65b0
Remove unused include 2023-05-27 15:49:36 +02:00
elsid
b6cd6402cc
Use ranged for loop 2023-05-27 15:49:36 +02:00
elsid
a04eb9d26c
Move WorldModel::getPtr(const ESM::RefId&, CellStore&) to CellStore
The function does not depend on WorldModel.
2023-05-27 15:49:36 +02:00
elsid
df6630a15c
Move WorldModel private functions to bottom
This is API class. A reader most likely need to know public functions first.
2023-05-27 15:49:36 +02:00
elsid
181c894e4c
Skip already visited cells when looking for ptr 2023-05-26 22:51:03 +02:00
elsid
466a7cedbb
Convert pointer to referece where nullptr is not acceptable 2023-05-26 22:42:50 +02:00
elsid
1b116240a3
Try return existing CellStore from WorldModel::getCellStore first 2023-05-26 22:40:03 +02:00
Evil Eye
877f6747be Deduplicate specialization code 2023-05-26 12:16:47 +02:00
AnyOldName3
5f4e349ea1 Try and compute planes based on cheaper meshes to skip more groundcover isntances 2023-05-26 00:21:44 +01:00
elsid
dc8dfe81ce
Add more details to exceptions 2023-05-25 20:56:07 +02:00
elsid
d852ac20f5
Log loading content file 2023-05-25 20:56:07 +02:00
Mads Buvik Sandvei
85a30c9ad0 Fix signature of MWMechanics::MagicEffects::get. Fix a mistake in the docs. 2023-05-25 18:12:18 +02:00
Petr Mikheev
4ed283bb15 Merge branch 'create_record_types' into 'master'
Allow creating Activator, Armor, Clothing, Misc, Weapon records via lua

See merge request OpenMW/openmw!2944
2023-05-25 08:00:13 +00:00
Zackhasacat
ef004e5eba Allow creating Activator, Armor, Clothing, Misc, Weapon records via lua 2023-05-25 08:00:12 +00:00
psi29a
d3ed04c551 Merge branch 'lua-activeeffects' into 'master'
Lua: Actor api for active effects and active spells

See merge request OpenMW/openmw!3036
2023-05-25 07:49:08 +00:00
AnyOldName3
3831714f07 This is not more readable 2023-05-24 00:13:56 +01:00
AnyOldName3
c41befadfb Use correct planes for the new matrix 2023-05-24 00:02:13 +01:00
Mads Buvik Sandvei
40170d8953 is_automagical false line for ActorStore 2023-05-23 22:55:43 +02:00
Evil Eye
17c8e63d3a Fix invalid memory usage in stats tooltip 2023-05-23 20:03:12 +02:00
Mads Buvik Sandvei
97ea626ba2 Clang'd 2023-05-23 19:49:47 +02:00
Mads Buvik Sandvei
4f88988131 Moved check for actor/non-actor to ActorStore constructor. Refactor ActorSpells type to be an ActorStore type. 2023-05-23 19:44:51 +02:00
Mads Buvik Sandvei
410e8b100a Elsid comments 2023-05-23 19:30:29 +02:00
Mads Buvik Sandvei
4bf23f152b Revert use of string_view to std::string for effectIdTo* methods. 2023-05-23 18:12:06 +02:00
Mads Buvik Sandvei
9a59330561 refactor effect names in loadmgef. Added a map from effect index to non-gmst effect name for use in lua scripts. 2023-05-23 18:11:59 +02:00
Mads Buvik Sandvei
151521bb68 Unused function 2023-05-23 18:11:44 +02:00
Mads Buvik Sandvei
448658ce5b Check class validity before using it. 2023-05-23 18:11:44 +02:00
Mads Buvik Sandvei
87250bfabf clang warnings/errors 2023-05-23 18:11:44 +02:00
Mads Buvik Sandvei
7ba43c9426 actor.ActiveEffects and actor.ActiveSpells 2023-05-23 18:11:44 +02:00
psi29a
01705485b8 Merge branch 'grow_limit' into 'master'
[Needs testing] Migrate Grow Limit editor feature to a more modern code

See merge request OpenMW/openmw!2637
2023-05-23 08:39:38 +00:00
psi29a
87b15c22f3 Merge branch 'fixcolladaregression' into 'master'
Fix regression with Collada-animated creatures

See merge request OpenMW/openmw!2882
2023-05-23 08:30:02 +00:00
Nelsson Huotari
4abd47f430 Fix regression with Collada-animated creatures 2023-05-23 08:30:02 +00:00
psi29a
2545185d52 Merge branch 'cs_show_magic_effect_name' into 'master'
Show magic effect name instead of IndexRefId (#7366)

Closes #7366

See merge request OpenMW/openmw!3049
2023-05-23 08:21:35 +00:00
psi29a
30305d7bea Merge branch 'topicloop' into 'master'
Detect service refusal in constant time

See merge request OpenMW/openmw!3053
2023-05-23 08:20:55 +00:00
psi29a
64b07ee9f4 Merge branch 'esmtool_dawnguard_dragonborn' into 'master'
Partial support esmtool dump for Dragonborn.esm and Dawnguard.esm from Skyrim

See merge request OpenMW/openmw!3052
2023-05-23 08:20:10 +00:00
psi29a
a61f955e9f Merge branch 'case.ext' into 'master'
Fix a regression and use more starts_with and ends_with

See merge request OpenMW/openmw!3051
2023-05-23 08:18:41 +00:00
Evil Eye
11f875d9c4 Detect service refusal in constant time 2023-05-22 22:24:04 +02:00
elsid
e537d1d0d4
Ignore missing localization string files by esmtool
Dawnguard.esm from Skyrim depends on files stored in Dawnguard.bsa which is not
processed by esmtool.
2023-05-22 22:09:08 +02:00
elsid
358b7ad3ec
Keep ESM4 localized strings in memory
Size of the files is in order of megabytes at max. Storing offset lookup table
to read from file on demand is less efficient than reading from memory for such
size.

Read and store offsets first. Sort them to read values sequentially. Memoize
last offset and value to avoid reading the same value twice. Use seek only when
current possition does not match offset. Optimize seek for short distance by
calling read instead.
2023-05-22 22:09:06 +02:00
Evil Eye
9728024978 Replace compare with more idiomatic methods 2023-05-22 19:51:27 +02:00
elsid
8f47da46ec
Show magic effect name instead of IndexRefId 2023-05-22 18:02:21 +02:00
elsid
bb1d040ac8
Use settings values for Cells settings 2023-05-22 17:36:23 +02:00
elsid
585cf377ed
Use bool instead of std::stringstream::view
view is not supported by libc++ used for macOS builds.
2023-05-22 14:32:23 +02:00
psi29a
6f8c152487 Merge branch 'convert_camera_settings' into 'master'
Use settings values for Camera settings (#6876)

See merge request OpenMW/openmw!3041
2023-05-22 09:14:06 +00:00
psi29a
dab616f4e2 Merge branch 'guiew' into 'master'
Use string_view in more places and reduce the number of empty string literals

See merge request OpenMW/openmw!3042
2023-05-22 09:12:45 +00:00