diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 763be03..f2d0219 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -455,7 +455,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
455 | 455 | ||
456 | // Must check for standing up even when PhysicsActor is null, | 456 | // Must check for standing up even when PhysicsActor is null, |
457 | // since sitting currently removes avatar from physical scene | 457 | // since sitting currently removes avatar from physical scene |
458 | if ((flags & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_STAND_UP) != 0) | 458 | if ((flags & (uint) MainAvatar.ControlFlags.AGENT_CONTROL_STAND_UP) != 0) |
459 | { | 459 | { |
460 | StandUp(); | 460 | StandUp(); |
461 | UpdateMovementAnimations(true); | 461 | UpdateMovementAnimations(true); |
@@ -526,7 +526,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
526 | SceneObjectPart part = m_scene.GetSceneObjectPart(m_parentID); | 526 | SceneObjectPart part = m_scene.GetSceneObjectPart(m_parentID); |
527 | LLVector3 pos = new LLVector3(); | 527 | LLVector3 pos = new LLVector3(); |
528 | if (part != null) | 528 | if (part != null) |
529 | pos = part.AbsolutePosition + m_requestedSitOffset + new LLVector3(0.0f, 0.0f, 2.0f * m_sitAvatarHeight); | 529 | pos = part.AbsolutePosition + m_requestedSitOffset + |
530 | new LLVector3(0.0f, 0.0f, 2.0f*m_sitAvatarHeight); | ||
530 | MakeRootAgent(pos, false); | 531 | MakeRootAgent(pos, false); |
531 | m_parentID = 0; | 532 | m_parentID = 0; |
532 | SendFullUpdateToAllClients(); | 533 | SendFullUpdateToAllClients(); |
@@ -569,7 +570,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
569 | 570 | ||
570 | remoteClient.OutPacket(avatarSitResponse); | 571 | remoteClient.OutPacket(avatarSitResponse); |
571 | } | 572 | } |
572 | 573 | ||
573 | public void HandleAgentRequestSit(IClientAPI remoteClient, LLUUID agentID, LLUUID targetID, LLVector3 offset) | 574 | public void HandleAgentRequestSit(IClientAPI remoteClient, LLUUID agentID, LLUUID targetID, LLVector3 offset) |
574 | { | 575 | { |
575 | SendSitResponse(remoteClient, targetID, offset); | 576 | SendSitResponse(remoteClient, targetID, offset); |
@@ -597,7 +598,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
597 | { | 598 | { |
598 | // these magic numbers come mostly from experimenting with ODE, | 599 | // these magic numbers come mostly from experimenting with ODE, |
599 | // and seeing what looks right | 600 | // and seeing what looks right |
600 | AbsolutePosition = m_requestedSitOffset + new LLVector3(m_physicsActor.Size.X / 2.7f, 0f, m_physicsActor.Size.Z / 1.45f); | 601 | AbsolutePosition = m_requestedSitOffset + |
602 | new LLVector3(m_physicsActor.Size.X/2.7f, 0f, m_physicsActor.Size.Z/1.45f); | ||
601 | m_parentID = m_requestedSitTargetID; | 603 | m_parentID = m_requestedSitTargetID; |
602 | MakeChildAgent(); | 604 | MakeChildAgent(); |
603 | SendAnimPack(Animations.AnimsLLUUID["SIT"], 1); | 605 | SendAnimPack(Animations.AnimsLLUUID["SIT"], 1); |
@@ -616,20 +618,21 @@ namespace OpenSim.Region.Environment.Scenes | |||
616 | } | 618 | } |
617 | else | 619 | else |
618 | { | 620 | { |
619 | if (((m_movementflag & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) && PhysicsActor.IsColliding) | 621 | if (((m_movementflag & (uint) MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) && |
622 | PhysicsActor.IsColliding) | ||
620 | { | 623 | { |
621 | SendAnimPack(Animations.AnimsLLUUID["CROUCHWALK"], 1); | 624 | SendAnimPack(Animations.AnimsLLUUID["CROUCHWALK"], 1); |
622 | } | 625 | } |
623 | else | 626 | else |
624 | { | 627 | { |
625 | SendAnimPack(Animations.AnimsLLUUID["WALK"], 1); | 628 | SendAnimPack(Animations.AnimsLLUUID["WALK"], 1); |
626 | } | 629 | } |
627 | |||
628 | } | 630 | } |
629 | } | 631 | } |
630 | else | 632 | else |
631 | { | 633 | { |
632 | if (((m_movementflag & (uint)MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) && PhysicsActor.IsColliding) | 634 | if (((m_movementflag & (uint) MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) && |
635 | PhysicsActor.IsColliding) | ||
633 | { | 636 | { |
634 | SendAnimPack(Animations.AnimsLLUUID["CROUCH"], 1); | 637 | SendAnimPack(Animations.AnimsLLUUID["CROUCH"], 1); |
635 | } | 638 | } |
@@ -656,7 +659,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
656 | 659 | ||
657 | direc = direc*((0.03f)*128f); | 660 | direc = direc*((0.03f)*128f); |
658 | if (m_physicsActor.Flying) | 661 | if (m_physicsActor.Flying) |
659 | { direc *= 4; } | 662 | { |
663 | direc *= 4; | ||
664 | } | ||
660 | else | 665 | else |
661 | { | 666 | { |
662 | if (!m_physicsActor.Flying && m_physicsActor.IsColliding) | 667 | if (!m_physicsActor.Flying && m_physicsActor.IsColliding) |
@@ -668,7 +673,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
668 | //System.Console.WriteLine("Jump"); | 673 | //System.Console.WriteLine("Jump"); |
669 | SendAnimPack(Animations.AnimsLLUUID["PRE_JUMP"], 1); | 674 | SendAnimPack(Animations.AnimsLLUUID["PRE_JUMP"], 1); |
670 | } | 675 | } |
671 | |||
672 | } | 676 | } |
673 | } | 677 | } |
674 | 678 | ||
@@ -1093,4 +1097,4 @@ namespace OpenSim.Region.Environment.Scenes | |||
1093 | m_controllingClient.SendWearables(m_wearables, m_wearablesSerial++); | 1097 | m_controllingClient.SendWearables(m_wearables, m_wearablesSerial++); |
1094 | } | 1098 | } |
1095 | } | 1099 | } |
1096 | } | 1100 | } \ No newline at end of file |