1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +00:00

855 Commits

Author SHA1 Message Date
uramer
bf905fce4c Don't use WindowManager outside of UI, correct paths for new record types 2022-06-12 13:07:50 +02:00
uramer
1fb136a417 Correct icon and mesh paths in Lua records 2022-06-12 11:30:29 +02:00
elsid
3affe9913f
Limit the number of simultaneously open not actively used content files
Use LRU cache for ESMReaders. When cache capacity is reached close least
recently used ESMReader. Remember the file name if a reader was open. Once the
reader requested again open the file if there is stored name for it. Put
released ESMReader to the back of the free items list. Close ESMReader's from
the front of the free items list.

Cached item can be used only by one client at the same time. If the same item is
requested twice exception is thrown. This should never happen in practice. If
this happens need to fix the client logic.

It's allowed to go over the capacity limit when requesting different readers.
Ideally this should never happen but there will be system error anyway
signalizing about too many open files. Need to fix client logic in this case.

All places that were using a vector of ESMReaders now using the cache. Cache is
local for each use case and there is no need for a thread safety.
2022-06-03 01:29:03 +02:00
psi29a
af82140dda Merge branch 'filter_physics_actors' into 'master'
Do not perform physics simulation for actors outside processing range

See merge request OpenMW/openmw!1934
2022-05-29 19:19:35 +00:00
elsid
ac5844cad2
Do not perform physics simulation for actors outside processing range
Actors with disabled collisions still have physics simulations. Assuming they
should not be processed at all instead of disabling collision add a new flag to
make them inactive.
2022-05-26 10:36:03 +02:00
elsid
639bdd5801
Use free function instead of virtual MWBase::World::positionToIndex
The virtual function does the same thing.

* Change return type to osg::Vec2i to avoid dependency on ESM3.
* Rename to positionToCellIndex to make it clear what is the index.
2022-05-24 19:31:23 +02:00
Evil Eye
e79f803402 Change includes 2022-05-21 10:48:32 +02:00
Evil Eye
c6ca0e78c9 Make getStringLiteral return a string_view 2022-05-21 01:21:55 +02:00
cody glassman
04843fed6d moddable post-processing pipeline 2022-05-15 10:03:58 -07:00
elsid
a710cf6d10
Remove Environment cleanup
Some managers may use the environment in the destructors. Setting them to
nullptr may lead to nullptr dereference when the object is still alive and can
be accessible. But after object is destructed it's UB anyway to dereference
nullptr or a dangling pointer.
2022-05-11 23:26:39 +02:00
elsid
31bd87936f
Remove redundant virtual World::adjustSky function 2022-05-08 15:41:53 +02:00
elsid
b32a787cd8
Add explicit dependency to World from Scene
To avoid redundant MWBase::Environment::get().getWorld() calls and virtual
calls.
2022-05-08 15:41:53 +02:00
elsid
8473336b06
Remove redundant virtual functions 2022-05-08 15:41:52 +02:00
elsid
2dc6e755b2
Remove redundant update virtual functions 2022-05-06 23:44:04 +02:00
elsid
79676aee15
Make Environment a storage of referencing pointers instead of owned
Engine controls lifetime of managers therefore it should own them. Environment
is only access provider.

This allows to avoid redundant virtual calls and also some functions from
managers base classes can be removed if they are used only by Engine.
2022-05-06 23:44:01 +02:00
madsbuvi
dd5901d351 Initial commit
Multiview shaders.

Refactor Frustum management

Rewrite shared shadow map

cull mask should respect stereo

Stereo savegame screencap

LocalMap refactoring

use the vertex buffer hint instead of the display list patch to enable/disable display lists

Character preview fixes
2022-04-28 21:05:34 +02:00
Petr Mikheev
88d09c336c Lua console 2022-04-21 21:57:07 +02:00
uramer
5aa8e475a4 Merge branch 'rendering_raycast' into 'master'
Rendering raycasts in Lua

