1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 15:35:23 +00:00

3318 Commits

Author SHA1 Message Date
elsid
19e471741a
Use PtrBase::mRef instead of getBase for mechanics objects
getBase adds a condition and can throw an exception. Which is redundant for
MWMechanics::Objects functions.
2022-05-21 00:41:57 +02:00
elsid
1bb1053569
Make all MWMechanics::Actor functions inline 2022-05-21 00:41:56 +02:00
elsid
77c09dff39
Store CharacterController by value in MWMechanics::Actor 2022-05-21 00:41:55 +02:00
elsid
e2c44d13f3
Use std::list to store mechanics actors
To make the order of elements deterministic. Using memory address based objects
as map key makes order of elements there nondeterministic. Later it can be
replaced with vector when there are no indirect munipulations with container
inside iteration loops.

Change map key to const MWWorld::LiveCellRefBase* to avoid erasing and inserting
elements on MWWorld::Ptr update.
2022-05-20 22:55:55 +02:00
elsid
ce3bba0cdc
Use std::list to store mechanics objects
To make the order of elements deterministic. Using memory address based objects
as map key makes order of elements there nondeterministic. Later it can be
replaced with vector when there are no indirect munipulations with container
inside iteration loops.

Change map key to const MWWorld::LiveCellRefBase* to avoid erasing and inserting
elements on MWWorld::Ptr update.

Store CharacterController by value instead of pointer to avoid redundant memory
allocation.
2022-05-20 00:47:10 +02:00
ζeh Matt
18f16eac4c
Refactor DetourNavigator to pass prng along, use world prng for AiWander 2022-05-17 20:37:15 +03:00
Evil Eye
2531e24ee3 Fix inverted logic 2022-05-16 18:29:16 +02:00
elsid
ef64587cbf
Mark unchanging static as const 2022-05-09 00:59:51 +02:00
elsid
66c9b6c199
Make MWMechanics::Actors local static variables to be members 2022-05-09 00:59:37 +02:00
elsid
87ca575d60
List private members of MWMechanics::Actors in a single place 2022-05-09 00:55:09 +02:00
psi29a
408540517a Merge branch 'refactor/fCombatInvisoMult' into 'master'
Avoid looking up settings from gmst each frame

See merge request OpenMW/openmw!1771
2022-05-08 10:43:08 +00: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
Alexei Kotov
6857f4f7ff Merge branch 'empty_and_clear' into 'master'
Replace empty std::string assignments

See merge request OpenMW/openmw!1827
2022-05-05 06:43:30 +00:00
Evil Eye
a64979e25d Replace empty std::string assignments 2022-05-04 22:33:39 +02:00
Evil Eye
55d32432b9 Don't mark idle animations as bad when blocking them 2022-05-04 21:15:08 +02:00
unknown
1bc24d5120 Bring HitAttemptOnMe in line with HitOnMe 2022-04-30 18:32:10 +02:00
Matt
56a1505885 Cache the target for ai packages instead of looking for it every frame 2022-04-17 17:15:00 +00:00
psi29a
d3d9abede4 Merge branch 'refactor/predictAndAvoidCollisions' into 'master'
Use active package in predictAndAvoidCollisions

See merge request OpenMW/openmw!1770
2022-04-12 19:20:33 +00:00
ζeh Matt
b2739dc84a
Avoid looking up settings from gmst each frame 2022-04-12 18:58:13 +03:00
ζeh Matt
1a41cefab3
Use active package in predictAndAvoidCollisions 2022-04-12 18:32:58 +03:00
elsid
39da3bfef8
Ignore player when checking whether AiTravel destination is occupied by other actor 2022-04-11 19:30:54 +02:00
ζeh Matt
058da82823
Reduce calls in CharacterController::updateState 2022-04-09 01:52:52 +03:00
ζeh Matt
dd222b9ef1
Reduce calls in CharacterController::updateIdleStormState 2022-04-09 01:21:34 +03:00
ζeh Matt
e85a979f10
Reduce calls in CharacterController::handleTextKey 2022-04-09 01:20:53 +03:00
ζeh Matt
25b26f6fa7
Reduce calls in CharacterController::refreshHitRecoilAnims 2022-04-09 01:06:15 +03: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
Petr Mikheev
5ed22c4c7a Minor fix in actors.cpp 2022-04-06 21:55:05 +02:00
Matt
49e21e121a Revert "Merge branch 'refactor/6677-2' into 'master'"
This reverts merge request !1733
2022-04-04 17:09:52 +00:00
Matt
21e4c10fa9 Introduce IndexedVector 2022-04-04 13:56:19 +00:00
ζeh Matt
c3d02492df
Cleanup stopMovement 2022-03-29 19:49:02 +03:00
ζeh Matt
33706923a3
Restructure function updateCrimePursuit 2022-03-28 17:25:22 +03:00
ζeh Matt
9821982944
Restructure function updateEquippedLight 2022-03-28 16:48:16 +03:00
ζeh Matt
127366a948
Restructure function updateDrowning 2022-03-28 16:38:39 +03:00
ζeh Matt
0b306bc1ea
Restructure function engageCombat 2022-03-28 16:32:56 +03:00
ζeh Matt
8631b96680
Restructure function updateGreetingState 2022-03-28 16:25:33 +03:00
ζeh Matt
5e44dd41eb
Restructure function updateMovementSpeed 2022-03-28 16:20:24 +03:00
ζeh Matt
23615e653a
Mark getActivePackage const 2022-03-28 16:17:42 +03:00
ζeh Matt
cba51e5e1c
Restructure function updateHeadTracking 2022-03-28 16:13:40 +03:00
ζeh Matt
f5b527e445
Restructure function isCommanded 2022-03-28 16:07:20 +03:00
psi29a
1c70b9790c Merge branch 'covid_wont_stop_me' into 'master'
Don't reset last hit object if the ID doesn't match

Closes #6682

See merge request OpenMW/openmw!1727
2022-03-28 11:40:46 +00:00
Evil Eye
c1d700f770 Don't reset last hit object if the ID doesn't match 2022-03-28 11:40:46 +00:00
Evil Eye
7695f03c4c Remove unused variable 2022-03-27 17:20:22 +02:00
ζeh Matt
edca5ac0b8
Rename hasDisease to hasSpellType and refactor function 2022-03-25 20:47:43 +02:00
ζeh Matt
dcdba227f7
Use vector for mUsedPowers for deterministic order 2022-03-25 20:42:01 +02:00
ζeh Matt
8103ff2e6f
Make the CI happy 2022-03-21 17:49:42 +02:00
ζeh Matt
08fae7be6e
Pass the prng from world where appropriate 2022-03-21 17:49:42 +02:00
ζeh Matt
d83a381f79
Refactor and rename some things around Misc::Rng 2022-03-06 17:28:28 +02:00
Petr Mikheev
df41b4080d Merge branch 'refactor/headtracking' into 'master'
Small improvement for headtracking

See merge request OpenMW/openmw!1683
2022-03-03 20:39:53 +00:00
Matt
0b528d3bfb Small improvement for headtracking 2022-03-03 20:39:53 +00:00