aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs28
-rw-r--r--OpenSim/Region/Examples/SimpleApp/MyWorld.cs2
2 files changed, 20 insertions, 10 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 09992fd..d763fe3 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -703,7 +703,7 @@ namespace OpenSim.Region.Environment.Scenes
703 { 703 {
704 SubscribeToClientEvents(client); 704 SubscribeToClientEvents(client);
705 m_estateManager.sendRegionHandshake(client); 705 m_estateManager.sendRegionHandshake(client);
706 CreateAndAddScenePresence(client); 706 CreateAndAddScenePresence(client, child );
707 m_LandManager.sendParcelOverlay(client); 707 m_LandManager.sendParcelOverlay(client);
708 commsManager.UserProfiles.AddNewUser(client.AgentId); 708 commsManager.UserProfiles.AddNewUser(client.AgentId);
709 commsManager.TransactionsManager.AddUser(client.AgentId); 709 commsManager.TransactionsManager.AddUser(client.AgentId);
@@ -768,19 +768,29 @@ namespace OpenSim.Region.Environment.Scenes
768 EventManager.TriggerOnNewClient(client); 768 EventManager.TriggerOnNewClient(client);
769 } 769 }
770 770
771 protected ScenePresence CreateAndAddScenePresence(IClientAPI client) 771 protected ScenePresence CreateAndAddScenePresence(IClientAPI client, bool child )
772 { 772 {
773 ScenePresence newAvatar = null; 773 ScenePresence newAvatar = null;
774 774
775 MainLog.Instance.Verbose("World.cs:AddViewerAgent() - Creating new avatar for remote viewer agent");
776 newAvatar = new ScenePresence(client, this, m_regInfo); 775 newAvatar = new ScenePresence(client, this, m_regInfo);
777 MainLog.Instance.Verbose("World.cs:AddViewerAgent() - Adding new avatar to world"); 776 newAvatar.childAgent = child;
778 MainLog.Instance.Verbose("World.cs:AddViewerAgent() - Starting RegionHandshake ");
779 777
780 PhysicsVector pVec = new PhysicsVector(newAvatar.AbsolutePosition.X, newAvatar.AbsolutePosition.Y, newAvatar.AbsolutePosition.Z); 778 if (child)
781 lock (m_syncRoot)
782 { 779 {
783 newAvatar.PhysActor = phyScene.AddAvatar(pVec); 780 MainLog.Instance.Verbose(this.RegionInfo.RegionName + ": Creating new child agent.");
781 }
782 else
783 {
784 newAvatar.OnSignificantClientMovement += m_LandManager.handleSignificantClientMovement;
785
786 MainLog.Instance.Verbose(this.RegionInfo.RegionName + ": Creating new root agent.");
787 MainLog.Instance.Verbose(this.RegionInfo.RegionName + ": Adding Physical agent.");
788
789 PhysicsVector pVec = new PhysicsVector(newAvatar.AbsolutePosition.X, newAvatar.AbsolutePosition.Y, newAvatar.AbsolutePosition.Z);
790 lock (m_syncRoot)
791 {
792 newAvatar.PhysActor = phyScene.AddAvatar(pVec);
793 }
784 } 794 }
785 795
786 lock (Entities) 796 lock (Entities)
@@ -805,7 +815,7 @@ namespace OpenSim.Region.Environment.Scenes
805 Avatars.Add(client.AgentId, newAvatar); 815 Avatars.Add(client.AgentId, newAvatar);
806 } 816 }
807 } 817 }
808 newAvatar.OnSignificantClientMovement += m_LandManager.handleSignificantClientMovement; 818
809 return newAvatar; 819 return newAvatar;
810 } 820 }
811 821
diff --git a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs
index cf71389..1f62c88 100644
--- a/OpenSim/Region/Examples/SimpleApp/MyWorld.cs
+++ b/OpenSim/Region/Examples/SimpleApp/MyWorld.cs
@@ -66,7 +66,7 @@ namespace SimpleApp
66 { 66 {
67 SubscribeToClientEvents(client); 67 SubscribeToClientEvents(client);
68 68
69 ScenePresence avatar = CreateAndAddScenePresence(client); 69 ScenePresence avatar = CreateAndAddScenePresence(client, child );
70 avatar.AbsolutePosition = new LLVector3(128, 128, 26); 70 avatar.AbsolutePosition = new LLVector3(128, 128, 26);
71 71
72 LLVector3 pos = new LLVector3(128, 128, 128); 72 LLVector3 pos = new LLVector3(128, 128, 128);