Add LLMotionController* LLMotion::mMotionController

This is needed for synchronization: motions will have to start
(with a specific start time offset) from a point in the code where
only the motion object is available.

I added/used LLMotionController& in a previous commit, this was
now changed into a pointer. There is (obviously) not much reason
for that, but also no disadvantage: the diff relative to LLs code
doesn't get larger since the references where already added, too.

Conflicts:
	indra/llcharacter/llkeyframemotion.cpp
	indra/llcharacter/llkeyframemotion.h
This commit is contained in:
Aleric Inglewood
2013-12-21 18:46:19 +01:00
parent 61d365e957
commit 66aaa9cf80
25 changed files with 66 additions and 63 deletions

View File

@@ -49,7 +49,7 @@ S32 LLEditingMotion::sHandPosePriority = 3;
// LLEditingMotion() // LLEditingMotion()
// Class Constructor // Class Constructor
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
LLEditingMotion::LLEditingMotion(LLUUID const& id, LLMotionController& controller) : AIMaskedMotion(id, controller, ANIM_AGENT_EDITING) LLEditingMotion::LLEditingMotion(LLUUID const& id, LLMotionController* controller) : AIMaskedMotion(id, controller, ANIM_AGENT_EDITING)
{ {
mCharacter = NULL; mCharacter = NULL;

View File

@@ -53,7 +53,7 @@ class LLEditingMotion :
{ {
public: public:
// Constructor // Constructor
LLEditingMotion(LLUUID const& id, LLMotionController& controller); LLEditingMotion(LLUUID const& id, LLMotionController* controller);
// Destructor // Destructor
virtual ~LLEditingMotion(); virtual ~LLEditingMotion();
@@ -65,7 +65,7 @@ public:
// static constructor // static constructor
// all subclasses must implement such a function and register it // all subclasses must implement such a function and register it
static LLMotion* create(LLUUID const& id, LLMotionController& controller) { return new LLEditingMotion(id, controller); } static LLMotion* create(LLUUID const& id, LLMotionController* controller) { return new LLEditingMotion(id, controller); }
public: public:
//------------------------------------------------------------------------- //-------------------------------------------------------------------------

View File

@@ -61,7 +61,7 @@ const F32 HAND_MORPH_BLEND_TIME = 0.2f;
// LLHandMotion() // LLHandMotion()
// Class Constructor // Class Constructor
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
LLHandMotion::LLHandMotion(LLUUID const& id, LLMotionController& controller) : AIMaskedMotion(id, controller, ANIM_AGENT_HAND_MOTION) LLHandMotion::LLHandMotion(LLUUID const& id, LLMotionController* controller) : AIMaskedMotion(id, controller, ANIM_AGENT_HAND_MOTION)
{ {
mCharacter = NULL; mCharacter = NULL;
mLastTime = 0.f; mLastTime = 0.f;

View File

@@ -68,7 +68,7 @@ public:
} eHandPose; } eHandPose;
// Constructor // Constructor
LLHandMotion(LLUUID const& id, LLMotionController& controller); LLHandMotion(LLUUID const& id, LLMotionController* controller);
// Destructor // Destructor
virtual ~LLHandMotion(); virtual ~LLHandMotion();
@@ -80,7 +80,7 @@ public:
// static constructor // static constructor
// all subclasses must implement such a function and register it // all subclasses must implement such a function and register it
static LLMotion* create(LLUUID const& id, LLMotionController& controller) { return new LLHandMotion(id, controller); } static LLMotion* create(LLUUID const& id, LLMotionController* controller) { return new LLHandMotion(id, controller); }
public: public:
//------------------------------------------------------------------------- //-------------------------------------------------------------------------

View File

@@ -76,7 +76,7 @@ const F32 EYE_BLINK_TIME_DELTA = 0.005f; // time between one eye starting a blin
// LLHeadRotMotion() // LLHeadRotMotion()
// Class Constructor // Class Constructor
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
LLHeadRotMotion::LLHeadRotMotion(LLUUID const& id, LLMotionController& controller) : LLHeadRotMotion::LLHeadRotMotion(LLUUID const& id, LLMotionController* controller) :
AIMaskedMotion(id, controller, ANIM_AGENT_HEAD_ROT), AIMaskedMotion(id, controller, ANIM_AGENT_HEAD_ROT),
mCharacter(NULL), mCharacter(NULL),
mTorsoJoint(NULL), mTorsoJoint(NULL),
@@ -260,7 +260,7 @@ BOOL LLHeadRotMotion::onUpdate(F32 time, U8* joint_mask)
// LLEyeMotion() // LLEyeMotion()
// Class Constructor // Class Constructor
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
LLEyeMotion::LLEyeMotion(LLUUID const& id, LLMotionController& controller) : AIMaskedMotion(id, controller, ANIM_AGENT_EYE) LLEyeMotion::LLEyeMotion(LLUUID const& id, LLMotionController* controller) : AIMaskedMotion(id, controller, ANIM_AGENT_EYE)
{ {
mCharacter = NULL; mCharacter = NULL;
mEyeJitterTime = 0.f; mEyeJitterTime = 0.f;

View File

@@ -50,7 +50,7 @@ class LLHeadRotMotion :
{ {
public: public:
// Constructor // Constructor
LLHeadRotMotion(LLUUID const& id, LLMotionController& controller); LLHeadRotMotion(LLUUID const& id, LLMotionController* controller);
// Destructor // Destructor
virtual ~LLHeadRotMotion(); virtual ~LLHeadRotMotion();
@@ -62,7 +62,7 @@ public:
// static constructor // static constructor
// all subclasses must implement such a function and register it // all subclasses must implement such a function and register it
static LLMotion* create(LLUUID const& id, LLMotionController& controller) { return new LLHeadRotMotion(id, controller); } static LLMotion* create(LLUUID const& id, LLMotionController* controller) { return new LLHeadRotMotion(id, controller); }
public: public:
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
@@ -125,7 +125,7 @@ class LLEyeMotion :
{ {
public: public:
// Constructor // Constructor
LLEyeMotion(LLUUID const& id, LLMotionController& controller); LLEyeMotion(LLUUID const& id, LLMotionController* controller);
// Destructor // Destructor
virtual ~LLEyeMotion(); virtual ~LLEyeMotion();
@@ -137,7 +137,7 @@ public:
// static constructor // static constructor
// all subclasses must implement such a function and register it // all subclasses must implement such a function and register it
static LLMotion* create(LLUUID const& id, LLMotionController& controller) { return new LLEyeMotion(id, controller); } static LLMotion* create(LLUUID const& id, LLMotionController* controller) { return new LLEyeMotion(id, controller); }
public: public:
//------------------------------------------------------------------------- //-------------------------------------------------------------------------

View File

@@ -49,7 +49,7 @@
// LLKeyframeFallMotion() // LLKeyframeFallMotion()
// Class Constructor // Class Constructor
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
LLKeyframeFallMotion::LLKeyframeFallMotion(const LLUUID &id) : LLKeyframeMotion(id) LLKeyframeFallMotion::LLKeyframeFallMotion(LLUUID const& id, LLMotionController* controller) : LLKeyframeMotion(id, controller)
{ {
mVelocityZ = 0.f; mVelocityZ = 0.f;
mCharacter = NULL; mCharacter = NULL;

View File

@@ -47,7 +47,7 @@ class LLKeyframeFallMotion :
{ {
public: public:
// Constructor // Constructor
LLKeyframeFallMotion(const LLUUID &id); LLKeyframeFallMotion(LLUUID const& id, LLMotionController* controller);
// Destructor // Destructor
virtual ~LLKeyframeFallMotion(); virtual ~LLKeyframeFallMotion();
@@ -59,7 +59,7 @@ public:
// static constructor // static constructor
// all subclasses must implement such a function and register it // all subclasses must implement such a function and register it
static LLMotion* create(LLUUID const& id, LLMotionController&) { return new LLKeyframeFallMotion(id); } static LLMotion* create(LLUUID const& id, LLMotionController* controller) { return new LLKeyframeFallMotion(id, controller); }
public: public:
//------------------------------------------------------------------------- //-------------------------------------------------------------------------

View File

@@ -444,8 +444,8 @@ void LLKeyframeMotion::JointMotion::update(LLJointState* joint_state, F32 time,
// LLKeyframeMotion() // LLKeyframeMotion()
// Class Constructor // Class Constructor
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
LLKeyframeMotion::LLKeyframeMotion(const LLUUID &id) LLKeyframeMotion::LLKeyframeMotion(const LLUUID &id, LLMotionController* controller)
: LLMotion(id), : LLMotion(id, controller),
mPelvisp(NULL), mPelvisp(NULL),
mLastSkeletonSerialNum(0), mLastSkeletonSerialNum(0),
mLastUpdateTime(0.f), mLastUpdateTime(0.f),
@@ -468,9 +468,9 @@ LLKeyframeMotion::~LLKeyframeMotion()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// create() // create()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
LLMotion* LLKeyframeMotion::create(LLUUID const& id, LLMotionController&) LLMotion* LLKeyframeMotion::create(LLUUID const& id, LLMotionController* controller)
{ {
return new LLKeyframeMotion(id); return new LLKeyframeMotion(id, controller);
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@@ -177,7 +177,7 @@ class LLKeyframeMotion :
friend class LLKeyframeDataCache; friend class LLKeyframeDataCache;
public: public:
// Constructor // Constructor
LLKeyframeMotion(const LLUUID &id); LLKeyframeMotion(const LLUUID &id, LLMotionController* controller);
// Destructor // Destructor
virtual ~LLKeyframeMotion(); virtual ~LLKeyframeMotion();
@@ -194,7 +194,7 @@ public:
// static constructor // static constructor
// all subclasses must implement such a function and register it // all subclasses must implement such a function and register it
static LLMotion* create(LLUUID const& id, LLMotionController& controller); static LLMotion* create(LLUUID const& id, LLMotionController* controller);
public: public:
//------------------------------------------------------------------------- //-------------------------------------------------------------------------

View File

@@ -50,7 +50,7 @@ const F32 POSITION_THRESHOLD = 0.1f;
// LLKeyframeStandMotion() // LLKeyframeStandMotion()
// Class Constructor // Class Constructor
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
LLKeyframeStandMotion::LLKeyframeStandMotion(const LLUUID &id) : LLKeyframeMotion(id) LLKeyframeStandMotion::LLKeyframeStandMotion(LLUUID const& id, LLMotionController* controller) : LLKeyframeMotion(id, controller)
{ {
mFlipFeet = FALSE; mFlipFeet = FALSE;
mCharacter = NULL; mCharacter = NULL;

View File

@@ -48,7 +48,7 @@ class LLKeyframeStandMotion :
{ {
public: public:
// Constructor // Constructor
LLKeyframeStandMotion(const LLUUID &id); LLKeyframeStandMotion(LLUUID const& id, LLMotionController* controller);
// Destructor // Destructor
virtual ~LLKeyframeStandMotion(); virtual ~LLKeyframeStandMotion();
@@ -60,7 +60,7 @@ public:
// static constructor // static constructor
// all subclasses must implement such a function and register it // all subclasses must implement such a function and register it
static LLMotion* create(LLUUID const& id, LLMotionController&) { return new LLKeyframeStandMotion(id); } static LLMotion* create(LLUUID const& id, LLMotionController* controller) { return new LLKeyframeStandMotion(id, controller); }
public: public:
//------------------------------------------------------------------------- //-------------------------------------------------------------------------

View File

@@ -55,8 +55,8 @@ const F32 SPEED_ADJUST_TIME_CONSTANT = 0.1f; // time constant for speed adjustm
// LLKeyframeWalkMotion() // LLKeyframeWalkMotion()
// Class Constructor // Class Constructor
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
LLKeyframeWalkMotion::LLKeyframeWalkMotion(const LLUUID &id) LLKeyframeWalkMotion::LLKeyframeWalkMotion(LLUUID const& id, LLMotionController* controller)
: LLKeyframeMotion(id), : LLKeyframeMotion(id, controller),
mCharacter(NULL), mCharacter(NULL),
mCyclePhase(0.0f), mCyclePhase(0.0f),
mRealTimeLast(0.0f), mRealTimeLast(0.0f),
@@ -138,7 +138,7 @@ BOOL LLKeyframeWalkMotion::onUpdate(F32 time, U8* joint_mask)
// LLWalkAdjustMotion() // LLWalkAdjustMotion()
// Class Constructor // Class Constructor
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
LLWalkAdjustMotion::LLWalkAdjustMotion(LLUUID const& id, LLMotionController& controller) : LLWalkAdjustMotion::LLWalkAdjustMotion(LLUUID const& id, LLMotionController* controller) :
AIMaskedMotion(id, controller, ANIM_AGENT_WALK_ADJUST), AIMaskedMotion(id, controller, ANIM_AGENT_WALK_ADJUST),
mLastTime(0.f), mLastTime(0.f),
mAnimSpeed(0.f), mAnimSpeed(0.f),
@@ -331,7 +331,7 @@ void LLWalkAdjustMotion::onDeactivate()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// LLFlyAdjustMotion::LLFlyAdjustMotion() // LLFlyAdjustMotion::LLFlyAdjustMotion()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
LLFlyAdjustMotion::LLFlyAdjustMotion(LLUUID const& id, LLMotionController& controller) LLFlyAdjustMotion::LLFlyAdjustMotion(LLUUID const& id, LLMotionController* controller)
: AIMaskedMotion(id, controller, ANIM_AGENT_FLY_ADJUST), : AIMaskedMotion(id, controller, ANIM_AGENT_FLY_ADJUST),
mRoll(0.f) mRoll(0.f)
{ {

View File

@@ -52,7 +52,7 @@ class LLKeyframeWalkMotion :
friend class LLWalkAdjustMotion; friend class LLWalkAdjustMotion;
public: public:
// Constructor // Constructor
LLKeyframeWalkMotion(LLUUID const& id); LLKeyframeWalkMotion(LLUUID const& id, LLMotionController* controller);
// Destructor // Destructor
virtual ~LLKeyframeWalkMotion(); virtual ~LLKeyframeWalkMotion();
@@ -64,7 +64,7 @@ public:
// static constructor // static constructor
// all subclasses must implement such a function and register it // all subclasses must implement such a function and register it
static LLMotion* create(LLUUID const& id, LLMotionController&) { return new LLKeyframeWalkMotion(id); } static LLMotion* create(LLUUID const& id, LLMotionController* controller) { return new LLKeyframeWalkMotion(id, controller); }
public: public:
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
@@ -90,7 +90,7 @@ class LLWalkAdjustMotion : public AIMaskedMotion
{ {
public: public:
// Constructor // Constructor
LLWalkAdjustMotion(LLUUID const& id, LLMotionController& controller); LLWalkAdjustMotion(LLUUID const& id, LLMotionController* controller);
public: public:
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
@@ -99,7 +99,7 @@ public:
// static constructor // static constructor
// all subclasses must implement such a function and register it // all subclasses must implement such a function and register it
static LLMotion* create(LLUUID const& id, LLMotionController& controller) { return new LLWalkAdjustMotion(id, controller); } static LLMotion* create(LLUUID const& id, LLMotionController* controller) { return new LLWalkAdjustMotion(id, controller); }
public: public:
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
@@ -140,7 +140,7 @@ class LLFlyAdjustMotion : public AIMaskedMotion
{ {
public: public:
// Constructor // Constructor
LLFlyAdjustMotion(LLUUID const& id, LLMotionController& controller); LLFlyAdjustMotion(LLUUID const& id, LLMotionController* controller);
public: public:
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
@@ -149,7 +149,7 @@ public:
// static constructor // static constructor
// all subclasses must implement such a function and register it // all subclasses must implement such a function and register it
static LLMotion* create(LLUUID const& id, LLMotionController& controller) { return new LLFlyAdjustMotion(id, controller); } static LLMotion* create(LLUUID const& id, LLMotionController* controller) { return new LLFlyAdjustMotion(id, controller); }
public: public:
//------------------------------------------------------------------------- //-------------------------------------------------------------------------

View File

@@ -49,10 +49,11 @@
// LLMotion() // LLMotion()
// Class Constructor // Class Constructor
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
LLMotion::LLMotion( const LLUUID &id ) : LLMotion::LLMotion(LLUUID const& id, LLMotionController* controller) :
mStopped(TRUE), mStopped(TRUE),
mActive(FALSE), mActive(FALSE),
mID(id), mID(id),
mController(controller),
mActivationTimestamp(0.f), mActivationTimestamp(0.f),
mStopTimestamp(0.f), mStopTimestamp(0.f),
mSendStopTimestamp(F32_MAX), mSendStopTimestamp(F32_MAX),
@@ -181,13 +182,13 @@ BOOL LLMotion::canDeprecate()
BOOL AIMaskedMotion::onActivate() BOOL AIMaskedMotion::onActivate()
{ {
mController.activated(mMaskBit); mController->activated(mMaskBit);
return TRUE; return TRUE;
} }
void AIMaskedMotion::onDeactivate() void AIMaskedMotion::onDeactivate()
{ {
mController.deactivated(mMaskBit); mController->deactivated(mMaskBit);
} }
// End // End

View File

@@ -67,7 +67,7 @@ public:
}; };
// Constructor // Constructor
LLMotion(const LLUUID &id); LLMotion(LLUUID const& id, LLMotionController* controller);
// Destructor // Destructor
virtual ~LLMotion(); virtual ~LLMotion();
@@ -182,6 +182,9 @@ protected:
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
std::string mName; // instance name assigned by motion controller std::string mName; // instance name assigned by motion controller
LLUUID mID; LLUUID mID;
//<singu>
LLMotionController* mController;
//</singu>
F32 mActivationTimestamp; // time when motion was activated F32 mActivationTimestamp; // time when motion was activated
F32 mStopTimestamp; // time when motion was told to stop F32 mStopTimestamp; // time when motion was told to stop
@@ -200,9 +203,9 @@ protected:
class LLTestMotion : public LLMotion class LLTestMotion : public LLMotion
{ {
public: public:
LLTestMotion(const LLUUID &id) : LLMotion(id){} LLTestMotion(LLUUID const& id, LLMotionController* controller) : LLMotion(id, controller){}
~LLTestMotion() {} ~LLTestMotion() {}
static LLMotion* create(LLUUID const& id, LLMotionController&) { return new LLTestMotion(id); } static LLMotion* create(LLUUID const& id, LLMotionController* controller) { return new LLTestMotion(id, controller); }
BOOL getLoop() { return FALSE; } BOOL getLoop() { return FALSE; }
F32 getDuration() { return 0.0f; } F32 getDuration() { return 0.0f; }
F32 getEaseInDuration() { return 0.0f; } F32 getEaseInDuration() { return 0.0f; }
@@ -224,9 +227,9 @@ public:
class LLNullMotion : public LLMotion class LLNullMotion : public LLMotion
{ {
public: public:
LLNullMotion(const LLUUID &id) : LLMotion(id) {} LLNullMotion(LLUUID const& id, LLMotionController* controller) : LLMotion(id, controller) {}
~LLNullMotion() {} ~LLNullMotion() {}
static LLMotion* create(LLUUID const& id, LLMotionController&) { return new LLNullMotion(id); } static LLMotion* create(LLUUID const& id, LLMotionController* controller) { return new LLNullMotion(id, controller); }
// motions must specify whether or not they loop // motions must specify whether or not they loop
/*virtual*/ BOOL getLoop() { return TRUE; } /*virtual*/ BOOL getLoop() { return TRUE; }
@@ -292,11 +295,10 @@ U32 const ANIM_AGENT_WALK_ADJUST = 0x400;
class AIMaskedMotion : public LLMotion class AIMaskedMotion : public LLMotion
{ {
private: private:
LLMotionController& mController;
U32 mMaskBit; U32 mMaskBit;
public: public:
AIMaskedMotion(LLUUID const& id, LLMotionController& controller, U32 mask_bit) : LLMotion(id), mController(controller), mMaskBit(mask_bit) { } AIMaskedMotion(LLUUID const& id, LLMotionController* controller, U32 mask_bit) : LLMotion(id, controller), mMaskBit(mask_bit) { }
/*virtual*/ BOOL onActivate(); /*virtual*/ BOOL onActivate();
/*virtual*/ void onDeactivate(); /*virtual*/ void onDeactivate();

View File

@@ -97,7 +97,7 @@ void LLMotionRegistry::markBad( const LLUUID& id )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// createMotion() // createMotion()
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
LLMotion* LLMotionRegistry::createMotion(LLUUID const& id, LLMotionController& controller) LLMotion* LLMotionRegistry::createMotion(LLUUID const& id, LLMotionController* controller)
{ {
LLMotionConstructor constructor = get_if_there(mMotionTable, id, LLMotionConstructor(NULL)); LLMotionConstructor constructor = get_if_there(mMotionTable, id, LLMotionConstructor(NULL));
LLMotion* motion = NULL; LLMotion* motion = NULL;
@@ -359,7 +359,7 @@ LLMotion* LLMotionController::createMotion( const LLUUID &id )
if (!motion) if (!motion)
{ {
// look up constructor and create it // look up constructor and create it
motion = sRegistry.createMotion(id, *this); motion = sRegistry.createMotion(id, this);
if (!motion) if (!motion)
{ {
return NULL; return NULL;

View File

@@ -56,7 +56,7 @@ class LLMotionController;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// LLMotionRegistry // LLMotionRegistry
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
typedef LLMotion* (*LLMotionConstructor)(LLUUID const& id, LLMotionController&); typedef LLMotion* (*LLMotionConstructor)(LLUUID const& id, LLMotionController*);
class LLMotionRegistry class LLMotionRegistry
{ {
@@ -73,7 +73,7 @@ public:
// creates a new instance of a named motion // creates a new instance of a named motion
// returns NULL motion is not registered // returns NULL motion is not registered
LLMotion* createMotion(LLUUID const& id, LLMotionController& controller); LLMotion* createMotion(LLUUID const& id, LLMotionController* controller);
// initialization of motion failed, don't try to create this motion again // initialization of motion failed, don't try to create this motion again
void markBad( const LLUUID& id ); void markBad( const LLUUID& id );

View File

@@ -52,7 +52,7 @@ const F32 TORSO_ROT_FRACTION = 0.5f;
// LLTargetingMotion() // LLTargetingMotion()
// Class Constructor // Class Constructor
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
LLTargetingMotion::LLTargetingMotion(LLUUID const& id, LLMotionController& controller) : AIMaskedMotion(id, controller, ANIM_AGENT_TARGET) LLTargetingMotion::LLTargetingMotion(LLUUID const& id, LLMotionController* controller) : AIMaskedMotion(id, controller, ANIM_AGENT_TARGET)
{ {
mCharacter = NULL; mCharacter = NULL;
mName = "targeting"; mName = "targeting";

View File

@@ -52,7 +52,7 @@ class LLTargetingMotion :
{ {
public: public:
// Constructor // Constructor
LLTargetingMotion(LLUUID const& id, LLMotionController& controller); LLTargetingMotion(LLUUID const& id, LLMotionController* controller);
// Destructor // Destructor
virtual ~LLTargetingMotion(); virtual ~LLTargetingMotion();
@@ -64,7 +64,7 @@ public:
// static constructor // static constructor
// all subclasses must implement such a function and register it // all subclasses must implement such a function and register it
static LLMotion* create(LLUUID const& id, LLMotionController& controller) { return new LLTargetingMotion(id, controller); } static LLMotion* create(LLUUID const& id, LLMotionController* controller) { return new LLTargetingMotion(id, controller); }
public: public:
//------------------------------------------------------------------------- //-------------------------------------------------------------------------

View File

@@ -48,7 +48,7 @@
// LLEmote() // LLEmote()
// Class Constructor // Class Constructor
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
LLEmote::LLEmote(const LLUUID &id) : LLMotion(id) LLEmote::LLEmote(LLUUID const& id, LLMotionController* controller) : LLMotion(id, controller)
{ {
mCharacter = NULL; mCharacter = NULL;

View File

@@ -55,7 +55,7 @@ class LLEmote :
{ {
public: public:
// Constructor // Constructor
LLEmote(const LLUUID &id); LLEmote(LLUUID const& id, LLMotionController* controller);
// Destructor // Destructor
virtual ~LLEmote(); virtual ~LLEmote();
@@ -67,7 +67,7 @@ public:
// static constructor // static constructor
// all subclasses must implement such a function and register it // all subclasses must implement such a function and register it
static LLMotion* create(LLUUID const& id, LLMotionController&) { return new LLEmote(id); } static LLMotion* create(LLUUID const& id, LLMotionController* controller) { return new LLEmote(id, controller); }
public: public:
//------------------------------------------------------------------------- //-------------------------------------------------------------------------

View File

@@ -314,7 +314,7 @@ void LLPhysicsMotion::getString(std::ostringstream &oss)
} }
} }
LLPhysicsMotionController::LLPhysicsMotionController(LLUUID const& id, LLMotionController& controller) : LLPhysicsMotionController::LLPhysicsMotionController(LLUUID const& id, LLMotionController* controller) :
AIMaskedMotion(id, controller, ANIM_AGENT_PHYSICS_MOTION), AIMaskedMotion(id, controller, ANIM_AGENT_PHYSICS_MOTION),
mCharacter(NULL), mCharacter(NULL),
mIsDefault(true) mIsDefault(true)

View File

@@ -49,7 +49,7 @@ public:
std::string getString(); std::string getString();
// Constructor // Constructor
LLPhysicsMotionController(LLUUID const& id, LLMotionController& controller); LLPhysicsMotionController(LLUUID const& id, LLMotionController* controller);
// Destructor // Destructor
virtual ~LLPhysicsMotionController(); virtual ~LLPhysicsMotionController();
@@ -61,7 +61,7 @@ public:
// static constructor // static constructor
// all subclasses must implement such a function and register it // all subclasses must implement such a function and register it
static LLMotion* create(LLUUID const& id, LLMotionController& controller) { return new LLPhysicsMotionController(id, controller); } static LLMotion* create(LLUUID const& id, LLMotionController* controller) { return new LLPhysicsMotionController(id, controller); }
public: public:
//------------------------------------------------------------------------- //-------------------------------------------------------------------------

View File

@@ -347,7 +347,7 @@ class LLBodyNoiseMotion :
{ {
public: public:
// Constructor // Constructor
LLBodyNoiseMotion(LLUUID const& id, LLMotionController& controller) LLBodyNoiseMotion(LLUUID const& id, LLMotionController* controller)
: AIMaskedMotion(id, controller, ANIM_AGENT_BODY_NOISE) : AIMaskedMotion(id, controller, ANIM_AGENT_BODY_NOISE)
{ {
mName = "body_noise"; mName = "body_noise";
@@ -363,7 +363,7 @@ public:
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// static constructor // static constructor
// all subclasses must implement such a function and register it // all subclasses must implement such a function and register it
static LLMotion* create(LLUUID const& id, LLMotionController& controller) { return new LLBodyNoiseMotion(id, controller); } static LLMotion* create(LLUUID const& id, LLMotionController* controller) { return new LLBodyNoiseMotion(id, controller); }
public: public:
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
@@ -444,7 +444,7 @@ class LLBreatheMotionRot :
{ {
public: public:
// Constructor // Constructor
LLBreatheMotionRot(LLUUID const& id, LLMotionController& controller) : LLBreatheMotionRot(LLUUID const& id, LLMotionController* controller) :
AIMaskedMotion(id, controller, ANIM_AGENT_BREATHE_ROT), AIMaskedMotion(id, controller, ANIM_AGENT_BREATHE_ROT),
mBreatheRate(1.f), mBreatheRate(1.f),
mCharacter(NULL) mCharacter(NULL)
@@ -462,7 +462,7 @@ public:
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// static constructor // static constructor
// all subclasses must implement such a function and register it // all subclasses must implement such a function and register it
static LLMotion* create(LLUUID const& id, LLMotionController& controller) { return new LLBreatheMotionRot(id, controller); } static LLMotion* create(LLUUID const& id, LLMotionController* controller) { return new LLBreatheMotionRot(id, controller); }
public: public:
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
@@ -546,7 +546,7 @@ class LLPelvisFixMotion :
{ {
public: public:
// Constructor // Constructor
LLPelvisFixMotion(LLUUID const& id, LLMotionController& controller) LLPelvisFixMotion(LLUUID const& id, LLMotionController* controller)
: AIMaskedMotion(id, controller, ANIM_AGENT_PELVIS_FIX), mCharacter(NULL) : AIMaskedMotion(id, controller, ANIM_AGENT_PELVIS_FIX), mCharacter(NULL)
{ {
mName = "pelvis_fix"; mName = "pelvis_fix";
@@ -563,7 +563,7 @@ public:
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// static constructor // static constructor
// all subclasses must implement such a function and register it // all subclasses must implement such a function and register it
static LLMotion* create(LLUUID const& id, LLMotionController& controller) { return new LLPelvisFixMotion(id, controller); } static LLMotion* create(LLUUID const& id, LLMotionController* controller) { return new LLPelvisFixMotion(id, controller); }
public: public:
//------------------------------------------------------------------------- //-------------------------------------------------------------------------