Evil Eye
1d21330fcc
Return string_view from getGameSettingString
2022-08-24 22:16:03 +02:00
Evil Eye
0cded25033
Remove various string copies
2022-08-24 20:38:52 +02:00
Evil Eye
0df45a90b3
Use string_view in the remaining Class methods and push string_views closer to the MyGUI boundary
2022-08-23 22:14:27 +02:00
Evil Eye
262b29ed40
Use string_view in modifyBaseInventory
2022-08-23 16:59:03 +02:00
psi29a
9c24d6b390
Merge branch 'ci_starts_with' into 'master'
...
Replace ciCompareLen with ciStartsWith where possible
See merge request OpenMW/openmw!2325
2022-08-22 17:34:03 +00:00
Evil Eye
150d1840d6
Use more string_view and const string&
2022-08-22 16:55:53 +02:00
elsid
5dc612aa54
Replace ciCompareLen with ciStartsWith where possible
...
`ciCompareLen(a, b, b.size()) == 0` expression is an equivalent of checking for
equality of `a` prefix with size `b.size()` with `b`.
`ciCompareLen(a, b, a.size()) == 0` is also the same thing but `a` is a prefix
`b` should start with.
2022-08-22 09:32:22 +02:00
elsid
a66c095ec3
Cleanup openmw class and mechanics includes
2022-08-19 15:46:39 +02:00
Evil Eye
4ff12d8945
Make Class::getName return string_view
2022-08-16 21:15:03 +02:00
psi29a
b382e92953
Merge branch 'please_dont_copy_my_nfts' into 'master'
...
Prevent various values from being copied
See merge request OpenMW/openmw!2267
2022-08-16 08:36:34 +00:00
Evil Eye
eaa108d25d
Return string_view from SoundId methods
2022-08-14 14:39:58 +02:00
Alexei Kotov
7f3d2c18e1
Evaluate melee hits on weapon release (bug #5057 )
2022-08-13 01:15:42 +03:00
Evil Eye
685906afdf
Make getScript return string_view
2022-08-11 22:51:55 +02:00
Evil Eye
de51525c76
Allow string_view lookups in MWWorld::Store and get some use out of that
2022-08-09 20:43:14 +02:00
Evil Eye
1248bdc816
Save state for disposed actors if they can respawn
2022-08-02 19:33:27 +02:00
Ivan Beloborodov
f960e30d01
Implement Add switch for armor degradation fix. #6888
2022-07-29 13:24:16 +00:00
myrix
782cb7699d
use std::string, no unlocalized message, show soul gem id
2022-07-25 02:56:25 +03:00
myrix
3698d96b46
use ciCompareLen, move checks to Miscellaneous::use and ActionSoulgem
2022-07-25 01:47:10 +03:00
myrix
8817f802cb
message when using empty soul gems, using preferentially filled ones with equip command
2022-07-24 23:02:26 +03:00
ζeh Matt
841fd9618f
Rename DrawState_ to DrawState and use enum class
2022-07-17 20:50:26 +03:00
elsid
49f8445f87
Move AiSetting out of MWMechanics::CreatureStats
...
To replace creaturestats.hpp include in mwworld/class.hpp with forward
declaration reducing total size of preprocessed code.
2022-07-16 16:43:33 +02:00
Evil Eye
1a5a526b15
Remove unecessary casts and prevent nullptr dereference in getWalkSpeed
2022-07-13 21:17:11 +02:00
elsid
ce263af393
Use existing functions and objects to call correctMeshPath etc
...
Remove WindowManager wrappers.
It's not safe to use WindowManager in all places and it's not required.
Environment stores resource system providing VFS required to call these
functions. In the case of ObjectPaging it's available from the member variable.
Also ObjectPaging::createChunk may access WindowManager when it's already
destructed when exiting the game because it's destructed before CellPreloader
finishes all background jobs. Engine::mResourceSystem is destructed after all
other systems so it's safe to use it.
2022-06-29 00:58:49 +02:00
elsid
fdf6e58ea3
Split apps/openmw/mwmechanics/actorutil.hpp
2022-06-26 16:42:29 +02:00
uramer
3761e7b24e
Pass a 0-count object to onConsume instead of the record id
2022-06-18 11:13:54 +02:00
uramer
c3c48f21d7
Consolidate item consumption code
2022-06-18 11:13:54 +02:00
uramer
fd7965d77f
Use correctMeshPath instead of string constants
2022-06-12 11:30:29 +02:00
jvoisin
0cc304e659
Clean up MyGUI includes
...
This should improve incremental compilation.
2022-06-04 15:26:36 +02:00
Evil Eye
3c83117e99
Replace new with make_unique in openmw
2022-05-29 13:24:48 +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
a64979e25d
Replace empty std::string assignments
2022-05-04 22:33:39 +02:00
elsid
ec3674b40a
Use unique_ptr instead of shared_ptr
...
for MWWorld::Action, ProjectileManager and ESSImport::Converter.
shared_ptr has additional cost of reference counter and requires additional
allocation when constructed as shared_ptr<T>(new T).
2022-04-08 16:12:36 +02:00
elsid
dc20e799e1
Use static object to register classes
2022-04-06 16:49:25 +02:00
elsid
6e0d660dd5
Check whether model is empty before trying to insert object
2022-04-03 17:38:33 +00:00
ζeh Matt
08fae7be6e
Pass the prng from world where appropriate
2022-03-21 17:49:42 +02:00
Alexei Dobrohotov
fdd9e6a793
Always reduce weapon condition by the raw damage (bug #6559 )
2022-02-23 16:37:56 +03: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
Evil Eye
c1f59b1221
Automatically drop workaround when the format is next updated
2021-12-24 23:17:50 +01:00
psi29a
c844e5d045
Merge branch 'racer_recursion_limited' into 'master'
...
Check if a leveled creature is in an unloaded cell before deciding it doesn't exist
Closes #4376
See merge request OpenMW/openmw!1420
(cherry picked from commit 782371cb2e7f6653d72305090033557b53bbcf3a)
6d945da7 Check if a leveled creature is in an unloaded cell before deciding it doesn't exist
2021-12-06 13:58:35 +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
Evil Eye
289e1544d2
Don't wait a frame to recalculate magicka
2021-10-25 16:54:50 +02:00
Andrei Kortunov
107a9ecb17
Fix variables hiding
2021-10-24 18:45:04 +04:00
Evil Eye
f70a154195
Merge branch 'place' of github.com:akortunov/openmw into master
2021-10-23 11:34:42 +02: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
elsid
68ed8487b5
Use lambda instead of bool to make sure GMST initialized once
...
This is less expensive than having 2 static variables and thread-safe.
2021-10-21 03:19:12 +02:00
elsid
2a0e1697b6
Deduplicate swim speed formula implementation
2021-10-21 01:25:09 +02:00
Andrei Kortunov
362c124e8f
Allow to place levelled creatures to the game world (bug 6347)
2021-10-17 17:58:54 +04:00
Bo Svensson
ef906cbfa8
improves MWClass mapping ( #3166 )
...
Currently, we use a peculiar mapping of ESM classes by their std::type_info::name. This mapping is an undefined behaviour because std::type_info::name is strictly implementation defined. It could return a non-unique value on some platforms. With this PR we use the unsigned int sRecordId of the ESM class as a more efficient lookup type that does not build on undefined behaviour. We can expect marginally faster save-game loading with these changes as well.
2021-10-11 13:46:21 +02:00
Bret Curtis
8309910d9d
Restore the cell grid to its former non-exorbitant size, reducing stutter and also threw in a simple alternative fix for the actor position adjustment issue.
2021-09-30 22:58:40 +02:00