Trying to get ground sit to work. Unstable.
parent
d1f2b38a80
commit
0f2ff58ff6
|
|
@ -217,10 +217,12 @@ void AOEngine::enable(BOOL yes)
|
|||
}
|
||||
}
|
||||
|
||||
const LLUUID AOEngine::override(const LLUUID motion,BOOL start)
|
||||
const LLUUID AOEngine::override(const LLUUID pMotion,BOOL start)
|
||||
{
|
||||
LLUUID animation;
|
||||
|
||||
LLUUID motion=pMotion;
|
||||
|
||||
if(!mEnabled)
|
||||
{
|
||||
if(start && mCurrentSet)
|
||||
|
|
@ -252,6 +254,13 @@ const LLUUID AOEngine::override(const LLUUID motion,BOOL start)
|
|||
return animation;
|
||||
}
|
||||
|
||||
// we don't distinguish between these two
|
||||
if(motion==ANIM_AGENT_SIT_GROUND_CONSTRAINED)
|
||||
{
|
||||
llwarns << "Mapping ground sit constrained to ground sit" << llendl;
|
||||
motion=ANIM_AGENT_SIT_GROUND;
|
||||
}
|
||||
|
||||
AOSet::AOState* state=mCurrentSet->getStateByRemapID(motion);
|
||||
if(!state)
|
||||
{
|
||||
|
|
@ -291,7 +300,7 @@ const LLUUID AOEngine::override(const LLUUID motion,BOOL start)
|
|||
}
|
||||
|
||||
// do not remember typing as set-wide motion
|
||||
if(motion!=ANIM_AGENT_TYPE)
|
||||
if(motion!=ANIM_AGENT_TYPE && motion!=ANIM_AGENT_SIT_GROUND)
|
||||
mCurrentSet->setMotion(motion);
|
||||
|
||||
animation=mCurrentSet->getAnimationForState(state);
|
||||
|
|
@ -309,6 +318,9 @@ const LLUUID AOEngine::override(const LLUUID motion,BOOL start)
|
|||
|
||||
if(motion==ANIM_AGENT_SIT)
|
||||
mSitCancelTimer.oneShot();
|
||||
else if(motion==ANIM_AGENT_SIT_GROUND)
|
||||
gAgentAvatarp->mPlayingAnimations[pMotion]=TRUE;
|
||||
// gAgent.sendAnimationRequest(pMotion,ANIM_REQUEST_START);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -319,6 +331,12 @@ const LLUUID AOEngine::override(const LLUUID motion,BOOL start)
|
|||
if(motion==ANIM_AGENT_TYPE)
|
||||
return animation;
|
||||
|
||||
if(motion==ANIM_AGENT_SIT_GROUND)
|
||||
{
|
||||
gAgent.sendAnimationRequest(pMotion,ANIM_REQUEST_STOP);
|
||||
return animation;
|
||||
}
|
||||
|
||||
if(motion!=mCurrentSet->getMotion())
|
||||
{
|
||||
llwarns << "trying to stop-override motion " << gAnimLibrary.animStateToString(motion)
|
||||
|
|
|
|||
Loading…
Reference in New Issue