1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-30 21:32:42 +00:00

3395 Commits

Author SHA1 Message Date
ζeh Matt
841fd9618f
Rename DrawState_ to DrawState and use enum class 2022-07-17 20:50:26 +03:00
psi29a
06db2446b1 Merge branch 'cleanup_aistate' into 'master'
Cleanup MWMechanics::AiState

See merge request OpenMW/openmw!2141
2022-07-17 09:13:04 +00:00
elsid
b8937a493a
Avoid manual memory management for MWMechanics::DerivedClassStorage 2022-07-16 17:13:16 +02:00
elsid
d2b7253c7f
Use forward declarations instead of including aistate.hpp 2022-07-16 17:13:16 +02:00
elsid
f5c2e09df9
Move AiTemporaryBase to a separate header 2022-07-16 17:13:16 +02:00
elsid
e11fbc10b1
Remove unused member functions from MWMechanics::DerivedClassStorage 2022-07-16 17:13:16 +02: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
psi29a
98f839982e Merge branch 'refactor_actors' into 'master'
Refactor MWMechanics::Actors

See merge request OpenMW/openmw!2094
2022-07-07 17:56:09 +00:00
Evil Eye
e42d63f4a4 Don't try to start combat with oneself and don't tell the player what to do 2022-07-06 19:12:36 +02:00
elsid
f1ded70366
Remove redundant condition
apps/openmw/mwmechanics/character.cpp:500:14: warning: redundant condition 'isRealWeapon' [bugprone-redundant-branch-condition]
        else if (isRealWeapon)
             ^~~~~~~~~~~~~~~~~
