Make undeformed a little more robust.
parent
e9bf51a2fb
commit
2b256ea891
|
|
@ -25,14 +25,17 @@ FSPose::~FSPose()
|
|||
{
|
||||
}
|
||||
|
||||
void FSPose::setPose(std::string new_pose)
|
||||
void FSPose::setPose(std::string new_pose, bool save_state)
|
||||
{
|
||||
if (isAgentAvatarValid())
|
||||
{
|
||||
if (mCurrentPose.notNull())
|
||||
{
|
||||
gAgent.sendAnimationRequest(mCurrentPose, ANIM_REQUEST_STOP);
|
||||
mCurrentPose.set(new_pose);
|
||||
gAgent.sendAnimationRequest(mCurrentPose, ANIM_REQUEST_START);
|
||||
}
|
||||
if (save_state)
|
||||
mCurrentPose.set(new_pose);
|
||||
gAgent.sendAnimationRequest(LLUUID(new_pose), ANIM_REQUEST_START);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class FSPose : public LLSingleton<FSPose>
|
|||
friend class LLSingleton<FSPose>;
|
||||
LOG_CLASS(FSPose);
|
||||
public:
|
||||
void setPose(std::string new_pose);
|
||||
void setPose(std::string new_pose, bool save_state = true);
|
||||
void stopPose();
|
||||
protected:
|
||||
FSPose();
|
||||
|
|
|
|||
|
|
@ -8657,7 +8657,9 @@ class FSToolsUndeform : public view_listener_t
|
|||
{
|
||||
bool handleEvent(const LLSD& userdata)
|
||||
{
|
||||
FSPose::getInstance()->setPose(gSavedSettings.getString("FSUndeformUUID"));
|
||||
FSPose::getInstance()->setPose(gSavedSettings.getString("FSUndeformUUID"), false);
|
||||
gAgentAvatarp->updateVisualParams();
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue