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

180 commits

Author SHA1 Message Date
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
8d6f017f17 Remove an unneeded Animation field 2013-02-09 13:25:39 -08:00
Chris Robinson
600fe06f00 Use a vector of skeletons to handle animation sources 2013-02-05 16:29:51 -08:00
Chris Robinson
23acf4b130 Don't break right away when the animation time remaining is 0 2013-02-03 01:38:42 -08:00
Chris Robinson
fc7590694d Revert "Revert "Use a child scene node for the accumulation root""
This reverts commit 376dfed15b.

I was wrong. It's needed at least for NPCs since they're attaching multiple
animated skeletons to an object, and they all need to be offset correctly.

Would be nice to use a Node, Bone, or TagPoint instead of a hefty SceneNode,
though.
2013-02-02 05:43:37 -08:00
Chris Robinson
376dfed15b Revert "Use a child scene node for the accumulation root"
This reverts commit d6f923f274.

We don't need it for any of the NIFs we're currently handling. As long as
there's no NIF files that would break it, we should require a stationary root
if an animation wants to accumulate. If we must, a better idea may be to inject
an extra bone into the skeleton instance and make that the accumulation root.
2013-02-01 08:50:32 -08:00
Chris Robinson
d6f923f274 Use a child scene node for the accumulation root 2013-01-30 22:28:18 -08:00
Chris Robinson
b6354c6282 Don't share skeleton instances between bounded parts on an NPC
However, a skeleton instance will still be shared between entities in an entity
list.
2013-01-30 09:29:16 -08:00
Chris Robinson
5c3a7f7d52 Avoid handling animation states
We don't need them anymore
2013-01-30 07:34:07 -08:00
Chris Robinson
360f7bfac8 Apply animations to bones manually
Couple reasons for this:

* This paves the way for allowing animations specified in other skeletons to
be applied to the character (NPCs and certain creatures can have multiple
animation sources, but Ogre is incredibly strict when it comes to sharing
animations between skeletons).

* It will allow for entities to be animated based on the character's skeleton,
without having to duplicate the mesh for each skeleton it can be used on.

This doesn't impact Ogre's ability to efficiently deform skinned meshes, nor
does it get in the way of hardware skinning.
2013-01-30 07:04:18 -08:00
Chris Robinson
99efe4e494 Remove an unnecessary class member 2013-01-29 01:02:55 -08:00
Chris Robinson
92d0c55f32 Add a flag to specify if an animation should be playing 2013-01-29 00:43:42 -08:00
Chris Robinson
05f8b8c283 Specify the text key to reset animations to 2013-01-22 00:31:45 -08:00
Chris Robinson
37fe1bd3f0 Handle looping in the Animation object 2013-01-21 22:51:13 -08:00
Chris Robinson
85ca1e993f Properly check if an animation exists before playing it 2013-01-19 21:55:04 -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
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
9123f4f2af Return the movement vector from runAnimation 2013-01-18 16:21:29 -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
fc0f9e2159 The animation state tracks the animation time for us 2013-01-17 14:49:42 -08:00
Chris Robinson
7cce44290e Handle the animation queue in mwmechanics 2013-01-17 13:18:40 -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
3c32385e17 Avoid trying to animate things that don't have animations 2013-01-16 15:00:06 -08:00
Chris Robinson
0a2f92f679 Keep track of the current text key in the animation 2013-01-16 11:57:08 -08:00
Chris Robinson
f46587c383 Store an character controller in the animation 2013-01-16 11:01:08 -08:00
Chris Robinson
1e38e381a4 Use text keys for each animation 2013-01-09 03:30:55 -08:00
Chris Robinson
bb98542c5a Build separate animations for each group 2013-01-09 01:40:38 -08:00
Chris Robinson
d8dbd5e206 Store text key iterators for the start and stop times 2013-01-07 05:56:03 -08:00
Chris Robinson
5f668976a8 Improve resetting the animation position 2013-01-07 04:48:59 -08:00
Chris Robinson
5b3a20ef69 Update the object position as the animation moves 2013-01-06 21:18:48 -08:00
Chris Robinson
910619eb21 Store the NonAccum animation root from the skeleton instance
Currently this is assumed to be the node with the animation text keys.
2013-01-06 17:31:53 -08:00
Chris Robinson
b96a979719 Store an MWWorld::Ptr with the Animation 2013-01-06 17:05:48 -08:00
Chris Robinson
efca5ded47 Clean up some header includes to reduce nesting 2013-01-05 21:12:08 -08:00
Chris Robinson
818a24cdd6 Hold on to the AnimationState being used for animating 2013-01-05 00:03:14 -08:00
Chris Robinson
6e84d4bcdd Add a helper method to load entity objects 2013-01-04 23:19:48 -08:00
scrawl
2793096b50 Merge branch 'externalrendering' of https://github.com/zinnschlag/openmw into characterpreview
Conflicts:
	apps/openmw/CMakeLists.txt
	apps/openmw/mwbase/world.hpp
	apps/openmw/mwrender/renderingmanager.cpp
	apps/openmw/mwrender/renderingmanager.hpp
	apps/openmw/mwworld/worldimp.cpp
	apps/openmw/mwworld/worldimp.hpp
