don't do Animator.UpdateMovementAnimations() in scenepresence RegionHeartbeatEnd if agent is sitting. Also restore Velocity in teleportWithMomentum()

avinationmerge
UbitUmarov 2012-04-13 17:50:03 +01:00
parent c4a9eae961
commit 5da77e047a
1 changed files with 3 additions and 2 deletions

View File

@ -753,7 +753,7 @@ namespace OpenSim.Region.Framework.Scenes
if (m_movementAnimationUpdateCounter >= 2) if (m_movementAnimationUpdateCounter >= 2)
{ {
m_movementAnimationUpdateCounter = 0; m_movementAnimationUpdateCounter = 0;
if (Animator != null) if (Animator != null && ParentID == 0) // don't do it sitting
{ {
Animator.UpdateMovementAnimations(); Animator.UpdateMovementAnimations();
} }
@ -1077,11 +1077,12 @@ namespace OpenSim.Region.Framework.Scenes
public void TeleportWithMomentum(Vector3 pos) public void TeleportWithMomentum(Vector3 pos)
{ {
bool isFlying = Flying; bool isFlying = Flying;
Vector3 vel = Velocity;
RemoveFromPhysicalScene(); RemoveFromPhysicalScene();
CheckLandingPoint(ref pos); CheckLandingPoint(ref pos);
AbsolutePosition = pos; AbsolutePosition = pos;
AddToPhysicalScene(isFlying); AddToPhysicalScene(isFlying);
Velocity = vel;
SendTerseUpdateToAllClients(); SendTerseUpdateToAllClients();
} }