Marc Zinnschlag
a7be755db0
Merge remote-tracking branch 'mrcheko/master'
11 years ago
mrcheko
46519062d3
hit recoils/knockdowns feature
11 years ago
mrcheko
2591ff2d5a
bug repairing
11 years ago
scrawl
c004fb778f
Get rid of underscore defines. They are reserved by the standard.
11 years ago
mrcheko
09a0a69b04
more improvements
11 years ago
scrawl
85ec80100c
Bug #1005 : Hide torches/shields during spellcasting and hand-to-hand combat
11 years ago
scrawl
d09a86e208
Issue #1018 : Don't allow view mode switching while performing an action
11 years ago
scrawl
5931fdcbde
Implement NiBillboardNode. Flags not handled yet.
11 years ago
scrawl
37a7ee8fcd
Set alpha value of character animations according to Invisibility / Chameleon effects.
11 years ago
scrawl
1624e0fd8a
Rename ObjectList to ObjectScene. Wrap it in a SharedPtr so we can automate the destruction routine.
11 years ago
scrawl
d2ed77f3f2
Fix shields being visible during spellcasting
11 years ago
scrawl
3452bd2e0b
Add glow effect for enchanted items
11 years ago
scrawl
0dc2e829dd
Lots of cleanup. Implemented Absorb and Resist. Implemented several instant effects. Added hand VFX.
11 years ago
scrawl
0b5f5351b5
Fix continuous FX getting removed instantly
11 years ago
scrawl
a6e2f43b75
Stop continuous VFX when the effect is no longer active.
11 years ago
scrawl
9b0e82a37f
Projectile models are now spawned (no movement or impact yet). Refactored trap activation to apply range types properly. Handle ContinuousVFX for magic effects (note they aren't stopped yet when the effect ends)
11 years ago
scrawl
0dab7031c0
Make sure effects are destroyed with the animation
11 years ago
scrawl
ffdb91bb21
Add particles for Cast + Hit. Not looking quite right yet.
11 years ago
Chris Robinson
5ac82a50b7
Remove unused function
12 years ago
Chris Robinson
0458fd5531
Remove unused/unneeded parameters
12 years ago
Chris Robinson
3555476dfd
Use Animation-derived objects for generic objects
12 years ago
Chris Robinson
a9dca21d05
Create the Animation SceneNode in the constructor
12 years ago
Chris Robinson
de95926e9f
Use controllers to animate lights in ObjectLists
12 years ago
Chris Robinson
e976bb16c5
Add a light for torches
12 years ago
Chris Robinson
59f1bc7542
Use time values for the aniamtion's start, stop, and loop points
...
This seems to be closer to the expected behavior. This more cleanly handles 0-
length animations, especially where the start marker comes after the stop
marker while still being on the same time key.
12 years ago
Chris Robinson
45302f9e25
Handle controllers in the NPC's bound object parts
12 years ago
Chris Robinson
a932a89e02
Specify the velocity-based animation speed multiplier when playing it
12 years ago
Chris Robinson
f296d13c20
Add a speed multiplier to the animation state
12 years ago
Chris Robinson
5ee889e8b6
Attach the camera to the Head node in first-person
12 years ago
Chris Robinson
2d7620e774
Rotate the neck when looking up and down in first-person
12 years ago
Chris Robinson
908f010c74
Reset the NPC object root when switching POV
...
When in first person, the skeleton in the .1st.nif file is used. In
particular, these have extra finger bones that are used by the first
person models.
12 years ago
scrawl
7a2d1cd8ce
Security skill
12 years ago
Chris Robinson
355f653614
Use AnimationAlloc instead of AnimationAllocatedObject
12 years ago
scrawl
96e3b3b7c2
Fix a compile error, OGRE_NEW only works for classes derived from AllocatedObject
12 years ago
Chris Robinson
a9928bb842
Split up the UpperBody group
...
Also recognize the [un]equip start and stop text keys.
12 years ago
Chris Robinson
70dc2f77ad
Move the priority enum to MWMechanics
12 years ago
Chris Robinson
7ba2508556
add a priority for death animations, and store it in the state list
12 years ago
Chris Robinson
bbb38c61cc
Fix queued animations
12 years ago
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.
12 years ago
Chris Robinson
4ea347ac52
Use shared pointers to store animation sources
...
This ensures references to the sources stay valid as long it the object
is, rather than becoming invalidated whenever one is added or removed.
12 years ago
Chris Robinson
6b8a687a79
Add methods to disable an animation
...
And rename WeaponState to WeaponType
12 years ago
Chris Robinson
6605aa7dec
Create three bone groups
...
This still won't work as expected. Currently there is only one priority level,
and only one animation state per priority level can be active at a time.
It's close, though.
12 years ago
Chris Robinson
abc676eedd
Allow specifying which bone groups to play an animation on
12 years ago
Chris Robinson
5a9c1e1245
Don't explicitly track the last position
12 years ago
Chris Robinson
7c3b014193
Figure out which animations to play based on priority
...
Bone group will also be taken into account later.
12 years ago
Chris Robinson
921f534980
Parameterize the number of bone groups
12 years ago
Chris Robinson
8a9b0eb5f7
Store the AnimSource in the animation state
12 years ago
Chris Robinson
58efce5008
Rename animation layers to animation states
12 years ago
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).
12 years ago
Chris Robinson
8e38dc410f
Allow loading multiple animation sources
...
Animation sources are treated differently from base objects. When given
"path\file.nif", base objects will look for "path\xfile.nif" and use that
if it exists (falling back to the original name if not found). Animation
sources will instead use "path\xfile.kf", ignoring it if the file doesn't
exist.
12 years ago
Chris Robinson
e85bc8b2cd
Only load one Nif for Animation objects
...
This breaks quite a bit, but it's needed for the transition to using the
.kf files.
12 years ago
gus
766d1efa84
Render weapon and shield. Only shield can be seen right now as weapons need to be drawed out.
12 years ago
Chris Robinson
9a2a32f2a5
Add a method to clear all Animation sources except the first
...
The first needs to remain, since that's where any mSkelBase entity comes from,
and where any retrieved nodes are from.
12 years ago
Chris Robinson
09fc50948b
Add methods to disable and get info for a layer
12 years ago
Chris Robinson
24f1eba902
Keep track of whether an animation supplies movement
...
Also handle it when it doesn't.
12 years ago
Chris Robinson
0817d59f23
Allow specifying where to start in an animation
12 years ago
Chris Robinson
333354fe62
Remove the character controller from the Animation class
12 years ago
Chris Robinson
b482d5be09
Add a method to check if a given layer is playing
12 years ago
Chris Robinson
c58dfbe921
Specify the loop count to Animation::play
12 years ago
Chris Robinson
7241267d5c
Make an AnimationValue for each animation layer
12 years ago
Chris Robinson
102b3bdef9
Update position by reference
12 years ago
Chris Robinson
c4806f01f8
Use a separate list of controllers to update
...
This should make it easier to figure out what controllers need to be updated
for various animation sources and layers.
12 years ago
Chris Robinson
e4c5aac966
Keep track of the animation layers a given object list is animating on
...
This only tracks layers they explicitly animate on. They may animate on other
layers as well, if nothing else is animating on them.
12 years ago
Chris Robinson
8782ae6976
Separate some Animation fields into a separate AnimLayer class
12 years ago
Chris Robinson
7279e015e9
Search the textkeys to check if an animation group exists
12 years ago
Chris Robinson
a2fc43c7df
Use reset to check that the animation exists and has the right markers
12 years ago
Chris Robinson
bb64efc18e
Improve looping behavior
12 years ago
Chris Robinson
cc70c6263b
Use the NodeTargetValue for the NonAccum root
12 years ago
Chris Robinson
9485a4aa6d
Look through the whole animation stack to find the "velocity"
12 years ago
Chris Robinson
2345b5e8b3
Avoid storing text keys for each animation
12 years ago
Chris Robinson
d7c9df16f8
Store the current animation group
12 years ago
Chris Robinson
835ff8eb1e
Avoid creating an AnimationValue per ObjectList
12 years ago
Chris Robinson
50bb92beb3
Use a method to set the visibility flags and render queue.
12 years ago
Chris Robinson
4ce98e9bd6
Store iterators for start and stop keys
12 years ago
Chris Robinson
1b1f9f7921
Allow multiple ObjectLists to be created for Animations.
...
addObjectList may not currently be called outside of the related constructor.
12 years ago
Chris Robinson
69084139aa
Use an array of objectlists, instead of one base objectlist and an array of 'animation sources'
12 years ago
Chris Robinson
f9dee25fd1
Store the base skeleton entity in MWRender::Animation
12 years ago
Chris Robinson
caff28e20a
Move NIFSkeletonLoader to a separate file
12 years ago
Chris Robinson
08d43fe217
Make the getHeadNode method more general
12 years ago
Chris Robinson
7baca30a1d
Only get the non-accum root's keyframe when updating positions
...
The actual animation pose is now handled by the controllers, based on the
current animation time.
12 years ago
Chris Robinson
261ea1fe5e
Implement a KeyframeController
12 years ago
Chris Robinson
2362e920f3
Use an unconnected object list for animation sources
...
We'll want the controllers, as the plan is to use their keyframe controllers
to animate the actual skeleton used for the meshes.
12 years ago
Chris Robinson
2db72ae607
Rename EntityList to ObjectList
12 years ago
Chris Robinson
0631b28646
Prepare for supporting controller objects
12 years ago
Nathan Jeffords
109dff2d29
renamed high level NIF files...
12 years ago
Chris Robinson
8e59ea4941
Use a separate method to handle animation events
12 years ago
Chris Robinson
d208422ca7
Add a method to update an Animation's Ptr object
12 years ago
Chris Robinson
e6da9dfae5
Specify the animation key to stop playing at
12 years ago
Chris Robinson
b8f5813609
Set all animation sources at once
12 years ago
Chris Robinson
9dee2a72cd
Use a separate method to calculate animation velocity
12 years ago
Chris Robinson
1399a06c76
Update animation looping when setting the same state
12 years ago
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.
12 years ago
Chris Robinson
8d6f017f17
Remove an unneeded Animation field
12 years ago
Chris Robinson
600fe06f00
Use a vector of skeletons to handle animation sources
12 years ago
Chris Robinson
23acf4b130
Don't break right away when the animation time remaining is 0
12 years ago
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.
12 years ago
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.
12 years ago
Chris Robinson
d6f923f274
Use a child scene node for the accumulation root
12 years ago
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.
12 years ago
Chris Robinson
5c3a7f7d52
Avoid handling animation states
...
We don't need them anymore
12 years ago
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.
12 years ago
Chris Robinson
99efe4e494
Remove an unnecessary class member
12 years ago
Chris Robinson
92d0c55f32
Add a flag to specify if an animation should be playing
12 years ago
Chris Robinson
05f8b8c283
Specify the text key to reset animations to
12 years ago
Chris Robinson
37fe1bd3f0
Handle looping in the Animation object
12 years ago
Chris Robinson
85ca1e993f
Properly check if an animation exists before playing it
12 years ago
Chris Robinson
0b68953f0d
Scale animation speed using the direction length
...
The direction length doesn't currently give a good speed, but it's something.
12 years ago
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.
12 years ago
Chris Robinson
9123f4f2af
Return the movement vector from runAnimation
12 years ago
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).
12 years ago
Chris Robinson
fc0f9e2159
The animation state tracks the animation time for us
12 years ago
Chris Robinson
7cce44290e
Handle the animation queue in mwmechanics
12 years ago
Chris Robinson
7ee389f3b2
Handle animation skipping in the character controller
12 years ago
Chris Robinson
852aa214cc
Store the available animation names in the character controller
12 years ago
Chris Robinson
3c32385e17
Avoid trying to animate things that don't have animations
12 years ago
Chris Robinson
0a2f92f679
Keep track of the current text key in the animation
12 years ago
Chris Robinson
f46587c383
Store an character controller in the animation
12 years ago
Chris Robinson
1e38e381a4
Use text keys for each animation
12 years ago
Chris Robinson
bb98542c5a
Build separate animations for each group
12 years ago
Chris Robinson
d8dbd5e206
Store text key iterators for the start and stop times
12 years ago
Chris Robinson
5f668976a8
Improve resetting the animation position
12 years ago
Chris Robinson
5b3a20ef69
Update the object position as the animation moves
12 years ago
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.
12 years ago
Chris Robinson
b96a979719
Store an MWWorld::Ptr with the Animation
12 years ago
Chris Robinson
efca5ded47
Clean up some header includes to reduce nesting
12 years ago
Chris Robinson
818a24cdd6
Hold on to the AnimationState being used for animating
12 years ago
Chris Robinson
6e84d4bcdd
Add a helper method to load entity objects
12 years ago
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
12 years ago
Chris Robinson
9f0c1eeb7b
Support playgroup mode 0
13 years ago
Chris Robinson
13ab2baef0
Use a struct to hold the current animation times and remaining loop count
13 years ago
Chris Robinson
20121f3b0a
Remove some unused stuff
13 years ago
Chris Robinson
9a7a629d0f
Add support for playing animation groups
13 years ago
Chris Robinson
f953d7f8c0
Store text keys from base NIF animations
13 years ago
Chris Robinson
77446a0d58
Fix skipAnim, only skip one animation update
13 years ago
Chris Robinson
81ce8dbe12
Combine animation handling into the base class
13 years ago
Chris Robinson
2db80a1504
Rename a couple methods to match their scripting counterparts
13 years ago
Chris Robinson
66860825cf
Remove some unused and unneeded bits from the Animation class
13 years ago
Chris Robinson
94f3e7a6c0
Store the entity list in the object
13 years ago
Chris Robinson
0a4a141f2e
Support multiple meshes for creatures
13 years ago
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
13 years ago
Marc Zinnschlag
0d3a7d482e
Merge remote branch 'modred11/master'
13 years ago
guidoj
0549e949ba
Mostly removal of unnecessary #include's and a little clean up
13 years ago
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
13 years ago
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.
13 years ago
Marc Zinnschlag
35f478071e
Issue #255 : deleted the old environment class and using the new one instead
13 years ago
Jason Hooks
ebab98a8a0
Restructuring things
13 years ago
Lukasz Gromanowski
5185a28b60
Issue #225 : Initialize all class members in constructor.
13 years ago
Alexander "Ace" Olofsson
e8eea03b4c
Fixed a few more non-virtual destructor warnings
13 years ago
Jason Hooks
39ff8d6a01
Compile error retry
13 years ago
Jason Hooks
9848b67174
Fixing errors
13 years ago