mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-18 11:19:10 +00:00
Add customizable finish message to avatar seeking
This commit is contained in:
@ -101,7 +101,7 @@ bool plAvTaskSeek::fLogProcess = false;
|
|||||||
|
|
||||||
void plAvTaskSeek::IInitDefaults()
|
void plAvTaskSeek::IInitDefaults()
|
||||||
{
|
{
|
||||||
fSeekObject = nil;
|
fSeekObject = nullptr;
|
||||||
fMovingTarget = false;
|
fMovingTarget = false;
|
||||||
fAlign = kAlignHandle;
|
fAlign = kAlignHandle;
|
||||||
fAnimName = "";
|
fAnimName = "";
|
||||||
@ -114,7 +114,8 @@ void plAvTaskSeek::IInitDefaults()
|
|||||||
fMaxSidleAngle = kDefaultMaxSidleAngle;
|
fMaxSidleAngle = kDefaultMaxSidleAngle;
|
||||||
fFlags = kSeekFlagForce3rdPersonOnStart;
|
fFlags = kSeekFlagForce3rdPersonOnStart;
|
||||||
fState = kSeekRunNormal;
|
fState = kSeekRunNormal;
|
||||||
fNotifyFinishedKey = nil;
|
fNotifyFinishedKey = nullptr;
|
||||||
|
fFinishMsg = nullptr;
|
||||||
}
|
}
|
||||||
// plAvTaskSeek ------------
|
// plAvTaskSeek ------------
|
||||||
// -------------
|
// -------------
|
||||||
@ -158,6 +159,7 @@ plAvTaskSeek::plAvTaskSeek(plAvSeekMsg *msg)
|
|||||||
fFlags &= ~kSeekFlagRotationOnly;
|
fFlags &= ~kSeekFlagRotationOnly;
|
||||||
|
|
||||||
fNotifyFinishedKey = msg->fFinishKey;
|
fNotifyFinishedKey = msg->fFinishKey;
|
||||||
|
fFinishMsg = msg->fFinishMsg;
|
||||||
}
|
}
|
||||||
|
|
||||||
// plAvTaskSeek ------------------------
|
// plAvTaskSeek ------------------------
|
||||||
@ -303,6 +305,9 @@ void plAvTaskSeek::Finish(plArmatureMod *avatar, plArmatureBrain *brain, double
|
|||||||
//inform controller we are done seeking
|
//inform controller we are done seeking
|
||||||
if (avatar->GetController())
|
if (avatar->GetController())
|
||||||
avatar->GetController()->SetSeek(false);
|
avatar->GetController()->SetSeek(false);
|
||||||
|
|
||||||
|
if (fFinishMsg)
|
||||||
|
fFinishMsg->Send();
|
||||||
}
|
}
|
||||||
|
|
||||||
void plAvTaskSeek::LeaveAge(plArmatureMod *avatar)
|
void plAvTaskSeek::LeaveAge(plArmatureMod *avatar)
|
||||||
|
@ -156,6 +156,7 @@ protected:
|
|||||||
plString fAnimName; // an (optional) anim to use to line up our target
|
plString fAnimName; // an (optional) anim to use to line up our target
|
||||||
// so you can say "seek to a place where your hand
|
// so you can say "seek to a place where your hand
|
||||||
// will be here after you play animation foo"
|
// will be here after you play animation foo"
|
||||||
|
plMessage* fFinishMsg;
|
||||||
|
|
||||||
hsPoint3 fPosition; // our current position
|
hsPoint3 fPosition; // our current position
|
||||||
hsQuat fRotation; // our current rotation
|
hsQuat fRotation; // our current rotation
|
||||||
|
@ -174,12 +174,13 @@ void plAvTaskMsg::Write(hsStream *stream, hsResMgr *mgr)
|
|||||||
// CTOR()
|
// CTOR()
|
||||||
plAvSeekMsg::plAvSeekMsg()
|
plAvSeekMsg::plAvSeekMsg()
|
||||||
: plAvTaskMsg(),
|
: plAvTaskMsg(),
|
||||||
fSeekPoint(nil),
|
fSeekPoint(nullptr),
|
||||||
fDuration(0),
|
fDuration(0),
|
||||||
fSmartSeek(true),
|
fSmartSeek(true),
|
||||||
fAlignType(kAlignHandle),
|
fAlignType(kAlignHandle),
|
||||||
fNoSeek(false),
|
fNoSeek(false),
|
||||||
fFlags(kSeekFlagForce3rdPersonOnStart)
|
fFlags(kSeekFlagForce3rdPersonOnStart),
|
||||||
|
fFinishMsg(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -198,7 +199,8 @@ plAvSeekMsg::plAvSeekMsg(const plKey& sender, const plKey& receiver,
|
|||||||
fAlignType(alignType),
|
fAlignType(alignType),
|
||||||
fNoSeek(noSeek),
|
fNoSeek(noSeek),
|
||||||
fFlags(flags),
|
fFlags(flags),
|
||||||
fFinishKey(finishKey)
|
fFinishKey(finishKey),
|
||||||
|
fFinishMsg(nullptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,6 +218,7 @@ public:
|
|||||||
plAvAlignment fAlignType;
|
plAvAlignment fAlignType;
|
||||||
uint8_t fFlags;
|
uint8_t fFlags;
|
||||||
plKey fFinishKey;
|
plKey fFinishKey;
|
||||||
|
plMessage* fFinishMsg;
|
||||||
};
|
};
|
||||||
|
|
||||||
class plAvTaskSeekDoneMsg : public plAvatarMsg
|
class plAvTaskSeekDoneMsg : public plAvatarMsg
|
||||||
|
Reference in New Issue
Block a user