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