aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs23
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs34
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs2
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs11
4 files changed, 33 insertions, 37 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 56bdc63..f864392 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3986,7 +3986,7 @@ namespace OpenSim.Region.Framework.Scenes
3986 3986
3987 try 3987 try
3988 { 3988 {
3989 if (!AuthorizeUser(acd, SeeIntoRegion, out reason)) 3989 if (!AuthorizeUser(acd, (vialogin ? false : SeeIntoRegion), out reason))
3990 { 3990 {
3991 m_authenticateHandler.RemoveCircuit(acd.circuitcode); 3991 m_authenticateHandler.RemoveCircuit(acd.circuitcode);
3992 return false; 3992 return false;
@@ -4596,10 +4596,27 @@ namespace OpenSim.Region.Framework.Scenes
4596 4596
4597 // Check that the auth_token is valid 4597 // Check that the auth_token is valid
4598 AgentCircuitData acd = AuthenticateHandler.GetAgentCircuitData(agentID); 4598 AgentCircuitData acd = AuthenticateHandler.GetAgentCircuitData(agentID);
4599 if (acd != null && acd.SessionID.ToString() == auth_token) 4599
4600 if (acd == null)
4601 {
4602 m_log.DebugFormat(
4603 "[SCENE]: Request to close agent {0} but no such agent in scene {1}. May have been closed previously.",
4604 agentID, Name);
4605
4606 return false;
4607 }
4608
4609 if (acd.SessionID.ToString() == auth_token)
4610 {
4600 return IncomingCloseAgent(agentID, force); 4611 return IncomingCloseAgent(agentID, force);
4612 }
4601 else 4613 else
4602 m_log.ErrorFormat("[SCENE]: Request to close agent {0} with invalid authorization token {1}", agentID, auth_token); 4614 {
4615 m_log.WarnFormat(
4616 "[SCENE]: Request to close agent {0} with invalid authorization token {1} in {2}",
4617 agentID, auth_token, Name);
4618 }
4619
4603 return false; 4620 return false;
4604 } 4621 }
4605 4622
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index e599e90..b0f8991 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -631,40 +631,16 @@ namespace OpenSim.Region.Framework.Scenes
631 protected internal ScenePresence CreateAndAddChildScenePresence( 631 protected internal ScenePresence CreateAndAddChildScenePresence(
632 IClientAPI client, AvatarAppearance appearance, PresenceType type) 632 IClientAPI client, AvatarAppearance appearance, PresenceType type)
633 { 633 {
634 ScenePresence newAvatar = null;
635
636 // ScenePresence always defaults to child agent 634 // ScenePresence always defaults to child agent
637 newAvatar = new ScenePresence(client, m_parentScene, appearance, type); 635 ScenePresence presence = new ScenePresence(client, m_parentScene, appearance, type);
638
639 AddScenePresence(newAvatar);
640
641 return newAvatar;
642 }
643
644 /// <summary>
645 /// Add a presence to the scene
646 /// </summary>
647 /// <param name="presence"></param>
648 protected internal void AddScenePresence(ScenePresence presence)
649 {
650 // Always a child when added to the scene
651 bool child = presence.IsChildAgent;
652
653 if (child)
654 {
655 m_numChildAgents++;
656 }
657 else
658 {
659 m_numRootAgents++;
660 presence.AddToPhysicalScene(false);
661 }
662 636
663 Entities[presence.UUID] = presence; 637 Entities[presence.UUID] = presence;
664 638
665 m_scenePresencesLock.EnterWriteLock(); 639 m_scenePresencesLock.EnterWriteLock();
666 try 640 try
667 { 641 {
642 m_numChildAgents++;
643
668 Dictionary<UUID, ScenePresence> newmap = new Dictionary<UUID, ScenePresence>(m_scenePresenceMap); 644 Dictionary<UUID, ScenePresence> newmap = new Dictionary<UUID, ScenePresence>(m_scenePresenceMap);
669 List<ScenePresence> newlist = new List<ScenePresence>(m_scenePresenceArray); 645 List<ScenePresence> newlist = new List<ScenePresence>(m_scenePresenceArray);
670 646
@@ -675,7 +651,7 @@ namespace OpenSim.Region.Framework.Scenes
675 } 651 }
676 else 652 else
677 { 653 {
678 // Remember the old presene reference from the dictionary 654 // Remember the old presence reference from the dictionary
679 ScenePresence oldref = newmap[presence.UUID]; 655 ScenePresence oldref = newmap[presence.UUID];
680 // Replace the presence reference in the dictionary with the new value 656 // Replace the presence reference in the dictionary with the new value
681 newmap[presence.UUID] = presence; 657 newmap[presence.UUID] = presence;
@@ -691,6 +667,8 @@ namespace OpenSim.Region.Framework.Scenes
691 { 667 {
692 m_scenePresencesLock.ExitWriteLock(); 668 m_scenePresencesLock.ExitWriteLock();
693 } 669 }
670
671 return presence;
694 } 672 }
695 673
696 /// <summary> 674 /// <summary>
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 59a453a..cf03d7c 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -4522,7 +4522,7 @@ namespace OpenSim.Region.Framework.Scenes
4522 // For now, we use the NINJA naming scheme for identifying joints. 4522 // For now, we use the NINJA naming scheme for identifying joints.
4523 // In the future, we can support other joint specification schemes such as a 4523 // In the future, we can support other joint specification schemes such as a
4524 // custom checkbox in the viewer GUI. 4524 // custom checkbox in the viewer GUI.
4525 if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints) 4525 if (ParentGroup.Scene != null && ParentGroup.Scene.PhysicsScene != null && ParentGroup.Scene.PhysicsScene.SupportsNINJAJoints)
4526 { 4526 {
4527 return IsHingeJoint() || IsBallJoint(); 4527 return IsHingeJoint() || IsBallJoint();
4528 } 4528 }
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 3f4979e..88ecda2 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2707,6 +2707,9 @@ namespace OpenSim.Region.Framework.Scenes
2707 2707
2708 public void HandleAgentSit(IClientAPI remoteClient, UUID agentID) 2708 public void HandleAgentSit(IClientAPI remoteClient, UUID agentID)
2709 { 2709 {
2710 if (IsChildAgent)
2711 return;
2712
2710 SceneObjectPart part = m_scene.GetSceneObjectPart(m_requestedSitTargetID); 2713 SceneObjectPart part = m_scene.GetSceneObjectPart(m_requestedSitTargetID);
2711 2714
2712 if (part != null) 2715 if (part != null)
@@ -2793,6 +2796,9 @@ namespace OpenSim.Region.Framework.Scenes
2793 2796
2794 public void HandleAgentSitOnGround() 2797 public void HandleAgentSitOnGround()
2795 { 2798 {
2799 if (IsChildAgent)
2800 return;
2801
2796// m_updateCount = 0; // Kill animation update burst so that the SIT_G.. will stick.. 2802// m_updateCount = 0; // Kill animation update burst so that the SIT_G.. will stick..
2797 m_AngularVelocity = Vector3.Zero; 2803 m_AngularVelocity = Vector3.Zero;
2798 Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED"); 2804 Animator.TrySetMovementAnimation("SIT_GROUND_CONSTRAINED");
@@ -3451,11 +3457,6 @@ namespace OpenSim.Region.Framework.Scenes
3451 } 3457 }
3452 } 3458 }
3453 3459
3454 public void RestoreInCurrentScene()
3455 {
3456 AddToPhysicalScene(false); // not exactly false
3457 }
3458
3459 public void Reset() 3460 public void Reset()
3460 { 3461 {
3461// m_log.DebugFormat("[SCENE PRESENCE]: Resetting {0} in {1}", Name, Scene.RegionInfo.RegionName); 3462// m_log.DebugFormat("[SCENE PRESENCE]: Resetting {0} in {1}", Name, Scene.RegionInfo.RegionName);