2012-09-15 00:57:29 +02:00
Chris Robinson
9f0c1eeb7b Support playgroup mode 0 2012-07-24 14:54:12 -07:00
Chris Robinson
13ab2baef0 Use a struct to hold the current animation times and remaining loop count 2012-07-24 14:42:01 -07:00
Chris Robinson
20121f3b0a Remove some unused stuff 2012-07-24 13:56:28 -07:00
Chris Robinson
9a7a629d0f Add support for playing animation groups 2012-07-24 13:51:48 -07:00
Chris Robinson
f953d7f8c0 Store text keys from base NIF animations 2012-07-23 17:27:35 -07:00
Chris Robinson
77446a0d58 Fix skipAnim, only skip one animation update 2012-07-21 17:39:57 -07:00
Chris Robinson
81ce8dbe12 Combine animation handling into the base class 2012-07-21 14:41:26 -07:00
Chris Robinson
2db80a1504 Rename a couple methods to match their scripting counterparts 2012-07-20 00:53:12 -07:00
Chris Robinson
66860825cf Remove some unused and unneeded bits from the Animation class 2012-07-20 00:36:52 -07:00
Chris Robinson
94f3e7a6c0 Store the entity list in the object 2012-07-17 16:00:03 -07:00
Chris Robinson
0a4a141f2e Support multiple meshes for creatures 2012-07-17 11:23:34 -07:00
Chris Robinson
6047dc6a0c Merge remote branch 'zini/master' into nif-cleanup
Conflicts:
	apps/openmw/mwrender/animation.cpp
	apps/openmw/mwrender/animation.hpp
	apps/openmw/mwrender/creatureanimation.cpp
	apps/openmw/mwrender/npcanimation.cpp
	apps/openmw/mwrender/npcanimation.hpp
	components/nifogre/ogre_nif_loader.hpp
2012-07-17 10:57:15 -07:00
Marc Zinnschlag
0d3a7d482e Merge remote branch 'modred11/master' 2012-07-17 10:21:46 +02:00
guidoj
0549e949ba Mostly removal of unnecessary #include's and a little clean up 2012-07-17 09:27:12 +02:00
Carl Maxwell
e4d046f69c Prepending m to the name of every member variable.
I made a bunch of changes in apps/openmw/mwrender/animation.cpp
because the scope brackets didn't line up in a bunch of places
    npcanimations.cpp & creatureanimations.cpp were the same kind of
thing
2012-07-13 03:51:58 -07:00
Chris Robinson
386ac56bda Remove the NIF loader and code to manually transform the vertices
This currently breaks just about everything. They should come back as it's all
reimplemented, though.
2012-07-12 20:12:18 -07:00
Marc Zinnschlag
35f478071e Issue #255: deleted the old environment class and using the new one instead 2012-04-23 15:27:03 +02:00
Jason Hooks
ebab98a8a0 Restructuring things 2012-04-07 22:02:20 -04:00
Lukasz Gromanowski
5185a28b60 Issue #225: Initialize all class members in constructor. 2012-03-26 19:09:55 +02:00
Alexander "Ace" Olofsson
e8eea03b4c Fixed a few more non-virtual destructor warnings 2012-03-15 17:40:42 +01:00
Jason Hooks
39ff8d6a01 Compile error retry 2012-03-06 18:28:41 -05:00
Jason Hooks
9848b67174 Fixing errors 2012-03-05 17:46:29 -05:00
Jason Hooks
8d7a5f469b a few changes 2012-02-26 21:27:54 -05:00
Jason Hooks
6de0847b86 Slightly better performance on animation 2012-01-25 01:21:30 -05:00
Jason Hooks
0712bba49b Changing a few things around with handleshapes 2012-01-12 16:03:07 -05:00
Jason Hooks
a615369189 Warning and different physics 2012-01-06 22:52:15 -05:00
Jason Hooks
859ac1153e Basic Text Indices Working 2012-01-06 02:27:10 -05:00
Jason Hooks
0715f9b6ab Preparing to use text indices 2012-01-06 00:55:02 -05:00
Jason Hooks
595d0b1192 Cleanup; warnings 2012-01-05 21:45:17 -05:00
Jason Hooks
c2fa82326d Animation with physics attempt 2012-01-04 23:48:25 -05:00
Jason Hooks
1d2e77d947 Turning off hardware skinning 2012-01-04 19:47:06 -05:00
Jason Hooks
42e7ff9b13 Introducing loops; SkipAnim; Skeleton reset bug fixed 2011-12-28 21:52:05 -05:00
Jason Hooks
8c3127367a Npc Optimization 2011-12-27 22:35:22 -05:00
Jason Hooks
cef2f5e927 Trying to get code to conform with older c++ 2011-12-27 19:19:45 -05:00
Jason Hooks
a6b88b48ec A different way 2011-12-27 00:20:14 -05:00
Jason Hooks
88c427543b Deleting animations; Empty Functions/Planning 2011-12-25 22:37:26 -05:00
Jason Hooks
7cf3fc8991 handleAnimationTransforms 2011-12-18 03:18:26 -05:00
Jason Hooks
6d10c76b06 Unique Identifiers for Creatures and NPC Free Parts 2011-12-17 01:29:08 -05:00
Jason Hooks
d51dfebde1 NPCs fully rendered 2011-12-15 00:33:10 -05:00
Jason Hooks
47112ad7f9 Changing a lot of things 2011-12-13 23:49:03 -05:00
Jason Hooks
509009e5c1 Putting the actors in a list 2011-12-11 23:42:39 -05:00
Jason Hooks
0902a3db89 Filled out NpcAnimation and CreatureAnimation classes 2011-12-11 22:40:00 -05:00
Jason Hooks
16ff2a7a1b Changing to Actors;NPCAnimation;CreatureAnimation 2011-11-24 01:48:54 -05:00