aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs165
1 files changed, 137 insertions, 28 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index dcd7f3d..779f898 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -137,6 +137,7 @@ namespace OpenSim.Region.Framework.Scenes
137 protected SceneCommunicationService m_sceneGridService; 137 protected SceneCommunicationService m_sceneGridService;
138 public bool LoginsDisabled = true; 138 public bool LoginsDisabled = true;
139 public bool LoadingPrims = false; 139 public bool LoadingPrims = false;
140 public bool CombineRegions = false;
140 141
141 public new float TimeDilation 142 public new float TimeDilation
142 { 143 {
@@ -150,6 +151,20 @@ namespace OpenSim.Region.Framework.Scenes
150 151
151 public IXfer XferManager; 152 public IXfer XferManager;
152 153
154 protected ISnmpModule m_snmpService = null;
155 public ISnmpModule SnmpService
156 {
157 get
158 {
159 if (m_snmpService == null)
160 {
161 m_snmpService = RequestModuleInterface<ISnmpModule>();
162 }
163
164 return m_snmpService;
165 }
166 }
167
153 protected IAssetService m_AssetService; 168 protected IAssetService m_AssetService;
154 protected IAuthorizationService m_AuthorizationService; 169 protected IAuthorizationService m_AuthorizationService;
155 170
@@ -608,6 +623,8 @@ namespace OpenSim.Region.Framework.Scenes
608 623
609 // Load region settings 624 // Load region settings
610 m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID); 625 m_regInfo.RegionSettings = m_storageManager.DataStore.LoadRegionSettings(m_regInfo.RegionID);
626 m_regInfo.WindlightSettings = m_storageManager.DataStore.LoadRegionWindlightSettings(m_regInfo.RegionID);
627
611 if (m_storageManager.EstateDataStore != null) 628 if (m_storageManager.EstateDataStore != null)
612 { 629 {
613 m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID, false); 630 m_regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(m_regInfo.RegionID, false);
@@ -710,7 +727,7 @@ namespace OpenSim.Region.Framework.Scenes
710 m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false); 727 m_useFlySlow = startupConfig.GetBoolean("enableflyslow", false);
711 // TODO: Change default to true once the feature is supported 728 // TODO: Change default to true once the feature is supported
712 m_usePreJump = startupConfig.GetBoolean("enableprejump", false); 729 m_usePreJump = startupConfig.GetBoolean("enableprejump", false);
713 730 m_usePreJump = true; // Above line fails!?
714 m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys); 731 m_maxNonphys = startupConfig.GetFloat("NonPhysicalPrimMax", m_maxNonphys);
715 if (RegionInfo.NonphysPrimMax > 0) 732 if (RegionInfo.NonphysPrimMax > 0)
716 { 733 {
@@ -752,6 +769,7 @@ namespace OpenSim.Region.Framework.Scenes
752 } 769 }
753 770
754 m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl); 771 m_strictAccessControl = startupConfig.GetBoolean("StrictAccessControl", m_strictAccessControl);
772 CombineRegions = startupConfig.GetBoolean("CombineContiguousRegions", false);
755 773
756 #region BinaryStats 774 #region BinaryStats
757 775
@@ -1024,6 +1042,15 @@ namespace OpenSim.Region.Framework.Scenes
1024 /// <param name="seconds">float indicating duration before restart.</param> 1042 /// <param name="seconds">float indicating duration before restart.</param>
1025 public virtual void Restart(float seconds) 1043 public virtual void Restart(float seconds)
1026 { 1044 {
1045 Restart(seconds, true);
1046 }
1047
1048 /// <summary>
1049 /// Given float seconds, this will restart the region. showDialog will optionally alert the users.
1050 /// </summary>
1051 /// <param name="seconds">float indicating duration before restart.</param>
1052 public virtual void Restart(float seconds, bool showDialog)
1053 {
1027 // notifications are done in 15 second increments 1054 // notifications are done in 15 second increments
1028 // so .. if the number of seconds is less then 15 seconds, it's not really a restart request 1055 // so .. if the number of seconds is less then 15 seconds, it's not really a restart request
1029 // It's a 'Cancel restart' request. 1056 // It's a 'Cancel restart' request.
@@ -1044,8 +1071,11 @@ namespace OpenSim.Region.Framework.Scenes
1044 m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); 1071 m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed);
1045 m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes"); 1072 m_log.Info("[REGION]: Restarting Region in " + (seconds / 60) + " minutes");
1046 m_restartTimer.Start(); 1073 m_restartTimer.Start();
1047 m_dialogModule.SendNotificationToUsersInRegion( 1074 if (showDialog)
1075 {
1076 m_dialogModule.SendNotificationToUsersInRegion(
1048 UUID.Random(), String.Empty, RegionInfo.RegionName + String.Format(": Restarting in {0} Minutes", (int)(seconds / 60.0))); 1077 UUID.Random(), String.Empty, RegionInfo.RegionName + String.Format(": Restarting in {0} Minutes", (int)(seconds / 60.0)));
1078 }
1049 } 1079 }
1050 } 1080 }
1051 1081
@@ -1403,16 +1433,16 @@ namespace OpenSim.Region.Framework.Scenes
1403 // Check if any objects have reached their targets 1433 // Check if any objects have reached their targets
1404 CheckAtTargets(); 1434 CheckAtTargets();
1405 1435
1406 // Update SceneObjectGroups that have scheduled themselves for updates
1407 // Objects queue their updates onto all scene presences
1408 if (m_frame % m_update_objects == 0)
1409 m_sceneGraph.UpdateObjectGroups();
1410
1411 // Run through all ScenePresences looking for updates 1436 // Run through all ScenePresences looking for updates
1412 // Presence updates and queued object updates for each presence are sent to clients 1437 // Presence updates and queued object updates for each presence are sent to clients
1413 if (m_frame % m_update_presences == 0) 1438 if (m_frame % m_update_presences == 0)
1414 m_sceneGraph.UpdatePresences(); 1439 m_sceneGraph.UpdatePresences();
1415 1440
1441 // Update SceneObjectGroups that have scheduled themselves for updates
1442 // Objects queue their updates onto all scene presences
1443 if (m_frame % m_update_objects == 0)
1444 m_sceneGraph.UpdateObjectGroups();
1445
1416 if (m_frame % m_update_coarse_locations == 0) 1446 if (m_frame % m_update_coarse_locations == 0)
1417 { 1447 {
1418 List<Vector3> coarseLocations; 1448 List<Vector3> coarseLocations;
@@ -1741,6 +1771,7 @@ namespace OpenSim.Region.Framework.Scenes
1741 public void StoreWindlightProfile(RegionLightShareData wl) 1771 public void StoreWindlightProfile(RegionLightShareData wl)
1742 { 1772 {
1743 m_regInfo.WindlightSettings = wl; 1773 m_regInfo.WindlightSettings = wl;
1774 wl.Save();
1744 m_storageManager.DataStore.StoreRegionWindlightSettings(wl); 1775 m_storageManager.DataStore.StoreRegionWindlightSettings(wl);
1745 m_eventManager.TriggerOnSaveNewWindlightProfile(); 1776 m_eventManager.TriggerOnSaveNewWindlightProfile();
1746 } 1777 }
@@ -1923,14 +1954,24 @@ namespace OpenSim.Region.Framework.Scenes
1923 /// <returns></returns> 1954 /// <returns></returns>
1924 public Vector3 GetNewRezLocation(Vector3 RayStart, Vector3 RayEnd, UUID RayTargetID, Quaternion rot, byte bypassRayCast, byte RayEndIsIntersection, bool frontFacesOnly, Vector3 scale, bool FaceCenter) 1955 public Vector3 GetNewRezLocation(Vector3 RayStart, Vector3 RayEnd, UUID RayTargetID, Quaternion rot, byte bypassRayCast, byte RayEndIsIntersection, bool frontFacesOnly, Vector3 scale, bool FaceCenter)
1925 { 1956 {
1957
1958 float wheight = (float)RegionInfo.RegionSettings.WaterHeight;
1959 Vector3 wpos = Vector3.Zero;
1960 // Check for water surface intersection from above
1961 if ( (RayStart.Z > wheight) && (RayEnd.Z < wheight) )
1962 {
1963 float ratio = (RayStart.Z - wheight) / (RayStart.Z - RayEnd.Z);
1964 wpos.X = RayStart.X - (ratio * (RayStart.X - RayEnd.X));
1965 wpos.Y = RayStart.Y - (ratio * (RayStart.Y - RayEnd.Y));
1966 wpos.Z = wheight;
1967 }
1968
1926 Vector3 pos = Vector3.Zero; 1969 Vector3 pos = Vector3.Zero;
1927 if (RayEndIsIntersection == (byte)1) 1970 if (RayEndIsIntersection == (byte)1)
1928 { 1971 {
1929 pos = RayEnd; 1972 pos = RayEnd;
1930 return pos;
1931 } 1973 }
1932 1974 else if (RayTargetID != UUID.Zero)
1933 if (RayTargetID != UUID.Zero)
1934 { 1975 {
1935 SceneObjectPart target = GetSceneObjectPart(RayTargetID); 1976 SceneObjectPart target = GetSceneObjectPart(RayTargetID);
1936 1977
@@ -1952,7 +1993,7 @@ namespace OpenSim.Region.Framework.Scenes
1952 EntityIntersection ei = target.TestIntersectionOBB(NewRay, Quaternion.Identity, frontFacesOnly, FaceCenter); 1993 EntityIntersection ei = target.TestIntersectionOBB(NewRay, Quaternion.Identity, frontFacesOnly, FaceCenter);
1953 1994
1954 // Un-comment out the following line to Get Raytrace results printed to the console. 1995 // Un-comment out the following line to Get Raytrace results printed to the console.
1955 // m_log.Info("[RAYTRACERESULTS]: Hit:" + ei.HitTF.ToString() + " Point: " + ei.ipoint.ToString() + " Normal: " + ei.normal.ToString()); 1996 // m_log.Info("[RAYTRACERESULTS]: Hit:" + ei.HitTF.ToString() + " Point: " + ei.ipoint.ToString() + " Normal: " + ei.normal.ToString());
1956 float ScaleOffset = 0.5f; 1997 float ScaleOffset = 0.5f;
1957 1998
1958 // If we hit something 1999 // If we hit something
@@ -1975,13 +2016,10 @@ namespace OpenSim.Region.Framework.Scenes
1975 //pos.Z -= 0.25F; 2016 //pos.Z -= 0.25F;
1976 2017
1977 } 2018 }
1978
1979 return pos;
1980 } 2019 }
1981 else 2020 else
1982 { 2021 {
1983 // We don't have a target here, so we're going to raytrace all the objects in the scene. 2022 // We don't have a target here, so we're going to raytrace all the objects in the scene.
1984
1985 EntityIntersection ei = m_sceneGraph.GetClosestIntersectingPrim(new Ray(AXOrigin, AXdirection), true, false); 2023 EntityIntersection ei = m_sceneGraph.GetClosestIntersectingPrim(new Ray(AXOrigin, AXdirection), true, false);
1986 2024
1987 // Un-comment the following line to print the raytrace results to the console. 2025 // Un-comment the following line to print the raytrace results to the console.
@@ -1990,13 +2028,12 @@ namespace OpenSim.Region.Framework.Scenes
1990 if (ei.HitTF) 2028 if (ei.HitTF)
1991 { 2029 {
1992 pos = new Vector3(ei.ipoint.X, ei.ipoint.Y, ei.ipoint.Z); 2030 pos = new Vector3(ei.ipoint.X, ei.ipoint.Y, ei.ipoint.Z);
1993 } else 2031 }
2032 else
1994 { 2033 {
1995 // fall back to our stupid functionality 2034 // fall back to our stupid functionality
1996 pos = RayEnd; 2035 pos = RayEnd;
1997 } 2036 }
1998
1999 return pos;
2000 } 2037 }
2001 } 2038 }
2002 else 2039 else
@@ -2007,8 +2044,12 @@ namespace OpenSim.Region.Framework.Scenes
2007 //increase height so its above the ground. 2044 //increase height so its above the ground.
2008 //should be getting the normal of the ground at the rez point and using that? 2045 //should be getting the normal of the ground at the rez point and using that?
2009 pos.Z += scale.Z / 2f; 2046 pos.Z += scale.Z / 2f;
2010 return pos; 2047// return pos;
2011 } 2048 }
2049
2050 // check against posible water intercept
2051 if (wpos.Z > pos.Z) pos = wpos;
2052 return pos;
2012 } 2053 }
2013 2054
2014 2055
@@ -2141,13 +2182,22 @@ namespace OpenSim.Region.Framework.Scenes
2141 public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates) 2182 public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates)
2142 { 2183 {
2143 return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates); 2184 return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates);
2144 } 2185 }
2145 2186
2146 /// <summary> 2187 /// <summary>
2147 /// Delete every object from the scene. This does not include attachments worn by avatars. 2188 /// Delete every object from the scene. This does not include attachments worn by avatars.
2148 /// </summary> 2189 /// </summary>
2149 public void DeleteAllSceneObjects() 2190 public void DeleteAllSceneObjects()
2150 { 2191 {
2192 DeleteAllSceneObjects(false);
2193 }
2194
2195 /// <summary>
2196 /// Delete every object from the scene. This does not include attachments worn by avatars.
2197 /// </summary>
2198 public void DeleteAllSceneObjects(bool exceptNoCopy)
2199 {
2200 List<SceneObjectGroup> toReturn = new List<SceneObjectGroup>();
2151 lock (Entities) 2201 lock (Entities)
2152 { 2202 {
2153 ICollection<EntityBase> entities = new List<EntityBase>(Entities); 2203 ICollection<EntityBase> entities = new List<EntityBase>(Entities);
@@ -2157,11 +2207,24 @@ namespace OpenSim.Region.Framework.Scenes
2157 if (e is SceneObjectGroup) 2207 if (e is SceneObjectGroup)
2158 { 2208 {
2159 SceneObjectGroup sog = (SceneObjectGroup)e; 2209 SceneObjectGroup sog = (SceneObjectGroup)e;
2160 if (!sog.IsAttachment) 2210 if (sog != null && !sog.IsAttachment)
2161 DeleteSceneObject((SceneObjectGroup)e, false); 2211 {
2212 if (!exceptNoCopy || ((sog.GetEffectivePermissions() & (uint)PermissionMask.Copy) != 0))
2213 {
2214 DeleteSceneObject((SceneObjectGroup)e, false);
2215 }
2216 else
2217 {
2218 toReturn.Add((SceneObjectGroup)e);
2219 }
2220 }
2162 } 2221 }
2163 } 2222 }
2164 } 2223 }
2224 if (toReturn.Count > 0)
2225 {
2226 returnObjects(toReturn.ToArray(), UUID.Zero);
2227 }
2165 } 2228 }
2166 2229
2167 /// <summary> 2230 /// <summary>
@@ -2529,6 +2592,12 @@ namespace OpenSim.Region.Framework.Scenes
2529 /// <returns>True if the SceneObjectGroup was added, False if it was not</returns> 2592 /// <returns>True if the SceneObjectGroup was added, False if it was not</returns>
2530 public bool AddSceneObject(SceneObjectGroup sceneObject) 2593 public bool AddSceneObject(SceneObjectGroup sceneObject)
2531 { 2594 {
2595 if (sceneObject.OwnerID == UUID.Zero)
2596 {
2597 m_log.ErrorFormat("[SCENE]: Owner ID for {0} was zero", sceneObject.UUID);
2598 return false;
2599 }
2600
2532 // If the user is banned, we won't let any of their objects 2601 // If the user is banned, we won't let any of their objects
2533 // enter. Period. 2602 // enter. Period.
2534 // 2603 //
@@ -2578,15 +2647,27 @@ namespace OpenSim.Region.Framework.Scenes
2578 if (AttachmentsModule != null) 2647 if (AttachmentsModule != null)
2579 AttachmentsModule.AttachObject(sp.ControllingClient, grp, 0, false); 2648 AttachmentsModule.AttachObject(sp.ControllingClient, grp, 0, false);
2580 2649
2650 m_log.DebugFormat("[SCENE]: Attachment {0} arrived and scene presence was found, attaching", sceneObject.UUID);
2581 } 2651 }
2582 else 2652 else
2583 { 2653 {
2654 m_log.DebugFormat("[SCENE]: Attachment {0} arrived and scene presence was not found, setting to temp", sceneObject.UUID);
2584 RootPrim.RemFlag(PrimFlags.TemporaryOnRez); 2655 RootPrim.RemFlag(PrimFlags.TemporaryOnRez);
2585 RootPrim.AddFlag(PrimFlags.TemporaryOnRez); 2656 RootPrim.AddFlag(PrimFlags.TemporaryOnRez);
2586 } 2657 }
2658 if (sceneObject.OwnerID == UUID.Zero)
2659 {
2660 m_log.ErrorFormat("[SCENE]: Owner ID for {0} was zero after attachment processing. BUG!", sceneObject.UUID);
2661 return false;
2662 }
2587 } 2663 }
2588 else 2664 else
2589 { 2665 {
2666 if (sceneObject.OwnerID == UUID.Zero)
2667 {
2668 m_log.ErrorFormat("[SCENE]: Owner ID for non-attachment {0} was zero", sceneObject.UUID);
2669 return false;
2670 }
2590 AddRestoredSceneObject(sceneObject, true, false); 2671 AddRestoredSceneObject(sceneObject, true, false);
2591 2672
2592 if (!Permissions.CanObjectEntry(sceneObject.UUID, 2673 if (!Permissions.CanObjectEntry(sceneObject.UUID,
@@ -2861,6 +2942,7 @@ namespace OpenSim.Region.Framework.Scenes
2861 client.OnFetchInventory += HandleFetchInventory; 2942 client.OnFetchInventory += HandleFetchInventory;
2862 client.OnUpdateInventoryItem += UpdateInventoryItemAsset; 2943 client.OnUpdateInventoryItem += UpdateInventoryItemAsset;
2863 client.OnCopyInventoryItem += CopyInventoryItem; 2944 client.OnCopyInventoryItem += CopyInventoryItem;
2945 client.OnMoveItemsAndLeaveCopy += MoveInventoryItemsLeaveCopy;
2864 client.OnMoveInventoryItem += MoveInventoryItem; 2946 client.OnMoveInventoryItem += MoveInventoryItem;
2865 client.OnRemoveInventoryItem += RemoveInventoryItem; 2947 client.OnRemoveInventoryItem += RemoveInventoryItem;
2866 client.OnRemoveInventoryFolder += RemoveInventoryFolder; 2948 client.OnRemoveInventoryFolder += RemoveInventoryFolder;
@@ -3148,6 +3230,16 @@ namespace OpenSim.Region.Framework.Scenes
3148 /// <param name="flags"></param> 3230 /// <param name="flags"></param>
3149 public virtual void SetHomeRezPoint(IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags) 3231 public virtual void SetHomeRezPoint(IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags)
3150 { 3232 {
3233 //Add half the avatar's height so that the user doesn't fall through prims
3234 ScenePresence presence;
3235 if (TryGetScenePresence(remoteClient.AgentId, out presence))
3236 {
3237 if (presence.Appearance != null)
3238 {
3239 position.Z = position.Z + (presence.Appearance.AvatarHeight / 2);
3240 }
3241 }
3242
3151 if (GridUserService != null && GridUserService.SetHome(remoteClient.AgentId.ToString(), RegionInfo.RegionID, position, lookAt)) 3243 if (GridUserService != null && GridUserService.SetHome(remoteClient.AgentId.ToString(), RegionInfo.RegionID, position, lookAt))
3152 // FUBAR ALERT: this needs to be "Home position set." so the viewer saves a home-screenshot. 3244 // FUBAR ALERT: this needs to be "Home position set." so the viewer saves a home-screenshot.
3153 m_dialogModule.SendAlertToUser(remoteClient, "Home position set."); 3245 m_dialogModule.SendAlertToUser(remoteClient, "Home position set.");
@@ -3421,7 +3513,8 @@ namespace OpenSim.Region.Framework.Scenes
3421 if (tp == TeleportFlags.ViaLogin) 3513 if (tp == TeleportFlags.ViaLogin)
3422 { 3514 {
3423 if (land != null && !TestLandRestrictions(agent, land, out reason)) 3515 if (land != null && !TestLandRestrictions(agent, land, out reason))
3424 { 3516 {
3517 m_log.DebugFormat("[CONNECTION BEGIN]: Denying access to {0} due to no land access", agent.AgentID.ToString());
3425 return false; 3518 return false;
3426 } 3519 }
3427 } 3520 }
@@ -3535,6 +3628,8 @@ namespace OpenSim.Region.Framework.Scenes
3535 } 3628 }
3536 } 3629 }
3537 // Honor parcel landing type and position. 3630 // Honor parcel landing type and position.
3631 /*
3632 ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);
3538 if (land != null) 3633 if (land != null)
3539 { 3634 {
3540 if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero) 3635 if (land.LandData.LandingType == (byte)1 && land.LandData.UserLocation != Vector3.Zero)
@@ -3542,6 +3637,7 @@ namespace OpenSim.Region.Framework.Scenes
3542 agent.startpos = land.LandData.UserLocation; 3637 agent.startpos = land.LandData.UserLocation;
3543 } 3638 }
3544 } 3639 }
3640 */// This is now handled properly in ScenePresence.MakeRootAgent
3545 } 3641 }
3546 3642
3547 return true; 3643 return true;
@@ -3904,12 +4000,22 @@ namespace OpenSim.Region.Framework.Scenes
3904 return false; 4000 return false;
3905 } 4001 }
3906 4002
4003 public bool IncomingCloseAgent(UUID agentID)
4004 {
4005 return IncomingCloseAgent(agentID, false);
4006 }
4007
4008 public bool IncomingCloseChildAgent(UUID agentID)
4009 {
4010 return IncomingCloseAgent(agentID, true);
4011 }
4012
3907 /// <summary> 4013 /// <summary>
3908 /// Tell a single agent to disconnect from the region. 4014 /// Tell a single agent to disconnect from the region.
3909 /// </summary> 4015 /// </summary>
3910 /// <param name="regionHandle"></param>
3911 /// <param name="agentID"></param> 4016 /// <param name="agentID"></param>
3912 public bool IncomingCloseAgent(UUID agentID) 4017 /// <param name="childOnly"></param>
4018 public bool IncomingCloseAgent(UUID agentID, bool childOnly)
3913 { 4019 {
3914 //m_log.DebugFormat("[SCENE]: Processing incoming close agent for {0}", agentID); 4020 //m_log.DebugFormat("[SCENE]: Processing incoming close agent for {0}", agentID);
3915 4021
@@ -3921,7 +4027,7 @@ namespace OpenSim.Region.Framework.Scenes
3921 { 4027 {
3922 m_sceneGraph.removeUserCount(false); 4028 m_sceneGraph.removeUserCount(false);
3923 } 4029 }
3924 else 4030 else if (!childOnly)
3925 { 4031 {
3926 m_sceneGraph.removeUserCount(true); 4032 m_sceneGraph.removeUserCount(true);
3927 } 4033 }
@@ -3937,9 +4043,12 @@ namespace OpenSim.Region.Framework.Scenes
3937 } 4043 }
3938 else 4044 else
3939 presence.ControllingClient.SendShutdownConnectionNotice(); 4045 presence.ControllingClient.SendShutdownConnectionNotice();
4046 presence.ControllingClient.Close(false);
4047 }
4048 else if (!childOnly)
4049 {
4050 presence.ControllingClient.Close(true);
3940 } 4051 }
3941
3942 presence.ControllingClient.Close();
3943 return true; 4052 return true;
3944 } 4053 }
3945 4054
@@ -5243,4 +5352,4 @@ namespace OpenSim.Region.Framework.Scenes
5243 return offsets.ToArray(); 5352 return offsets.ToArray();
5244 } 5353 }
5245 } 5354 }
5246} \ No newline at end of file 5355}