See merge request OpenMW/openmw!1768
2022-04-12 19:15:28 +00:00
Petr Mikheev
51845e9553 Rendering raycasts in Lua 2022-04-11 23:36:54 +02:00
elsid
39da3bfef8
Ignore player when checking whether AiTravel destination is occupied by other actor 2022-04-11 19:30:54 +02:00
Petr Mikheev
3af8ea5dfc Update Lua bindings for the camera 2022-04-06 21:55:05 +02:00
ζeh Matt
0611a8c3a7
Start new game with specified seed in options 2022-03-21 17:49:42 +02:00
ζeh Matt
b502dc12f0
Add prng to World instance and serialize state in Save 2022-03-21 17:49:42 +02:00
ζeh Matt
eca405e5c7
Use std::vector instead of std::list 2022-02-25 04:02:21 +02:00
uramer
cc6dce5443 Support controller touchpads (Resolves https://gitlab.com/OpenMW/openmw/-/issues/6639) 2022-02-21 19:49:00 +00:00
Alexei Kotov
4fdf55601c Merge branch 'bigboi' into 'master'
Force a scale update when changing view modes

Closes #6623

See merge request OpenMW/openmw!1662
2022-02-16 22:29:13 +00:00
Evil Eye
f9da792386 Force a scale update when changing view modes 2022-02-15 17:25:07 +01:00
elsid
a4d7b72511
Write png image of the global map for save asynchronously
Write global map to the save file last to give more time for async job to
finish.
2022-02-13 21:42:36 +01:00
psi29a
7f4d4c0d70 Merge branch 'refactor/system-ownership' into 'master'
Make ownership explicit in Engine and Environment

See merge request OpenMW/openmw!1605
2022-02-06 10:44:15 +00:00
ζeh Matt
a383d9dfdf
Make ownership explicit in Environment 2022-02-05 11:46:23 +02:00
Petr Mikheev
47c37e5849 Lua command object:activateBy(actor) and handler onActivate 2022-02-01 23:42:56 +00:00
uramer
c31dedb89c Implement Yaw, Pitch and Use (attack / cast spell) in Lua self.controls 2022-02-01 18:47:20 +00:00
Bret Curtis
74e7cfc023 remove unused includes: part1
remove unused imports: part2

revert one tidy we will keep for c++20
2022-01-23 17:30:25 +01:00
Bret Curtis
d1fb854521 move most of the files from esm to esm3, keep common code in esm; this is make space for a future with esm4
esm typo

esm typo
2022-01-23 17:04:48 +01:00
psi29a
dc4d73e76c Merge branch 'msgboxvanillastyle' into 'master'
Vanilla style encumbrance messagebox

Closes #6191

See merge request OpenMW/openmw!1437
2021-12-16 07:59:43 +00:00
psi29a
694f697f61 Merge branch 'it_isnt_theft_if_they_were_dead_when_you_started' into 'master'
Force the loot UI open if it was open while resurrecting the lootee

Closes #6453

See merge request OpenMW/openmw!1452
2021-12-06 14:49:01 +00:00
Evil Eye
893d569529 Force the loot UI open if it was open while resurrecting the lootee 2021-12-01 18:21:21 +01:00
kuyondo
df9f601ed7 initialize constants 2021-11-28 02:22:34 +08:00
kuyondo
1f2311538d vanilla style messagebox 2 2021-11-26 05:20:58 +08:00
Evil Eye
d6f06fbf9a Remove allies from combat when stopping combat 2021-11-25 22:00:52 +01:00
Petr Mikheev
f42badd7be Dehardcode camera 2021-11-19 20:37:21 +01:00
Petr Mikheev
d285427485 Update Lua package openmw.input 2021-11-11 20:14:30 +01:00
fredzio
68f4c336ce Rework again SetPos command to make more mods work.
Previous version skipped collision the frame immediately after a call to SetPos. It worked for one-off calls (teleports for instance) and continuous call along a pre-defined path (scenic travel). However, in the case of mod which uses SetPos to simulate a player-controlled movement, it is equivalent to using tcl.
Solution:
1/ skip update of mPosition and  mPreviousPosition to avoid janky interpolation
2/ use back plain moveObject() instead of moveObjectBy() since we don't want physics simulation
3/ rework a little bit waterwalking influence on coordinate because of 1/
2021-10-29 23:20:17 +02:00
Petr Mikheev
9adc190209 Redesign LuaUtil::ScriptsContainer to work with ScriptsConfiguration 2021-10-26 21:32:48 +02:00
psi29a
2c8c36fe5d Merge branch 'master' into 'effective_magic'
# Conflicts:
#   CHANGELOG.md
2021-10-01 21:20:08 +00:00
Evil Eye
b8e4f18751 Clear temporary effects before unloading actors to prevent absorb effects becoming permanent 2021-09-29 19:25:11 +02:00
Evil Eye
dc1fe62dde Overhaul magic effects to work with onApply and onEnd events 2021-09-29 19:25:10 +02:00
elsid
c0ef4417c3
Check AiTravel destination for other actors presence
Use faster aabbTest but without destance filter. To avoid dependency on a
specific constant and correctly handle situations when there is a big
difference between actors sizes.
2021-09-29 01:05:23 +02:00
psi29a
77e58abf0d Merge branch 'lua_input' into 'master'
Lua package 'openmw.input'

See merge request OpenMW/openmw!1073
2021-08-20 11:44:42 +00:00
jvoisin
7a015d24c6 Sprinkle some const-ref 2021-08-15 19:50:28 +02:00