2022-07-06 13:52:25 +02:00
psi29a
95a6fa8d0c DeathKnockOut when KnockOut... 2022-07-06 10:48:22 +00:00
psi29a
cec707e994 No attack animation while blocking fix 2022-07-05 18:29:21 +00:00
elsid
bef15edf0b
Remove redundant ostream, istream, iostream and sstream includes
* Replace by std::to_string and operator+ where possible.
* Move the code requiring to include <sstream> from .hpp to .cpp files.
2022-07-05 01:41:28 +02:00
elsid
c476437b6e
Mark Actors member functions as const where possible 2022-07-04 22:37:27 +02:00
elsid
ae4ec0a1d0
Convert static const to constexpr where possible 2022-07-04 22:16:38 +02:00
elsid
2ec757ab0f
Remove unnecessary member functions from Actors 2022-07-04 22:16:38 +02:00
elsid
0132b6e19c
Use range-based for loop 2022-07-04 22:16:37 +02:00
elsid
5e8df40718
Mark not changing variables as const 2022-07-04 22:16:37 +02:00
elsid
f8b8569f3b
Initialize variables on declaration 2022-07-04 21:38:26 +02:00
elsid
a05ed48a57
Move lua controls update into a separate function 2022-07-04 21:31:55 +02:00
elsid
03792eebdb
Reuse isPlayer variable instead of using operator != 2022-07-04 21:26:44 +02:00
elsid
77eaf2082f
Move head tracking update into a separate function 2022-07-04 21:26:42 +02:00
elsid
fe206c1526
Remove updateHeadTracking from member functions 2022-07-04 21:17:07 +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
1a5932a669
Move std::ostream& operator<< to .cpp 2022-06-26 22:43:53 +02:00
elsid
fdf6e58ea3
Split apps/openmw/mwmechanics/actorutil.hpp 2022-06-26 16:42:29 +02:00
Evil Eye
b79c42fa77 Exclude followers in combat with their leader 2022-06-22 16:37:03 +02:00
Evil Eye
cc081c3d2d Don't add additional targets to allies that are already in combat 2022-06-22 16:36:58 +02:00
Alexei Kotov
fbb0004aae Avoid assigning idle animations to non-actors (bug #5371) 2022-06-22 03:53:39 +03:00
elsid
1a12c453d6
Support different agent collision shape type for pathfinding
Actors may have different collision shapes. Currently there are axis-aligned
bounding boxes and rotating bounding boxes. With AABB it's required to use
bounding cylinder for navmesh agent to avoid providing paths where actor can't
pass. But for rotating bounding boxes cylinder with diameter equal to the front
face width should be used to not reduce of available paths. For example rats
have rotating bounding box as collision shape because of the difference between
front and side faces width.

* Add agent bounds to navmesh tile db cache key. This is required to distinguish
  tiles for agents with different bounds.
* Increase navmesh version because navmesh tile db cache key and data has changed.
* Move navmesh version to the code to avoid misconfiguration by users.
* Fix all places where wrong half extents were used for pathfinding.
2022-06-21 12:57:32 +02:00
psi29a
d2df89b013 Merge branch 'aitravelendtolerance' into 'master'
Give AITravel time to end if the actor is close to the destination (#6495)

Closes #6495

See merge request OpenMW/openmw!2036
2022-06-21 07:31:37 +00:00
Petr Mikheev
e466a812d8 Merge branch 'lua_consume' into 'master'
Refactor consuming mechanics, improve Lua onConsume handler

See merge request OpenMW/openmw!1848
2022-06-20 12:12:50 +00:00
Alexei Kotov
bd6716d89d Give AITravel time to end if the actor is close to the destination 2022-06-20 15:07:18 +03:00
Alexei Kotov
3baf346200 Use numeric_limits for indefinite idle looping 2022-06-19 08:58:12 +03:00
uramer
c3c48f21d7 Consolidate item consumption code 2022-06-18 11:13:54 +02:00
Alexei Kotov
183378e34a Fix idle swim/sneak animation fallback again 2022-06-18 03:24:45 +03:00
Alexei Kotov
0b38e165f7 Avoid clearing the current weapon animation group if it's still going to be in use 2022-06-17 09:53:13 +00:00
psi29a
67e764a44a Merge branch 'severecharacterdisorder' into 'master'
Make the character controller less miserable, round 4: juicy stuff (bug #5592)

Closes #5592

See merge request OpenMW/openmw!2014
2022-06-15 11:42:17 +00:00
elsid
fdd84265b3
Use proper agent height and radius when render actor path
That are based on half extents used to find path over navmesh which is different
for interior and exterior cells.

Use common functions to get agent height and radius for actor path rendering and
navmesh generation.
2022-06-15 01:11:11 +02:00
Alexei Kotov
2b019864b7 Remove more legacy states 2022-06-14 13:47:16 +03:00
Alexei Kotov
30ef7ad81b Properly cancel the landing animation during movement 2022-06-14 12:50:30 +03:00
Alexei Kotov
c2ac52c82a Remove dead code 2022-06-14 12:50:30 +03:00
Alexei Kotov
61d382dc9f Set the initial IdleState to CharState_None 2022-06-14 12:50:30 +03:00
Alexei Kotov
4ce08664e9 Fix swim spellcasting stance turning fallback 2022-06-14 12:50:30 +03:00
Alexei Kotov
5dfce6205a Reset the idle animation after a movement animation ends
Fix non-biped actor idle reset
2022-06-14 12:50:30 +03:00
Alexei Kotov
1a646374b0 Always reset the idle animation after the landing animation ends 2022-06-14 12:50:30 +03:00
Alexei Kotov
69a1d8ac86 Restart idle instantly only after the hit state ends 2022-06-14 12:50:30 +03:00
Alexei Kotov
35db7b8319 Fix fallback for missing swim/sneak idle animations 2022-06-14 01:12:05 +03:00
Alexei Kotov
253de65d13 Fix knockout animation interruption/looping 2022-06-13 17:53:38 +03:00
Alexei Kotov
b8018024a6 Avoid passing weapon short group to refreshXAnims 2022-06-13 17:53:38 +03:00