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

20882 commits

Author SHA1 Message Date
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
elsid
63e01d86a3
Use string based UniversalId to check script for blacklist
Blacklist is a vector of strings and isBlacklisted internally calls getId which
throws exception for RefId based UniversalId.
2023-05-22 03:14:00 +02:00
elsid
0aa569d4fe
Add UniversalId argument type to exception message on invalid access 2023-05-22 03:14:00 +02:00
elsid
292983d57a
Show UniversalId value for all argument types in reports 2023-05-22 03:14:00 +02:00
elsid
7ba397da7d
Use std::span and std::string to define UniversalId related TypeData 2023-05-22 03:14:00 +02:00
elsid
ceab7557f3
Add rudimentary support for ESM::RefId in UniversalId
Ideally std::string support should be removed but this may affect too much code.
2023-05-22 03:12:16 +02:00
elsid
4cd5efc6ee
Implement UniversalId with std::variant 2023-05-22 03:03:05 +02:00
elsid
f2a3462e59
Fix UniversalId constructor from ESM::RefId 2023-05-22 02:47:06 +02:00
elsid
6541ac43f5
Add UniversalId unit tests 2023-05-22 02:47:04 +02:00
Evil Eye
ed7b6dc2a7 Clarify CharacterCreation::setValue 2023-05-21 19:53:31 +02:00
psi29a
458ee4abaa Merge branch 'coc_destination' into 'master'
Improve coc destination search in ESM4 cells

See merge request OpenMW/openmw!3034
2023-05-21 17:33:36 +00:00
Tetramir
3d574f16a1 Merge branch 'grid_update' into 'master'
Update mHalfGridSize in Scene::changeCellGrid before using it

See merge request OpenMW/openmw!3030
2023-05-21 17:05:01 +00:00
Evil Eye
492e336c0c Use string_view in more UI code 2023-05-21 18:14:12 +02:00
Evil Eye
5491512905 Use string_view in more places and reduce the number of empty string literals 2023-05-21 16:39:32 +02:00
Petr Mikheev
9b6808f83d Improve coc destination search in ESM4 cells 2023-05-21 00:42:25 +02:00
elsid
5d5e6844d1
Use settings values for Camera settings 2023-05-20 22:23:09 +02:00
elsid
4be43a2dca
Map SettingValueType Cell to float setting type 2023-05-20 15:00:00 +02:00