Split up the UpperBody group

Also recognize the [un]equip start and stop text keys.
actorid
Chris Robinson 12 years ago
parent 70dc2f77ad
commit a9928bb842

@ -147,8 +147,9 @@ size_t Animation::detectAnimGroup(const Ogre::Node *node)
{
static const char sGroupRoots[sNumGroups][32] = {
"", /* Lower body / character root */
"Bip01 Spine1", /* Upper body */
"Bip01 Spine1", /* Torso */
"Bip01 L Clavicle", /* Left arm */
"Bip01 R Clavicle", /* Right arm */
};
while(node)
@ -474,6 +475,11 @@ bool Animation::handleTextKey(AnimState &state, const std::string &groupname, co
return true;
}
/* Nothing to do for these */
if(evt.compare(off, len, "equip start") == 0 || evt.compare(off, len, "equip stop") == 0 ||
evt.compare(off, len, "unequip start") == 0 || evt.compare(off, len, "unequip stop") == 0)
return true;
std::cerr<< "Unhandled animation textkey: "<<evt <<std::endl;
return true;
}

@ -17,14 +17,19 @@ class Animation
public:
enum Group {
Group_LowerBody = 1<<0,
Group_UpperBody = 1<<1,
Group_Torso = 1<<1,
Group_LeftArm = 1<<2,
Group_RightArm = 1<<3,
Group_UpperBody = Group_Torso | Group_LeftArm | Group_RightArm,
Group_All = Group_LowerBody | Group_UpperBody | Group_LeftArm
Group_All = Group_LowerBody | Group_UpperBody
};
protected:
static const size_t sNumGroups = 3;
/* This is the number of *discrete* groups. */
static const size_t sNumGroups = 4;
class AnimationValue : public Ogre::ControllerValue<Ogre::Real>
{

Loading…
Cancel
Save