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

26820 commits

Author SHA1 Message Date
fredzio
ad7a810a62 Unify interface for Actor and Projectile 2021-10-27 22:03:04 +02:00
Frederic Chardon
5009b66ef5 Use std::variant in the physics simulation for the different types of objects. For now only support only for actors. 2021-10-27 22:02:46 +02:00
psi29a
fb3675d523 Merge branch 'improved_toggleworld' into 'master'
Improved toggle world (#6364)

See merge request OpenMW/openmw!1320
2021-10-27 18:00:56 +00:00
glassmancody.info
e436147c10 improved toggle world 2021-10-27 09:16:01 -07:00
Bret Curtis
cd358ce1f9
Update CMakeLists.txt 2021-10-27 11:48:17 +02:00
Bret Curtis
299f8c3fe7
Merge pull request #3198 from akortunov/master
Early out from LOS check when source and target is the same
2021-10-27 11:28:03 +02:00
Andrei Kortunov
3ee6657768 Early out from LOS check when source and target is the same (bug 5913) 2021-10-27 10:01:06 +04:00
Petr Mikheev
dd96eba2b0 Update OpenMW Lua docs 2021-10-26 21:52:42 +02:00
Petr Mikheev
95faeaa9c1 Fix: after reloadlua call onActive for all active scripts 2021-10-26 21:52:42 +02:00
Petr Mikheev
19a0fde278 Filter saves by the first esm/omwgame rather than by the first content file (that can be a universal omwaddon/omwscripts) 2021-10-26 21:52:42 +02:00
Petr Mikheev
47c89567fb Load LuaScriptsCfg from both *.omwscripts and *.omwaddon files. 2021-10-26 21:52:42 +02:00
Petr Mikheev
4ec7f0625e Store Lua timers in std::map rather than in sol::table. 2021-10-26 21:32:48 +02:00
Petr Mikheev
9adc190209 Redesign LuaUtil::ScriptsContainer to work with ScriptsConfiguration 2021-10-26 21:32:48 +02:00
Petr Mikheev
33d71be81f Add LuaUtil::ScriptsConfiguration 2021-10-26 21:32:02 +02:00
Petr Mikheev
6aab246879 Add ESM records that are needed to store Lua scripts configuration;
Use ptr.getType() (i.e. esm record names) instead of typeid(ptr.getClass()) in apps/openmw/mwlua.
2021-10-26 21:32:02 +02:00
Evil Eye
4ec927829f Give each reflect and spell absorption effect a chance to apply 2021-10-26 16:50:40 +02:00
psi29a
3006c496fc Merge branch 'morrowland_scripting' into 'master'
Morrowland scripting

Closes #6363

See merge request OpenMW/openmw!1318
2021-10-26 10:07:45 +00:00
psi29a
c0dca5371b Merge branch 'recalc_mana' into 'master'
Don't wait a frame to recalculate magicka

Closes #3792

See merge request OpenMW/openmw!1323
2021-10-26 08:58:04 +00:00
psi29a
2765bcee5e Merge branch 'serialization' into 'master'
Add helpers for binary serialization

See merge request OpenMW/openmw!1319
2021-10-26 08:25:17 +00:00
glassmancody.info
ba4f1921ab overrides 2021-10-25 15:04:55 -07:00
glassmancody.info
07e32c0fa6 remove object shader path 2021-10-25 10:23:16 -07:00
Evil Eye
289e1544d2 Don't wait a frame to recalculate magicka 2021-10-25 16:54:50 +02:00
psi29a
e9f065222c Merge branch 'mac1015fix' into 'master'
Workaround MacOS failure for 10.15 by setting it to `allow_failure: true`

See merge request OpenMW/openmw!1322
2021-10-25 13:18:52 +00:00
Bret Curtis
3d0da9b9b2
Merge pull request #3191 from akortunov/warnfix
Fix some MSVC warnings
2021-10-25 15:17:05 +02:00
Bret Curtis
ac02753da7
Merge pull request #3190 from akortunov/master
Fix showscenegraph warnings
2021-10-25 12:59:36 +02:00
psi29a
13b84ce798 Fix MacOS failure for 10.15 by setting it to allow_failure: true 2021-10-25 10:42:14 +00:00
Bo Svensson
1ff8318a52
refactors premultiplied alpha (#3189)
With this PR we refactor a `premultiplied alpha` user string set by `characterpreview.cpp` into a more flexible mechanism allowing us to assign any state to GUI textures. We can consider these changes more future proof than the previous approach.
2021-10-25 09:28:32 +02:00
Bo Svensson
7f9beac3a7
refactors a case insensitive map (#3184)
This PR aims to spark the retirement of a questionable pattern I have found all over our code base. I will illustrate how this pattern encourages code duplication, lacks type safety, requires documentation and can be prone to bugs.
```
std::map<std::string, Object> mMap; // Stored in all lowercase for a case-insensitive lookup

std::string lowerKey = Misc::StringUtils::lowerCase(key);
mMap.emplace(lowerKey, object);

std::string lowerKey = Misc::StringUtils::lowerCase(key);
mMap.find(lowerKey);

mMap.find(key); // Not found. Oops!
```
An alternative approach produces no such issues.
```
std::unordered_map<std::string, Object, Misc::StringUtils::CiHash, Misc::StringUtils::CiEqual> mMap;

mMap.emplace(key, object);

mMap.find(key);
```
Of course, such an alternative will work for a `map` as well, but an `unordered_map` is generally preferable over a `map` with these changes because we have moved `lowerCase` into the comparison operator. 

In this PR I have refactored `Animation::mNodeMap` accordingly. I have reviewed and adapted all direct and indirect usage of `Animation::mNodeMap` to ensure we do not change behaviour with this PR.
2021-10-25 09:18:26 +02:00
Bo Svensson
6fb376f1cf
templatise ptr.hpp (#3185)
With this PR we consolidate identical logic for Ptr and ConstPtr with the help of a template.
2021-10-25 09:08:50 +02:00
glassmancody.info
9cbbd2fff5 better transitions 2021-10-24 17:13:42 -07:00
Evil Eye
fef902617a Parse integer format arguments as variable names 2021-10-24 17:23:15 +02:00
Andrei Kortunov
0f3c0cb0a0 Fix argument types mismatch 2021-10-24 18:45:46 +04:00
Andrei Kortunov
107a9ecb17 Fix variables hiding 2021-10-24 18:45:04 +04:00
elsid
a58f1a94e3
Add helpers for binary serialization
To construct serializer from given entities:
* Data source/destination - any value that has to be serialized/deserialized,
  usually already existing type.
* Format - functional object to define high level serialization logic to
  define specific format and data schema. Like order of fields, allocation.
* Visitor - functional object to define low level serialization logic to
  operator on given data part.
  * BinaryWriter - copies given value into provided buffer.
  * BinaryReader - copies value into given destination from provided buffer.
  * SizeAccumulator - calculates required buffer size for given data.
2021-10-24 14:20:44 +02:00
Andrei Kortunov
566380c0d6 Fix showscenegraph warnings 2021-10-24 12:37:49 +04:00
glassmancody.info
1e40d27318 introduce sky shaders 2021-10-23 17:53:38 -07:00
Bret Curtis
62b59a3c00
Update CMakeLists.txt 2021-10-23 12:56:02 +02:00
Bo Svensson
41318a585f
fixes enable and disable commands (#3186)
This PR fixes a recent regression concerning enable and disable commands with object paging. In addition, we add a necessary comment to avoid such issues in the future.
2021-10-23 12:40:26 +02:00
Evil Eye
31aa19574b Make PositionCell take additional junk arguments 2021-10-23 11:47:42 +02:00
Evil Eye
dfb6bdf77e Allow integer variable names 2021-10-23 11:47:35 +02:00
Evil Eye
f70a154195 Merge branch 'place' of github.com:akortunov/openmw into master 2021-10-23 11:34:42 +02:00
Bret Curtis
e65af0bf06
Silence all opengl deprecation warnings for MacOS
We know...
2021-10-23 10:48:37 +02:00
psi29a
217d17adeb Merge branch 'ugly_rounding' into 'master'
Prevent floating point issues accumulating

See merge request OpenMW/openmw!1306
2021-10-23 08:39:26 +00:00
Bo Svensson
c9c8d02332
fixes a crash (#3183)
This PR fixes a crash caused by the improperly ensured lifetime of RigGeometry::mSourceGeometry. mSourceGeometry was not adequate to ensure mSourceGeometry would outlive mGeometry because we extend mGeometrys lifetime beyond this lifetime by passing mGeometry to the draw traversal instead of this.
In addition,

We add important comments.
We detect and prevent generally unsafe operations in high level code.
We add a sprinkling of const to help clarify intentions.
2021-10-23 10:31:46 +02:00
Evil Eye
b5c876299d Round to a power of two 2021-10-23 09:29:16 +02:00
wareya
e23b0edda4 Add pre-pass to collision trace function that traces over less distance if possible 2021-10-22 23:11:23 -04:00
elsid
f2e43272e4 Merge branch 'master' into 'master'
Remove non-existent file from CMakeLists

See merge request OpenMW/openmw!1315
2021-10-23 02:42:25 +00:00
Fanael Linithien
07d505563e Remove non-existent file from CMakeLists 2021-10-23 01:38:32 +02:00
psi29a
1ffa02b2fd Merge branch 'fix_windows_tests' into 'master'
Fix tests on windows

See merge request OpenMW/openmw!1313
2021-10-22 12:35:10 +00:00
psi29a
a4899d72f4 Merge branch 'deduplicate_swim_speed' into 'master'
Deduplicate swim speed formula implementation

See merge request OpenMW/openmw!1310
2021-10-22 12:34:19 +00:00