diff options
author | lbsa71 | 2007-09-18 22:12:16 +0000 |
---|---|---|
committer | lbsa71 | 2007-09-18 22:12:16 +0000 |
commit | f71b315592b9f7e81ed6344d731495c2a69bca30 (patch) | |
tree | 1ce66a65814e6aee76d009705ee5fc218afb1a8b /OpenSim/Region/Environment/Scenes | |
parent | * Gave Connectivity some more (manly) love. (diff) | |
download | opensim-SC_OLD-f71b315592b9f7e81ed6344d731495c2a69bca30.zip opensim-SC_OLD-f71b315592b9f7e81ed6344d731495c2a69bca30.tar.gz opensim-SC_OLD-f71b315592b9f7e81ed6344d731495c2a69bca30.tar.bz2 opensim-SC_OLD-f71b315592b9f7e81ed6344d731495c2a69bca30.tar.xz |
* Now at least we're not creating physActors for child agents.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 28 |
1 files changed, 19 insertions, 9 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 | ||