Fixed ground sit animation getting stuck after standing up. Fixes FIRE-1906

master
ziree 2011-09-16 16:05:03 +02:00
parent 1ffae62b52
commit 69f5142e14
1 changed files with 15 additions and 8 deletions

View File

@ -507,17 +507,12 @@ void AOEngine::cycle(eCycleMode cycleMode)
return;
}
LLUUID animation=state->mCurrentAnimationID;
if(!animation.isNull())
{
gAgent.sendAnimationRequest(animation,ANIM_REQUEST_STOP);
gAgentAvatarp->LLCharacter::stopMotion(animation);
state->mCurrentAnimationID.setNull();
}
LLUUID oldAnimation=state->mCurrentAnimationID;
LLUUID animation;
if(cycleMode==CycleAny)
{
animation=override(motion,TRUE);
animation=mCurrentSet->getAnimationForState(state);
}
else
{
@ -539,7 +534,19 @@ void AOEngine::cycle(eCycleMode cycleMode)
state->mCurrentAnimationID=animation;
if(!animation.isNull())
{
lldebugs << "requesting animation start for motion " << gAnimLibrary.animationName(motion) << ": " << animation << llendl;
gAgent.sendAnimationRequest(animation,ANIM_REQUEST_START);
}
else
lldebugs << "overrider came back with NULL animation for motion " << gAnimLibrary.animationName(motion) << "." << llendl;
if(!oldAnimation.isNull())
{
lldebugs << "Cycling state " << state->mName << " - stopping animation " << oldAnimation << llendl;
gAgent.sendAnimationRequest(oldAnimation,ANIM_REQUEST_STOP);
gAgentAvatarp->LLCharacter::stopMotion(oldAnimation);
}
}
void AOEngine::updateSortOrder(AOSet::AOState* state)