mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 10:52:46 +00:00
Get rid of clang warnings in plAvatar.
This commit is contained in:
@ -614,10 +614,6 @@ void plAGMasterMod::DumpCurrentAnims(const char *header)
|
||||
// receive trigger messages
|
||||
bool plAGMasterMod::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plAnimCmdMsg* cmdMsg;
|
||||
plAGCmdMsg* agMsg;
|
||||
int i;
|
||||
|
||||
plSDLNotificationMsg* nMsg = plSDLNotificationMsg::ConvertNoRef(msg);
|
||||
if (nMsg)
|
||||
{
|
||||
@ -626,7 +622,8 @@ bool plAGMasterMod::MsgReceive(plMessage* msg)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (cmdMsg = plAnimCmdMsg::ConvertNoRef(msg))
|
||||
plAnimCmdMsg* cmdMsg = plAnimCmdMsg::ConvertNoRef(msg);
|
||||
if (cmdMsg)
|
||||
{
|
||||
plString targetName = cmdMsg->GetAnimName();
|
||||
|
||||
@ -638,7 +635,7 @@ bool plAGMasterMod::MsgReceive(plMessage* msg)
|
||||
{
|
||||
if (cmdMsg->CmdChangesAnimTime())
|
||||
{
|
||||
for (i = 0; i < GetNumAnimations(); i++)
|
||||
for (int i = 0; i < GetNumAnimations(); i++)
|
||||
{
|
||||
plAGAnimInstance *currInst = GetAnimInstance(i);
|
||||
if (currInst != inst && currInst->GetAnimation()->SharesPinsWith(inst->GetAnimation()))
|
||||
@ -653,7 +650,8 @@ bool plAGMasterMod::MsgReceive(plMessage* msg)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (agMsg = plAGCmdMsg::ConvertNoRef(msg))
|
||||
plAGCmdMsg* agMsg = plAGCmdMsg::ConvertNoRef(msg);
|
||||
if (agMsg)
|
||||
{
|
||||
if (agMsg->Cmd(plAGCmdMsg::kSetAnimTime))
|
||||
{
|
||||
@ -678,7 +676,7 @@ bool plAGMasterMod::MsgReceive(plMessage* msg)
|
||||
}
|
||||
|
||||
plAGInstanceCallbackMsg *agicMsg = plAGInstanceCallbackMsg::ConvertNoRef(msg);
|
||||
if (agicMsg != nil)
|
||||
if (agicMsg)
|
||||
{
|
||||
if (agicMsg->fEvent == kStart)
|
||||
{
|
||||
@ -697,16 +695,16 @@ bool plAGMasterMod::MsgReceive(plMessage* msg)
|
||||
}
|
||||
|
||||
plAGDetachCallbackMsg *detachMsg = plAGDetachCallbackMsg::ConvertNoRef(msg);
|
||||
if (detachMsg != nil)
|
||||
if (detachMsg)
|
||||
{
|
||||
DetachAnimation(detachMsg->GetAnimName());
|
||||
}
|
||||
|
||||
plGenRefMsg *genRefMsg;
|
||||
if (genRefMsg = plGenRefMsg::ConvertNoRef(msg))
|
||||
plGenRefMsg *genRefMsg = plGenRefMsg::ConvertNoRef(msg);
|
||||
if (genRefMsg)
|
||||
{
|
||||
plAGAnim *anim;
|
||||
if (anim = plAGAnim::ConvertNoRef(genRefMsg->GetRef()))
|
||||
plAGAnim *anim = plAGAnim::ConvertNoRef(genRefMsg->GetRef());
|
||||
if (anim)
|
||||
{
|
||||
if (genRefMsg->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest))
|
||||
{
|
||||
@ -733,8 +731,9 @@ bool plAGMasterMod::MsgReceive(plMessage* msg)
|
||||
|
||||
return true;
|
||||
}
|
||||
plAGModifier *agmod;
|
||||
if (agmod = plAGModifier::ConvertNoRef(genRefMsg->GetRef()))
|
||||
|
||||
plAGModifier *agmod = plAGModifier::ConvertNoRef(genRefMsg->GetRef());
|
||||
if (agmod)
|
||||
{
|
||||
if (genRefMsg->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest))
|
||||
fChannelMods[agmod->GetChannelName()] = agmod;
|
||||
@ -743,8 +742,9 @@ bool plAGMasterMod::MsgReceive(plMessage* msg)
|
||||
|
||||
return true;
|
||||
}
|
||||
plMsgForwarder *msgfwd;
|
||||
if (msgfwd = plMsgForwarder::ConvertNoRef(genRefMsg->GetRef()))
|
||||
|
||||
plMsgForwarder *msgfwd = plMsgForwarder::ConvertNoRef(genRefMsg->GetRef());
|
||||
if (msgfwd)
|
||||
{
|
||||
if (genRefMsg->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest))
|
||||
fMsgForwarder = msgfwd;
|
||||
@ -754,8 +754,9 @@ bool plAGMasterMod::MsgReceive(plMessage* msg)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
plRefMsg* refMsg = plRefMsg::ConvertNoRef(msg);
|
||||
if( refMsg )
|
||||
if (refMsg)
|
||||
{
|
||||
if( refMsg->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest|plRefMsg::kOnReplace) )
|
||||
AddTarget(plSceneObject::ConvertNoRef(refMsg->GetRef()));
|
||||
|
@ -2380,7 +2380,7 @@ bool plArmatureMod::FindMatchingGenericBrain(const char *names[], int count)
|
||||
return false;
|
||||
}
|
||||
|
||||
plString plArmatureMod::MakeAnimationName(const char *baseName) const
|
||||
plString plArmatureMod::MakeAnimationName(const plString& baseName) const
|
||||
{
|
||||
return fAnimationPrefix + baseName;
|
||||
}
|
||||
@ -2395,7 +2395,7 @@ void plArmatureMod::SetRootName(const plString &name)
|
||||
fRootName = name;
|
||||
}
|
||||
|
||||
plAGAnim *plArmatureMod::FindCustomAnim(const char *baseName) const
|
||||
plAGAnim *plArmatureMod::FindCustomAnim(const plString& baseName) const
|
||||
{
|
||||
plString customName = MakeAnimationName(baseName);
|
||||
plAGAnim *result = plAGAnim::FindAnim(customName);
|
||||
|
@ -226,7 +226,7 @@ public:
|
||||
virtual const plSceneObject *FindBone(uint32_t id) const; // use an id from an appropriate taxonomy, such as plAvBrainHuman::BoneID
|
||||
virtual void AddBoneMapping(uint32_t id, const plSceneObject *bone);
|
||||
plAGModifier *GetRootAGMod();
|
||||
plAGAnim *FindCustomAnim(const char *baseName) const;
|
||||
plAGAnim *FindCustomAnim(const plString& baseName) const;
|
||||
|
||||
virtual void Spawn(double timeNow);
|
||||
virtual void SpawnAt(int which, double timeNow);
|
||||
@ -305,7 +305,7 @@ public:
|
||||
int GetBodyType(int type) { return fBodyType; }
|
||||
int GetCurrentGenericType();
|
||||
bool FindMatchingGenericBrain(const char *names[], int count);
|
||||
plString MakeAnimationName(const char * baseName) const;
|
||||
plString MakeAnimationName(const plString& baseName) const;
|
||||
plString GetRootName();
|
||||
void SetRootName(const plString &name);
|
||||
|
||||
|
@ -244,18 +244,19 @@ bool plAvBrainClimb::Apply(double time, float elapsed)
|
||||
// MSGRECEIVE
|
||||
bool plAvBrainClimb::MsgReceive(plMessage *msg)
|
||||
{
|
||||
plClimbMsg *climbMsg;
|
||||
plLOSHitMsg *losMsg;
|
||||
|
||||
if(climbMsg = plClimbMsg::ConvertNoRef(msg))
|
||||
plClimbMsg* climbMsg = plClimbMsg::ConvertNoRef(msg);
|
||||
if (climbMsg)
|
||||
{
|
||||
return IHandleClimbMsg(climbMsg);
|
||||
} else if(losMsg = plLOSHitMsg::ConvertNoRef(msg))
|
||||
}
|
||||
|
||||
plLOSHitMsg *losMsg = plLOSHitMsg::ConvertNoRef(msg);
|
||||
if (losMsg)
|
||||
{
|
||||
return IHandleLOSMsg(losMsg);
|
||||
} else {
|
||||
return plArmatureBrain::MsgReceive(msg);
|
||||
}
|
||||
|
||||
return plArmatureBrain::MsgReceive(msg);
|
||||
}
|
||||
|
||||
// IHANDLECLIMBMSG
|
||||
@ -296,6 +297,8 @@ bool plAvBrainClimb::IHandleClimbMsg(plClimbMsg *msg)
|
||||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -1047,6 +1050,6 @@ const char *plAvBrainClimb::ModeStr(Mode mode)
|
||||
case kFallingOff:
|
||||
return "FallingOff";
|
||||
default:
|
||||
return "WTF???!!!";
|
||||
return "WTF?!";
|
||||
}
|
||||
}
|
||||
|
@ -259,6 +259,8 @@ bool plAvBrainGeneric::Apply(double time, float elapsed)
|
||||
case kNormal:
|
||||
result = IProcessNormal(time, elapsed);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
plArmatureBrain::Apply(time, elapsed);
|
||||
return result;
|
||||
@ -653,15 +655,15 @@ bool plAvBrainGeneric::IHandleGenBrainMsg(const plAvBrainGenericMsg *msg)
|
||||
}
|
||||
}
|
||||
break;
|
||||
#ifdef DEBUG_MULTISTAGE
|
||||
default:
|
||||
#ifdef DEBUG_MULTISTAGE
|
||||
{
|
||||
char sbuf[256];
|
||||
sprintf(sbuf,"GenericMsg - Unknown command %d ",msg->fType);
|
||||
plAvatarMgr::GetInstance()->GetLog()->AddLine(sbuf);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -731,24 +733,21 @@ bool plAvBrainGeneric::IBrainIsCompatible(plAvBrainGeneric *otherBrain)
|
||||
{
|
||||
case plAGAnim::kBodyUnknown:
|
||||
return false;
|
||||
break;
|
||||
case plAGAnim::kBodyFull:
|
||||
return false;
|
||||
break;
|
||||
case plAGAnim::kBodyUpper:
|
||||
if(otherUsage == plAGAnim::kBodyLower)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
break;
|
||||
case plAGAnim::kBodyLower:
|
||||
if(otherUsage == plAGAnim::kBodyUpper)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -389,6 +389,8 @@ bool plAvBrainHuman::IHandleControlMsg(plControlEventMsg* msg)
|
||||
IChatOn();
|
||||
return true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch(moveCode)
|
||||
@ -398,6 +400,8 @@ bool plAvBrainHuman::IHandleControlMsg(plControlEventMsg* msg)
|
||||
IChatOff();
|
||||
return true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@ -515,6 +519,8 @@ bool plAvBrainHuman::IHandleClimbMsg(plClimbMsg *msg)
|
||||
case plClimbMsg::kRight:
|
||||
startMode = plAvBrainClimb::kMountingRight;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
plAvBrainClimb *brain = new plAvBrainClimb(startMode);
|
||||
plAvTaskBrain *brainTask = new plAvTaskBrain(brain);
|
||||
|
@ -586,6 +586,8 @@ bool plAvBrainSwim::IHandleControlMsg(plControlEventMsg* msg)
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@ -611,6 +613,8 @@ void plAvBrainSwim::DumpToDebugDisplay(int &x, int &y, int lineHeight, char *str
|
||||
case kAbort:
|
||||
sprintf(strBuf, "Mode: Abort (you should never see this)");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
debugTxt.DrawString(x, y, strBuf);
|
||||
y += lineHeight;
|
||||
|
@ -255,7 +255,7 @@ void plAvLadderMod::EmitCommand(const plKey receiver)
|
||||
plSceneObject *seekObj = GetTarget();
|
||||
plKey seekKey = seekObj->GetKey(); // this modifier's target is the seek object
|
||||
|
||||
char *mountName, *dismountName, *traverseName;
|
||||
const char *mountName, *dismountName, *traverseName;
|
||||
|
||||
if(fGoingUp)
|
||||
{
|
||||
|
@ -104,7 +104,7 @@ void plAvTaskSeek::IInitDefaults()
|
||||
fSeekObject = nil;
|
||||
fMovingTarget = false;
|
||||
fAlign = kAlignHandle;
|
||||
fAnimName = nil;
|
||||
fAnimName = "";
|
||||
fPosGoalHit = false;
|
||||
fRotGoalHit = false;
|
||||
fStillPositioning = true;
|
||||
@ -171,7 +171,7 @@ plAvTaskSeek::plAvTaskSeek(plKey target)
|
||||
|
||||
// plAvTaskSeek -------------------------------------------------------------------------------------------
|
||||
// -------------
|
||||
plAvTaskSeek::plAvTaskSeek(plKey target, plAvAlignment align, const char *animName, bool moving)
|
||||
plAvTaskSeek::plAvTaskSeek(plKey target, plAvAlignment align, const plString& animName, bool moving)
|
||||
{
|
||||
IInitDefaults();
|
||||
|
||||
|
@ -75,7 +75,7 @@ public:
|
||||
plAvTaskSeek();
|
||||
plAvTaskSeek(plKey target);
|
||||
plAvTaskSeek(plAvSeekMsg *msg);
|
||||
plAvTaskSeek(plKey target, plAvAlignment align, const char *animName, bool moving);
|
||||
plAvTaskSeek(plKey target, plAvAlignment align, const plString& animName, bool moving);
|
||||
|
||||
void SetTarget(plKey target);
|
||||
void SetTarget(hsPoint3 &pos, hsPoint3 &lookAt);
|
||||
@ -153,7 +153,7 @@ protected:
|
||||
// for example, you can say "find a good start point so that you can play this animation
|
||||
// and have your handle wind up here" i.e: aligntype = "kAlignHandleAnimEnd"
|
||||
plAvAlignment fAlign; // how to line up with the seek point
|
||||
const char * 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
|
||||
// will be here after you play animation foo"
|
||||
|
||||
@ -187,4 +187,4 @@ protected:
|
||||
plKey fNotifyFinishedKey; // Send a message to this key when we're done.
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -632,10 +632,11 @@ void plClothingOutfit::IAddItem(plClothingItem *item)
|
||||
|
||||
for (i = 0; i < num; i++)
|
||||
{
|
||||
if (soundEffect = plArmatureEffectFootSound::ConvertNoRef(mgr->GetEffect(i)))
|
||||
soundEffect = plArmatureEffectFootSound::ConvertNoRef(mgr->GetEffect(i));
|
||||
if (soundEffect)
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (soundEffect)
|
||||
{
|
||||
if (!strcmp(item->fName, "03_MLFoot04_01") || !strcmp(item->fName, "03_FLFoot04_01"))
|
||||
@ -1533,7 +1534,7 @@ plClothingLayout *plClothingMgr::GetLayout(char *name)
|
||||
return nil;
|
||||
}
|
||||
|
||||
plClothingElement *plClothingMgr::FindElementByName(char *name)
|
||||
plClothingElement *plClothingMgr::FindElementByName(const char *name)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < fElements.GetCount(); i++)
|
||||
|
@ -259,7 +259,7 @@ public:
|
||||
GETINTERFACE_ANY( plClothingMgr, hsKeyedObject );
|
||||
|
||||
plClothingLayout *GetLayout(char *name);
|
||||
plClothingElement *FindElementByName(char *name);
|
||||
plClothingElement *FindElementByName(const char *name);
|
||||
|
||||
|
||||
// Functions that just relate to the clothing you have permission to wear (closet)
|
||||
|
@ -169,7 +169,7 @@ plAvSeekTask::plAvSeekTask()
|
||||
}
|
||||
|
||||
// CTOR target, align, animName
|
||||
plAvSeekTask::plAvSeekTask(plKey target, plAvAlignment align, const char *animName)
|
||||
plAvSeekTask::plAvSeekTask(plKey target, plAvAlignment align, const plString& animName)
|
||||
: fAlign(align),
|
||||
fDuration(0.25),
|
||||
fTarget(target),
|
||||
@ -178,19 +178,17 @@ plAvSeekTask::plAvSeekTask(plKey target, plAvAlignment align, const char *animNa
|
||||
fPhysicalAtStart(false),
|
||||
fCleanup(false)
|
||||
{
|
||||
fAnimName = hsStrcpy(animName);
|
||||
}
|
||||
|
||||
// CTOR target
|
||||
plAvSeekTask::plAvSeekTask(plKey target)
|
||||
: fAnimName(nil),
|
||||
fAlign(kAlignHandle),
|
||||
fDuration(0.25),
|
||||
fTarget(target),
|
||||
fAnimInstance(nil),
|
||||
fTargetTime(0),
|
||||
fPhysicalAtStart(false),
|
||||
fCleanup(false)
|
||||
: fAlign(kAlignHandle),
|
||||
fDuration(0.25),
|
||||
fTarget(target),
|
||||
fAnimInstance(nil),
|
||||
fTargetTime(0),
|
||||
fPhysicalAtStart(false),
|
||||
fCleanup(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@ public:
|
||||
plAvSeekTask(plKey target);
|
||||
/** Constructor form for calculated seek points: uses aligment type and (optionally) animation
|
||||
The animation is used if we're trying to align some future pose with a seek target. */
|
||||
plAvSeekTask(plKey target, plAvAlignment alignType, const char *animName);
|
||||
plAvSeekTask(plKey target, plAvAlignment alignType, const plString& animName);
|
||||
|
||||
// task protocol
|
||||
virtual bool Start(plArmatureMod *avatar, plArmatureBrain *brain, double time, float elapsed);
|
||||
@ -146,7 +146,7 @@ public:
|
||||
// *** implement reader and writer if needed for network propagation
|
||||
protected:
|
||||
// -- specification members --
|
||||
char * fAnimName; // the animation we're using, if any;
|
||||
plString fAnimName; // the animation we're using, if any;
|
||||
plAvAlignment fAlign; // how to line up with the seek point
|
||||
double fDuration; // the time we want the task to take
|
||||
plKey fTarget; // the thing we're seeking towards
|
||||
|
@ -127,7 +127,7 @@ public:
|
||||
class plClothingLayout
|
||||
{
|
||||
public:
|
||||
plClothingLayout(char *name, uint32_t origWidth) { fName = hsStrcpy(name); fOrigWidth = origWidth; }
|
||||
plClothingLayout(const char *name, uint32_t origWidth) { fName = hsStrcpy(name); fOrigWidth = origWidth; }
|
||||
~plClothingLayout() { delete [] fName; }
|
||||
|
||||
char *fName;
|
||||
|
@ -227,7 +227,8 @@ bool plCoopCoordinator::MsgReceive(plMessage *msg)
|
||||
fGuestLinked = true;
|
||||
IAdvanceParticipant(true); // advance the host
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -120,7 +120,6 @@ void plMultistageBehMod::IDeleteStageVec()
|
||||
|
||||
bool plMultistageBehMod::MsgReceive(plMessage* msg)
|
||||
{
|
||||
plMultistageModMsg *multiMsg = nil;
|
||||
plNotifyMsg* notifyMsg = plNotifyMsg::ConvertNoRef(msg);
|
||||
if (notifyMsg)
|
||||
{
|
||||
@ -187,8 +186,10 @@ bool plMultistageBehMod::MsgReceive(plMessage* msg)
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (multiMsg = plMultistageModMsg::ConvertNoRef(msg))
|
||||
}
|
||||
|
||||
plMultistageModMsg *multiMsg = plMultistageModMsg::ConvertNoRef(msg);
|
||||
if (multiMsg)
|
||||
{
|
||||
if (multiMsg->GetCommand(plMultistageModMsg::kSetLoopCount))
|
||||
{
|
||||
@ -196,9 +197,8 @@ bool plMultistageBehMod::MsgReceive(plMessage* msg)
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return plSingleModifier::MsgReceive(msg);
|
||||
}
|
||||
|
||||
return plSingleModifier::MsgReceive(msg);
|
||||
}
|
||||
|
||||
void plMultistageBehMod::Read(hsStream *stream, hsResMgr *mgr)
|
||||
|
@ -220,8 +220,8 @@ void plSittingModifier::Trigger(const plArmatureMod *avMod, plNotifyMsg *enterNo
|
||||
// send the SEEK message
|
||||
|
||||
|
||||
char *animName = nil; // this will be the name of our sit animation, which we
|
||||
// need to know so we can seek properly.
|
||||
const char *animName = nil; // this will be the name of our sit animation, which we
|
||||
// need to know so we can seek properly.
|
||||
|
||||
plAvBrainGeneric *brain = IBuildSitBrain(avModKey, seekKey, &animName, enterNotify, exitNotify);
|
||||
if(brain)
|
||||
@ -298,7 +298,7 @@ bool IIsClosestAnim(const char *animName, hsMatrix44 &sitGoal, float &closestDis
|
||||
// IBuildSitBrain ---------------------------------------------------------------------
|
||||
// ----------------
|
||||
plAvBrainGeneric *plSittingModifier::IBuildSitBrain(plKey avModKey, plKey seekKey,
|
||||
char **pAnimName, plNotifyMsg *enterNotify, plNotifyMsg *exitNotify)
|
||||
const char **pAnimName, plNotifyMsg *enterNotify, plNotifyMsg *exitNotify)
|
||||
{
|
||||
plArmatureMod *avatar = plArmatureMod::ConvertNoRef(avModKey->ObjectIsLoaded());
|
||||
plSceneObject *seekObj = plSceneObject::ConvertNoRef(seekKey->ObjectIsLoaded());
|
||||
@ -308,8 +308,8 @@ plAvBrainGeneric *plSittingModifier::IBuildSitBrain(plKey avModKey, plKey seekKe
|
||||
float closestDist = 0.0f;
|
||||
uint8_t closestApproach = 0;
|
||||
hsPoint3 curPosition = avatar->GetTarget(0)->GetLocalToWorld().GetTranslate();
|
||||
char * sitAnimName = nil;
|
||||
char * standAnimName = "StandUpFront"; // always prefer to stand facing front
|
||||
const char* sitAnimName = nil;
|
||||
const char* standAnimName = "StandUpFront"; // always prefer to stand facing front
|
||||
|
||||
bool frontClear = fMiscFlags & kApproachFront;
|
||||
plAvBrainGeneric *brain = nil;
|
||||
@ -353,7 +353,11 @@ plAvBrainGeneric *plSittingModifier::IBuildSitBrain(plKey avModKey, plKey seekKe
|
||||
brain->AddStage(sitStage);
|
||||
brain->AddStage(idleStage);
|
||||
brain->AddStage(standStage);
|
||||
*pAnimName = sitAnimName;
|
||||
#if HS_BUILD_FOR_WIN32
|
||||
*pAnimName = _strdup(sitAnimName);
|
||||
#else
|
||||
*pAnimName = strdup(sitAnimName);
|
||||
#endif
|
||||
|
||||
brain->SetType(plAvBrainGeneric::kSit);
|
||||
brain->SetRecipient(GetKey());
|
||||
|
@ -110,7 +110,7 @@ protected:
|
||||
|
||||
/** Figure out which approach we should use to the sit target, and add the relevant
|
||||
stages to the brain. */
|
||||
plAvBrainGeneric * IBuildSitBrain(plKey avModKey, plKey seekKey,char **pAnimName, plNotifyMsg *enterNotify, plNotifyMsg *exitNotify);
|
||||
plAvBrainGeneric * IBuildSitBrain(plKey avModKey, plKey seekKey, const char **pAnimName, plNotifyMsg *enterNotify, plNotifyMsg *exitNotify);
|
||||
|
||||
/** Unused. */
|
||||
virtual bool IEval(double secs, float del, uint32_t dirty) { return true; }
|
||||
|
@ -249,7 +249,7 @@ plAvSeekMsg::plAvSeekMsg()
|
||||
// CTOR(sender, receiver, seekKey, time)
|
||||
plAvSeekMsg::plAvSeekMsg(const plKey& sender, const plKey& receiver,
|
||||
const plKey &seekKey, float duration, bool smartSeek,
|
||||
plAvAlignment alignType, char *animName, bool noSeek,
|
||||
plAvAlignment alignType, const plString& animName, bool noSeek,
|
||||
uint8_t flags, plKey finishKey)
|
||||
: plAvTaskMsg(sender, receiver),
|
||||
fSeekPoint(seekKey),
|
||||
@ -359,7 +359,7 @@ plAvOneShotMsg::plAvOneShotMsg()
|
||||
plAvOneShotMsg::plAvOneShotMsg(const plKey &sender, const plKey& receiver,
|
||||
const plKey& seekKey, float duration, bool smartSeek,
|
||||
const plString &animName, bool drivable, bool reversible)
|
||||
: plAvSeekMsg(sender, receiver, seekKey, duration, smartSeek), fAnimName(animName),
|
||||
: plAvSeekMsg(sender, receiver, seekKey, duration, smartSeek, kAlignHandle, animName),
|
||||
fDrivable(drivable), fReversible(reversible), fCallbacks(nil)
|
||||
{
|
||||
}
|
||||
|
@ -189,7 +189,7 @@ public:
|
||||
// tors
|
||||
plAvSeekMsg();
|
||||
plAvSeekMsg(const plKey& sender, const plKey& receiver, const plKey &seekKey, float duration, bool smartSeek,
|
||||
plAvAlignment align = kAlignHandle, char *animName = nil, bool noSeek = false,
|
||||
plAvAlignment align = kAlignHandle, const plString& animName = "", bool noSeek = false,
|
||||
uint8_t flags = kSeekFlagForce3rdPersonOnStart, plKey finishKey = nil);
|
||||
|
||||
// plasma protocol
|
||||
@ -212,7 +212,7 @@ public:
|
||||
float fDuration; // take this much time to do the move (only if smartSeek is false)
|
||||
bool fSmartSeek; // seek by walking rather than floating
|
||||
bool fNoSeek;
|
||||
char *fAnimName;
|
||||
plString fAnimName;
|
||||
plAvAlignment fAlignType;
|
||||
uint8_t fFlags;
|
||||
plKey fFinishKey;
|
||||
@ -257,7 +257,6 @@ public:
|
||||
virtual void Write(hsStream *stream, hsResMgr *mgr);
|
||||
|
||||
// public members
|
||||
plString fAnimName; // the name of the animation we're going to use
|
||||
bool fDrivable; // are we animated by time or by mouse movement?
|
||||
bool fReversible; // can we play backwards?
|
||||
plOneShotCallbacks *fCallbacks; // Callbacks given to us by a one-shot modifier
|
||||
|
Reference in New Issue
Block a user