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
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
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
glassmancody.info
06676fd623
lua - fix bounding box in active grid
2023-05-19 14:29:01 -07:00
Petr Mikheev
1d55844f26
Update mHalfGridSize in Scene::changeCellGrid before using it.
2023-05-19 17:58:59 +02:00
Petr Mikheev
690c752984
Unload active cells when teleporting to another exterior worldspace
2023-05-19 14:33:16 +02:00
psi29a
1ce35fa9e7
Merge branch 'lua-bounding-box' into 'master'
...
Expose game object's bounding box in lua api
See merge request OpenMW/openmw!3009
2023-05-19 09:33:44 +00:00
glassmancody.info
a7b7f99d72
Expose game object's bounding box in lua api
2023-05-18 11:10:10 -07:00
Petr Mikheev
169859025c
Don't use getTerrainHeightAt(pos)
when adjusting position in ESM4 cell because this function is currently specific to ESM3.
2023-05-18 02:10:39 +02:00
Petr Mikheev
c8056f6561
Hide ESM4 LOD objects and markers
2023-05-18 02:10:39 +02:00
Petr Mikheev
29031d0586
Increase ESM4 active grid
2023-05-18 00:38:41 +02:00
Petr Mikheev
ac65246389
Speedup ESM4 cell loading; load objects from permanent cells (exterior doors in particular)
2023-05-18 00:38:41 +02:00
elsid
ee3956e4f2
Print FormId as hex by esmtool dump
2023-05-17 22:59:34 +02:00
psi29a
99ed8557bf
Merge branch 'get_rid_of_std_bind' into 'master'
...
Get rid of std::bind
See merge request OpenMW/openmw!3023
2023-05-17 10:54:43 +00:00
psi29a
2a7d5a89d7
Merge branch 'fix_navmeshtool_avoid_shape' into 'master'
...
Use different object id for avoid shape
See merge request OpenMW/openmw!3021
2023-05-17 07:59:39 +00:00
psi29a
5fba79ece3
Merge branch 'teleport' into 'master'
...
Additional Lua bindings for cells and fixes for teleporting
See merge request OpenMW/openmw!3017
2023-05-17 07:57:57 +00:00
psi29a
41c9e3c449
Merge branch 'selected_spell' into 'master'
...
Lua commands getSelectedSpell/setSelectedSpell
See merge request OpenMW/openmw!3018
2023-05-17 07:46:48 +00:00
smilczek
027d51bfc0
fixed a mistake
2023-05-15 21:06:05 +02:00
smilczek
05a2dc985b
Clang format
2023-05-14 22:51:43 +02:00
smilczek
2910e35bc2
Clarified the lambda expressions
2023-05-14 22:43:44 +02:00
smilczek
42cab989b1
got rid of auto
2023-05-14 22:43:44 +02:00
smilczek
128bb11833
done
2023-05-14 22:43:44 +02:00
elsid
2a7b105484
Use different object id for avoid shape
...
Otherwise addObject will ignore it as a duplicate and resulting recastmesh will
not match generated by the engine causing navmeshdb cache miss.
2023-05-14 18:45:40 +02:00
elsid
04d439485b
Log more info about navmesh shapes and jobs
2023-05-14 18:34:31 +02:00
Petr Mikheev
e657874351
Lua commands getSelectedSpell/setSelectedSpell
2023-05-14 15:17:03 +02:00
Petr Mikheev
63906059f1
Fix #7378 (dropped objects vanish when saving and reloading)
2023-05-14 14:53:01 +02:00
Petr Mikheev
7113638848
Fix animation of teleported non-teleporting doors.
2023-05-13 20:59:55 +02:00
Petr Mikheev
ce7f6f31c9
Additional Lua bindings for cells
2023-05-13 20:59:55 +02:00
Petr Mikheev
2725a9d7f4
Add option "onGround=true/false" in Lua teleporting
2023-05-13 20:59:55 +02:00
Robert
23dc38fe12
Fixed mutex causing crash in openal_output.cpp
2023-05-13 18:12:13 +00:00
Petr Mikheev
e53f907a53
Set CharacterController::mSmoothedSpeed to zero after teleporting.
2023-05-13 15:26:39 +02:00
psi29a
ab17d0947a
Merge branch 'esm4-exterior' into 'master'
...
Loading ESM4 Exteriors
See merge request OpenMW/openmw!2986
2023-05-12 23:32:55 +00:00
psi29a
c15710c35b
Merge branch 'settings_values_index' into 'master'
...
Use typed settings storage for settings window (#6876 )
See merge request OpenMW/openmw!2997
2023-05-12 21:53:59 +00:00
florent.teppe
7c6471b0dc
getExteriorCellLocation() added to MWWorld::Cell
2023-05-12 23:24:36 +02:00
florent.teppe
a3bd6e7e47
ESM::ExteriorCellIndex => ESM::ExteriorCellLocation
2023-05-12 22:05:55 +02:00
florent.teppe
393357abc0
ESM::Cell::positionToCellIndex returns a ESM::ExteriorCellIndex
...
and takes a worldspace id as input
ESM::getCellSize takes a wordspace as input.
removed useless static in static inline funcs
2023-05-12 22:05:55 +02:00
florent.teppe
559830f59a
applies review comments
...
Removes ToLowercase after .serializeText
removed unused variable
!ptr => ptr == nullptr
better indentation + error message on throw
friend struct std::hash<...> useless on struct with all public fields.
2023-05-12 22:05:55 +02:00
florent.teppe
39cfe9c2fb
Removed unused variable, factorised code.
2023-05-12 22:05:55 +02:00
florent.teppe
3d06cabf6a
indexToPosition moved from world -> esm/util.hpp
2023-05-12 22:05:55 +02:00
florent.teppe
1cf0cd5628
moved mwworld/cellutils.hpp -> esm/util.hpp
2023-05-12 22:05:54 +02:00
florent.teppe
f261f59809
World::indexToPosition is modified to be less error prone.
2023-05-12 22:05:54 +02:00
florent.teppe
1fdecaaa34
seperate permanent and non permanent exterior cells.
2023-05-12 22:05:54 +02:00
florent.teppe
f731c5eadb
preloader compatible with esm4 exteriors.
2023-05-12 22:05:54 +02:00
florent.teppe
75561abfca
Factorises code and fixes preload bug.
2023-05-12 22:05:54 +02:00
florent.teppe
5648e03e9e
function to get cellsize depending on the context.
2023-05-12 22:05:54 +02:00
florent.teppe
3de08e654f
Better handling of water levels for exterior cells.
...
Especially for skyrim and it's weird water level values in exteriors.
If we don't have a valid exterior water level we use the world's water level
2023-05-12 22:05:54 +02:00
florent.teppe
56cb2a83ec
removed sDefaultWorldspace, only sDefaultWorldspaceId now.
...
sDefaultWorldspaceId is a StringRefId to be able to getvalue easily.
2023-05-12 22:05:53 +02:00
florent.teppe
141878f30d
int x, int y , ESM::RefId worldspace => ESM::ExteriorCellIndex
...
also removed the changeToExteriorCell that only took a position as input, didn't work with esm4.
2023-05-12 22:05:53 +02:00
florent.teppe
43e247d458
fixes tests
...
fix linux build + clang-tidy
2023-05-12 22:05:53 +02:00
florent.teppe
1d03b54694
maps with tuple key instead of map of map
...
instead of using a map with key as exterior and map of <int ,int >, Cell as value we use a single map with a tuple x,y,exterior as key
2023-05-12 22:05:53 +02:00
florent.teppe
d8a782425b
can actually load and teleport to esm4 exterior spaces
2023-05-12 22:05:53 +02:00
florent.teppe
eb48f8724f
change grid and preload takes the right exterior
...
also fixes some crashes
2023-05-12 22:05:53 +02:00
florent.teppe
81d9686541
crashfix dynamic exterior cells
2023-05-12 22:05:53 +02:00
florent.teppe
a62e75fd19
Initial attempt at loading esm4 exteriors
2023-05-12 22:05:52 +02:00
psi29a
242ac21b38
Merge branch 'fix_local_map_update' into 'master'
...
Update cell local map on different neighbour cells (#7140 )
See merge request OpenMW/openmw!3012
2023-05-11 12:13:35 +00:00
elsid
aa9fb33a18
Update cell local map on different neighbour cells
...
Save which neighbour cells were active when local map for a cell is rendered.
Update when intersection of currently loaded cells is different from stored. If
map was rendered when all neighbours were loaded no more updates will happen.
2023-05-11 10:41:15 +02:00
elsid
f7ebd9b9b4
Avoid old C-style cast
2023-05-11 10:27:33 +02:00
elsid
fd249b46c0
Remove redundant member function
...
mActive is public.
2023-05-11 10:27:33 +02:00
elsid
b2f7fc70a6
Remove redundant MapSegment constructor and destructor
2023-05-11 10:27:32 +02:00
elsid
d927aaad14
Avoid redundant getCell()->getGrid* calls
2023-05-11 10:26:41 +02:00
elsid
1324256440
Avoid redundant lookup
2023-05-11 10:26:39 +02:00
elsid
624ffef4fe
Reduce block nesting
2023-05-11 10:26:18 +02:00
Petr Mikheev
f3adcab9c5
Update CellStore::mMergedRefs lazily.
2023-05-11 01:00:50 +02:00
Petr Mikheev
93342af1f9
Remove CellStore::searchViaRefNum (replaced with WorldModel::getPtr)
2023-05-11 00:17:22 +02:00
Petr Mikheev
270ead937b
Remove check in cellstore.cpp that causes Lua teleport command to fail.
2023-05-11 00:17:22 +02:00
Elias Howell
bf8fafa79a
fixed some typos and spelling errors
2023-05-09 20:07:08 -04:00
Petr Mikheev
3a8a4e8bff
Revert "Replace rayTest
with convexSweepTest
MovementSolver::traceDown
. Needed to prevent teleporting down through sewer grates."
...
This reverts commit 917132e326
.
2023-05-09 01:20:02 +02:00
Alexei Kotov
4394970894
Merge branch 'gui_view' into 'master'
...
Use string_view in journal code
See merge request OpenMW/openmw!3005
2023-05-08 17:37:46 +00:00
Evil Eye
f93d41d9ce
Use string_view instead of const char*
2023-05-08 17:18:18 +02:00
Evil Eye
ad3195488b
Remove unimplemented method declaration
2023-05-08 16:57:57 +02:00
psi29a
0a8c801d66
Merge branch 'lua_getters' into 'master'
...
Rename some functions in Lua API from `aaa` to `getAaa` (for consistency with `setAaa`)
Closes #7356
See merge request OpenMW/openmw!3004
2023-05-08 10:25:27 +00:00
psi29a
753696583e
Merge branch 'trace_down' into 'master'
...
Replace `rayTest` in `MovementSolver::traceDown` with `convexSweepTest`
See merge request OpenMW/openmw!3003
2023-05-08 09:31:53 +00:00
Petr Mikheev
067df2d07e
Rename some functions in Lua API from aaa
to getAaa
(for consistency with setAaa
)
2023-05-08 00:49:06 +02:00
psi29a
1f0aede634
Merge branch 'celloverride' into 'master'
...
Fix cell overrides and remove unused, incomplete erase method
See merge request OpenMW/openmw!3001
2023-05-07 19:50:36 +00:00
Petr Mikheev
917132e326
Replace rayTest
with convexSweepTest
MovementSolver::traceDown
. Needed to prevent teleporting down through sewer grates.
2023-05-07 21:13:14 +02:00
Evil Eye
22ba0a1cf0
Improve variable names
2023-05-07 17:27:28 +02:00
Petr Mikheev
86fce41a39
Keep refnum when moving objects to/from inventory ( #6148 )
2023-05-07 17:19:44 +02:00
elsid
188de0d8d4
Merge branch 'journalcase' into 'master'
...
Remove dialogue related instances of getRefIdString
See merge request OpenMW/openmw!2999
2023-05-07 14:49:49 +00:00
elsid
6de335dd77
Pass path to startup script as std::filesystem::path
2023-05-06 13:58:39 +02:00