void Creature::playHeadAnimation(const Common::UString &anim, bool restart, float length, float speed) { if (!_model) return; Graphics::Aurora::AnimationChannel *headChannel = 0; if (_modelType == "B" || _modelType == "P") { Graphics::Aurora::Model *head = _model->getAttachedModel("headhook"); if (head) headChannel = head->getAnimationChannel(Graphics::Aurora::kAnimationChannelAll); } else headChannel = _model->getAnimationChannel(Graphics::Aurora::kAnimationChannelHead); if (headChannel) headChannel->playAnimation(anim, restart, length, speed); }
void Creature::playDefaultHeadAnimation() { if (!_model) return; Graphics::Aurora::AnimationChannel *headChannel = 0; if (_modelType == "B" || _modelType == "P") { Graphics::Aurora::Model *head = _model->getAttachedModel("headhook"); if (head) headChannel = head->getAnimationChannel(Graphics::Aurora::kAnimationChannelAll); } else headChannel = _model->getAnimationChannel(Graphics::Aurora::kAnimationChannelHead); if (headChannel) headChannel->playDefaultAnimation(); }