mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-21 12:53:51 +00:00
Remove the character controller from the Animation class
This commit is contained in:
parent
b80891099e
commit
333354fe62
4 changed files with 4 additions and 31 deletions
|
@ -108,8 +108,6 @@ CharacterController::CharacterController(const MWWorld::Ptr &ptr, MWRender::Anim
|
|||
if(!mAnimation)
|
||||
return;
|
||||
|
||||
mAnimation->setController(this);
|
||||
|
||||
getStateInfo(mState, &mCurrentGroup);
|
||||
if(MWWorld::Class::get(mPtr).isActor())
|
||||
{
|
||||
|
@ -126,17 +124,6 @@ CharacterController::CharacterController(const MWWorld::Ptr &ptr, MWRender::Anim
|
|||
mAnimation->play(mCurrentGroup, "start", "stop", loop ? (~(size_t)0) : 0);
|
||||
}
|
||||
|
||||
CharacterController::CharacterController(const CharacterController &rhs)
|
||||
: mPtr(rhs.mPtr), mAnimation(rhs.mAnimation), mAnimQueue(rhs.mAnimQueue)
|
||||
, mCurrentGroup(rhs.mCurrentGroup), mState(rhs.mState)
|
||||
, mSkipAnim(rhs.mSkipAnim)
|
||||
{
|
||||
if(!mAnimation)
|
||||
return;
|
||||
/* We've been copied. Update the animation with the new controller. */
|
||||
mAnimation->setController(this);
|
||||
}
|
||||
|
||||
CharacterController::~CharacterController()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -81,7 +81,6 @@ class CharacterController
|
|||
|
||||
public:
|
||||
CharacterController(const MWWorld::Ptr &ptr, MWRender::Animation *anim, CharacterState state, bool loop);
|
||||
CharacterController(const CharacterController &rhs);
|
||||
virtual ~CharacterController();
|
||||
|
||||
void updatePtr(const MWWorld::Ptr &ptr);
|
||||
|
|
|
@ -59,14 +59,13 @@ void Animation::destroyObjectList(Ogre::SceneManager *sceneMgr, NifOgre::ObjectL
|
|||
|
||||
Animation::Animation(const MWWorld::Ptr &ptr)
|
||||
: mPtr(ptr)
|
||||
, mController(NULL)
|
||||
, mInsert(NULL)
|
||||
, mSkelBase(NULL)
|
||||
, mAccumRoot(NULL)
|
||||
, mNonAccumRoot(NULL)
|
||||
, mNonAccumCtrl(NULL)
|
||||
, mAccumulate(0.0f)
|
||||
, mLastPosition(0.0f)
|
||||
, mNonAccumCtrl(NULL)
|
||||
, mAnimVelocity(0.0f)
|
||||
, mAnimSpeedMult(1.0f)
|
||||
{
|
||||
|
@ -299,12 +298,6 @@ bool Animation::hasAnimation(const std::string &anim)
|
|||
}
|
||||
|
||||
|
||||
void Animation::setController(MWMechanics::CharacterController *controller)
|
||||
{
|
||||
mController = controller;
|
||||
}
|
||||
|
||||
|
||||
void Animation::setAccumulation(const Ogre::Vector3 &accum)
|
||||
{
|
||||
mAccumulate = accum;
|
||||
|
|
|
@ -8,10 +8,6 @@
|
|||
|
||||
#include "../mwworld/ptr.hpp"
|
||||
|
||||
namespace MWMechanics
|
||||
{
|
||||
class CharacterController;
|
||||
}
|
||||
|
||||
namespace MWRender
|
||||
{
|
||||
|
@ -61,20 +57,20 @@ protected:
|
|||
};
|
||||
|
||||
MWWorld::Ptr mPtr;
|
||||
MWMechanics::CharacterController *mController;
|
||||
|
||||
Ogre::SceneNode *mInsert;
|
||||
Ogre::Entity *mSkelBase;
|
||||
std::vector<ObjectInfo> mObjects;
|
||||
Ogre::Node *mAccumRoot;
|
||||
Ogre::Bone *mNonAccumRoot;
|
||||
NifOgre::NodeTargetValue<Ogre::Real> *mNonAccumCtrl;
|
||||
Ogre::Vector3 mAccumulate;
|
||||
Ogre::Vector3 mLastPosition;
|
||||
|
||||
NifOgre::NodeTargetValue<Ogre::Real> *mNonAccumCtrl;
|
||||
std::vector<Ogre::Controller<Ogre::Real> > mActiveCtrls;
|
||||
|
||||
float mAnimVelocity;
|
||||
float mAnimSpeedMult;
|
||||
std::vector<Ogre::Controller<Ogre::Real> > mActiveCtrls;
|
||||
|
||||
static const size_t sMaxLayers = 1;
|
||||
AnimLayer mLayer[sMaxLayers];
|
||||
|
@ -116,8 +112,6 @@ public:
|
|||
Animation(const MWWorld::Ptr &ptr);
|
||||
virtual ~Animation();
|
||||
|
||||
void setController(MWMechanics::CharacterController *controller);
|
||||
|
||||
void updatePtr(const MWWorld::Ptr &ptr);
|
||||
|
||||
bool hasAnimation(const std::string &anim);
|
||||
|
|
Loading…
Reference in a new issue