1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 16:49:55 +00:00
Commit graph

270 commits

Author SHA1 Message Date
gus
076f98cbba change way animations keys are handled (thanks KittyCat!) 2013-07-15 16:37:25 +01:00
gus
3947f44aa3 Porting old work 2013-07-13 22:24:52 +01:00
Vincent Heuken
b095c24854 resize actor collision boxes on death 2013-06-27 14:11:20 -07:00
Glorf
88f8637145 Bugfix #795 2013-06-26 22:20:24 +02:00
scrawl
8bd712cc95 Fix being able to move slowly when over encumbered 2013-05-31 04:08:44 +02:00
Torben Carrington
c8c1ddd927 Adds functionality for checking if the animation group passed is currently playing on the actor passed. This is needed for AIWander. 2013-05-24 20:10:07 -07:00
Chris Robinson
e8bbb755c3 Play the left-arm torch animation when it's equipped 2013-05-17 06:21:59 -07:00
Chris Robinson
4b9a888d74 Use the PickProbe animation group as appropriate 2013-05-17 01:46:51 -07:00
Chris Robinson
6201cb0093 Add a method to clear the animation queue 2013-05-16 06:59:41 -07:00
Chris Robinson
e069215583 Don't clear the last queued animation when it stops 2013-05-15 06:32:20 -07:00
Chris Robinson
66f55b3178 Play the item up/down sound when readying/unreadying weapons 2013-05-15 01:45:47 -07:00
Chris Robinson
b459a010b0 Fix vec.z being applied while not in the air 2013-05-14 23:03:28 -07:00
Chris Robinson
e8661794fe Avoid trying to find a state for non-actors.
They're only ever play idles, unless PlayGroup is called.
2013-05-14 07:29:07 -07:00
Chris Robinson
8ec722ac92 Use std::find_if instead of ugly for loops 2013-05-13 04:08:36 -07:00
Chris Robinson
f83ee5d316 Play ready/unready animations on the upper body 2013-05-13 03:32:00 -07:00
Chris Robinson
70dc2f77ad Move the priority enum to MWMechanics 2013-05-13 00:54:44 -07:00
Chris Robinson
7ba2508556 add a priority for death animations, and store it in the state list 2013-05-12 19:19:21 -07:00
Chris Robinson
4e389b5a8f Store whether a given animation loops in the state table 2013-05-12 05:59:39 -07:00
Chris Robinson
bbb38c61cc Fix queued animations 2013-05-12 05:08:01 -07:00
Chris Robinson
2c556e4036 Be smarter about handling non-moving animations
Don't rely on being told by the play method, so the animation can
automatically change without impacting the character controller.
2013-05-12 04:29:42 -07:00
Chris Robinson
6b8a687a79 Add methods to disable an animation
And rename WeaponState to WeaponType
2013-05-10 22:22:39 -07:00
Chris Robinson
abc676eedd Allow specifying which bone groups to play an animation on 2013-05-10 20:05:09 -07:00
Chris Robinson
7c3b014193 Figure out which animations to play based on priority
Bone group will also be taken into account later.
2013-05-10 18:37:44 -07:00
Chris Robinson
ccff364b52 Use a map of active layers instead of an array
A bit of an upheaval. Each animation is now a "layer", instead of each layer
having an animation. Incidentally, this is much closer to how Ogre handles
animation states.

In the future, each layer will have a priority, which will be used to determine
which one affects a given bone group (which we currently only have one of).
2013-05-10 03:08:07 -07:00
Chris Robinson
90e29c83c0 Merge remote-tracking branch 'zini/master' into animations
Conflicts:
	apps/openmw/mwmechanics/character.cpp
2013-05-06 19:17:39 -07:00
kpp
dcccfd9f22 Initialize values 2013-05-02 22:43:21 +04:00
Chris Robinson
a120653c38 Implement handling weapon states 2013-05-01 10:19:16 -07:00
Marc Zinnschlag
95eeea2a27 Revert "Merge remote-tracking branch 'glorf/acrobatics'"
This reverts commit 089ef7a2a0, reversing
changes made to 67422c397c.
2013-05-01 16:56:16 +02:00
Glorf
b8630239d7 Code cleanup 2013-05-01 12:25:02 +02:00
Glorf
236ec3409f Finished acrobatics 2013-05-01 12:21:59 +02:00
Chris Robinson
4b15da076b Move getStateInfo into the character controller 2013-04-30 19:26:41 -07:00
Glorf
d30e43784a Fatigue decrease when jumping, live decrease when falling 2013-04-30 23:39:56 +02:00
Glorf
5a8c1661be Jump acrobatics working, started falling acrobatics implementation 2013-04-30 20:44:17 +02:00
Glorf
add3cd6456 Advance acrobatics on jump 2013-04-30 18:22:59 +02:00
Chris Robinson
05060e57ec Add a weapon state to the character controller 2013-04-29 13:07:49 -07:00
scrawl
07891fa213 Athletics skill increase 2013-04-28 07:53:04 +02:00
Chris Robinson
274f3c7b77 Force character state to update after switching view modes 2013-04-25 07:08:11 -07:00
Chris Robinson
e4eb4b7e30 Keep track of the character looping state 2013-04-25 06:29:17 -07:00
Chris Robinson
9da2c9153e Don't store the animation group string in the character controller 2013-04-25 06:12:37 -07:00
Chris Robinson
24f1eba902 Keep track of whether an animation supplies movement
Also handle it when it doesn't.
2013-04-24 22:45:43 -07:00
Chris Robinson
0817d59f23 Allow specifying where to start in an animation 2013-04-24 19:09:36 -07:00
Chris Robinson
333354fe62 Remove the character controller from the Animation class 2013-04-24 07:10:41 -07:00
Chris Robinson
b80891099e Don't use the character controller to handle text keys
The Animation class has the Ptr and can call to whatever subsystem is needed.
2013-04-24 06:48:34 -07:00
Chris Robinson
e8cabc9434 Pass the loop count from loopgroup to the play method
Instead of queueing each iteration separately.
2013-04-24 06:32:11 -07:00
Chris Robinson
c58dfbe921 Specify the loop count to Animation::play 2013-04-24 04:56:39 -07:00
Chris Robinson
8782ae6976 Separate some Animation fields into a separate AnimLayer class 2013-04-22 23:52:28 -07:00
Chris Robinson
bb64efc18e Improve looping behavior 2013-04-22 05:08:52 -07:00
Chris Robinson
6c85d6763a Pass "loop stop" to the character controller 2013-04-21 18:38:25 -07:00
Chris Robinson
d0703efd69 Another place to check the class' isActor method 2013-03-31 17:32:39 -07:00
Chris Robinson
4836ba16f7 Implement turning states 2013-03-31 03:50:20 -07:00
Chris Robinson
7b02ec411b Apply the rotation when updating the character controller 2013-03-31 01:29:24 -07:00
Chris Robinson
466c0086b8 Use a full Movement to hand off to the world physics update 2013-03-31 00:13:56 -07:00
Chris Robinson
0ce188b7cc Store the position and rotation in MWMechanics::Movement 2013-03-30 19:00:46 -07:00
Chris Robinson
af65ecd841 Pass the movement vector in as a parameter to CharacterController::update 2013-03-30 18:37:40 -07:00
scrawl
268bb23590 Implemented sneaking animation 2013-03-06 16:58:56 +01:00
Chris Robinson
48271e49ec Properly update the Ptr object in the mechanics manager when moving across cells 2013-02-25 09:57:34 -08:00
Chris Robinson
89d4c245e9 Better calculate jump velocity
The fatigue term isn't currently used correctly
2013-02-24 03:30:33 -08:00
Chris Robinson
d77d035d3a Handle the "sound" events in runAnimation 2013-02-23 14:15:11 -08:00
Chris Robinson
e6da9dfae5 Specify the animation key to stop playing at 2013-02-23 05:15:10 -08:00
Chris Robinson
f841576bba Don't override animations played with playgroup 2013-02-23 01:54:46 -08:00
Chris Robinson
7fcca180b6 Implement rudimentary jumping 2013-02-20 20:08:04 -08:00
Chris Robinson
1399a06c76 Update animation looping when setting the same state 2013-02-19 04:01:33 -08:00
Chris Robinson
17200cb226 Don't try to move when there's no speed 2013-02-18 20:43:55 -08:00
Chris Robinson
627b866744 Don't try to set a new state when dead 2013-02-18 06:29:16 -08:00
Chris Robinson
f2948ced23 Allow diagonal movement 2013-02-18 03:07:31 -08:00
Chris Robinson
e4341525c8 Add a jump state
Currently unused
2013-02-15 04:45:28 -08:00
Chris Robinson
ff0099fa6e Scale the animation speed based on the animation velocity and movement speed
This may not be totoally correct since it takes the whole animation into
account, rather than just the looping portion. But it's good enough for now.
2013-02-15 02:15:39 -08:00
Chris Robinson
cbaf489eb6 Add running states 2013-02-06 16:53:52 -08:00
Chris Robinson
fc307e64b0 Add swimming states 2013-02-05 19:05:07 -08:00
Chris Robinson
8c0bb1ff4d Rotate movement in the movement solver 2013-02-05 14:02:14 -08:00
Chris Robinson
f7f1adfb9d Don't accumulate animations with activators 2013-02-05 12:55:06 -08:00
Chris Robinson
2c39760bd5 Move the movement solver code to mwworld's physics system 2013-02-05 12:45:10 -08:00
Chris Robinson
82e4da4e64 Get the half-extents from the physicactor 2013-02-05 07:41:57 -08:00
Chris Robinson
39cf7b0b42 Pass the Ptr of the object being moved to the move method
This prevents having to store another copy of it, which risks getting out of
sync.
2013-02-04 11:17:48 -08:00
Chris Robinson
1a5cb8760d Rotate movement vector to world space before passing to the movement solver 2013-02-04 11:04:20 -08:00
Chris Robinson
6b32fa7999 Use the correct position for the actor 2013-02-04 09:48:21 -08:00
Chris Robinson
1747c1e01a Integrate a new movement solver to handle object movement and collisions
Temporary, and pretty breoken. Needs some serious integration fixes.
2013-02-04 07:10:14 -08:00
Chris Robinson
91513206a0 Don't use per-animation accumulation values
This breaks walking diagonally and "jumping" (which technically wasn't jumping
anyway).
2013-02-03 12:02:51 -08:00
Chris Robinson
51d5efeeb2 Work out the state in the character controller update method 2013-02-03 07:15:34 -08:00
Chris Robinson
7fe877d8ea Add a couple more character states 2013-02-03 00:19:22 -08:00
Chris Robinson
007a5963de Handle most state changes in the character controller when setting the movement vector 2013-02-02 23:39:43 -08:00
Chris Robinson
04d4c125ba Print when an animation event is unhandled 2013-01-29 02:00:42 -08:00
Chris Robinson
37fe1bd3f0 Handle looping in the Animation object 2013-01-21 22:51:13 -08:00
Chris Robinson
e956a1cbc0 Merge SpecialIdle character state into Idle 2013-01-21 03:24:52 -08:00
Chris Robinson
6905bd18ba Filter out the group name from the text keys
It's already in the animation name, and the text keys are animation-specific
anyway.
2013-01-21 02:59:12 -08:00
Chris Robinson
85ca1e993f Properly check if an animation exists before playing it 2013-01-19 21:55:04 -08:00
Chris Robinson
68779375b2 Implement WalkLeft and WalkRight character states 2013-01-19 16:19:47 -08:00
Chris Robinson
a7b07ee5cf Don't reset the animation when setting the same state
Unless looping is being toggled on.
2013-01-19 15:46:22 -08:00
Chris Robinson
e0541b52c4 Use a list to store and get state information 2013-01-19 14:56:24 -08:00
Chris Robinson
de2d084e61 Add a looping property to handle if an animation should loop 2013-01-19 14:22:15 -08:00
Chris Robinson
0b68953f0d Scale animation speed using the direction length
The direction length doesn't currently give a good speed, but it's something.
2013-01-18 21:40:47 -08:00
Chris Robinson
aecfc0829a Implement WalkForward and WalkBack character states 2013-01-18 18:04:00 -08:00
Chris Robinson
e33f59e0fe Ensure the direction vector is initialized and copied properly 2013-01-18 17:41:36 -08:00
Chris Robinson
1cdd64cd9b Return the animation movement from the character controller.
Consequently, dead actors don't move anymore. The doPhysics call apparently
isn't moving them.
2013-01-18 17:05:58 -08:00
Chris Robinson
9235fba770 Store the movement vector in the character controller 2013-01-18 16:00:51 -08:00
Chris Robinson
40f8e75763 Use a SpecialIdle state for PlayGroup/LoopGroup invoked animations
Note that actors will *not* automatically resume a normal idle state afterward.
Their AI will need to control what to do when the special idle is finished.
2013-01-18 15:39:28 -08:00
Chris Robinson
a527cb8349 Loop the current animation when not dead
This should be better, but it's not perfect. It misses the case where
start < loop start == loop stop <= stop
2013-01-18 15:22:14 -08:00
Chris Robinson
c7684cb979 Pass the key time to markerEvent 2013-01-18 14:50:55 -08:00
Chris Robinson
3e9b0a333c Allow specifying the accumulation for animations
Animations that move a character may do so either visually or physically. An
axis' accumuluation value specifies whether the movement is visual (0) or
physical (1). Idle animations, for instance, typically don't physically move a
character, while death animations may physically move them along the X and Y
planes, but not along Z (the vertical movement is purely visual).
2013-01-18 14:25:32 -08:00
Chris Robinson
5cafc24ee2 Rename CharState_Alive back to CharState_Idle 2013-01-18 13:43:45 -08:00
Chris Robinson
a94947029e Check the marker name before deciding what to do with it
Also, don't force 'idle' after a playgroup
2013-01-18 00:59:48 -08:00
Chris Robinson
9d7ccfda1f Rename CharState_Idle to CharState_Alive 2013-01-17 21:07:36 -08:00
Chris Robinson
8720433fa9 Do not automatically loop animations
There are 0 length idle animations that break this
2013-01-17 17:54:09 -08:00
Chris Robinson
8fa1b56efc Loop the current animation if there's nothing more queued 2013-01-17 16:34:26 -08:00
Chris Robinson
7cce44290e Handle the animation queue in mwmechanics 2013-01-17 13:18:40 -08:00
Chris Robinson
47c157303a Filter events that do not belong to the current group 2013-01-17 11:03:58 -08:00
Chris Robinson
da4f17859e Recognize soundgen animation markers 2013-01-17 10:16:36 -08:00
Chris Robinson
7ee389f3b2 Handle animation skipping in the character controller 2013-01-16 21:25:50 -08:00
Chris Robinson
852aa214cc Store the available animation names in the character controller 2013-01-16 21:16:22 -08:00
Chris Robinson
afbc9f3e41 Keep track of the animation group currently playing 2013-01-16 20:44:37 -08:00
Chris Robinson
685f219560 Return a movement vector from the character controller update 2013-01-16 18:56:13 -08:00
Chris Robinson
d2f5a886c7 Handle playgroup and skipanim through mwmechanics 2013-01-16 17:53:18 -08:00
Chris Robinson
46fc61a4c1 Run animations from the character controller 2013-01-16 16:31:09 -08:00
Chris Robinson
46728ab27f Handle "sound:" animation events 2013-01-16 15:52:03 -08:00
Chris Robinson
3c32385e17 Avoid trying to animate things that don't have animations 2013-01-16 15:00:06 -08:00
Chris Robinson
94b93227d3 Treat activators as actors for rendering and mechanics
Kinda hacky, but it's the only way to get animated activators (flags, silt
striders, etc) to work properly.
2013-01-16 14:37:32 -08:00
Chris Robinson
d2fc3c7b33 Add a method to tell the character controller of new text keys 2013-01-16 13:09:21 -08:00
Chris Robinson
f46587c383 Store an character controller in the animation 2013-01-16 11:01:08 -08:00
Chris Robinson
3c487e6019 Play an animation when changing states 2013-01-16 10:45:18 -08:00
Chris Robinson
771a5f7316 Add the beginnings of a character controller 2013-01-10 08:35:24 -08:00