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.cs92
1 files changed, 47 insertions, 45 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index a9a4cda..ff2c46f 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -103,6 +103,7 @@ namespace OpenSim.Region.Framework.Scenes
103 public bool m_trustBinaries; 103 public bool m_trustBinaries;
104 public bool m_allowScriptCrossings; 104 public bool m_allowScriptCrossings;
105 public bool m_useFlySlow; 105 public bool m_useFlySlow;
106 public bool m_useTrashOnDelete = true;
106 107
107 /// <summary> 108 /// <summary>
108 /// Temporarily setting to trigger appearance resends at 60 second intervals. 109 /// Temporarily setting to trigger appearance resends at 60 second intervals.
@@ -458,6 +459,7 @@ namespace OpenSim.Region.Framework.Scenes
458 { 459 {
459 if (m_simulationService == null) 460 if (m_simulationService == null)
460 m_simulationService = RequestModuleInterface<ISimulationService>(); 461 m_simulationService = RequestModuleInterface<ISimulationService>();
462
461 return m_simulationService; 463 return m_simulationService;
462 } 464 }
463 } 465 }
@@ -735,6 +737,7 @@ namespace OpenSim.Region.Framework.Scenes
735 m_clampPrimSize = true; 737 m_clampPrimSize = true;
736 } 738 }
737 739
740 m_useTrashOnDelete = startupConfig.GetBoolean("UseTrashOnDelete",m_useTrashOnDelete);
738 m_trustBinaries = startupConfig.GetBoolean("TrustBinaries", m_trustBinaries); 741 m_trustBinaries = startupConfig.GetBoolean("TrustBinaries", m_trustBinaries);
739 m_allowScriptCrossings = startupConfig.GetBoolean("AllowScriptCrossing", m_allowScriptCrossings); 742 m_allowScriptCrossings = startupConfig.GetBoolean("AllowScriptCrossing", m_allowScriptCrossings);
740 m_dontPersistBefore = 743 m_dontPersistBefore =
@@ -833,13 +836,11 @@ namespace OpenSim.Region.Framework.Scenes
833 StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats; 836 StatsReporter.OnStatsIncorrect += m_sceneGraph.RecalculateStats;
834 } 837 }
835 838
836 /// <summary>
837 /// Mock constructor for scene group persistency unit tests.
838 /// SceneObjectGroup RegionId property is delegated to Scene.
839 /// </summary>
840 /// <param name="regInfo"></param>
841 public Scene(RegionInfo regInfo) 839 public Scene(RegionInfo regInfo)
842 { 840 {
841 PhysicalPrims = true;
842 CollidablePrims = true;
843
843 BordersLocked = true; 844 BordersLocked = true;
844 Border northBorder = new Border(); 845 Border northBorder = new Border();
845 northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize); //<--- 846 northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize); //<---
@@ -866,8 +867,6 @@ namespace OpenSim.Region.Framework.Scenes
866 m_eventManager = new EventManager(); 867 m_eventManager = new EventManager();
867 868
868 m_permissions = new ScenePermissions(this); 869 m_permissions = new ScenePermissions(this);
869
870// m_lastUpdate = Util.EnvironmentTickCount();
871 } 870 }
872 871
873 #endregion 872 #endregion
@@ -3382,8 +3381,8 @@ namespace OpenSim.Region.Framework.Scenes
3382 try 3381 try
3383 { 3382 {
3384 m_log.DebugFormat( 3383 m_log.DebugFormat(
3385 "[SCENE]: Removing {0} agent {1} from region {2}", 3384 "[SCENE]: Removing {0} agent {1} {2} from region {3}",
3386 (isChildAgent ? "child" : "root"), agentID, RegionInfo.RegionName); 3385 (isChildAgent ? "child" : "root"), avatar.Name, agentID, RegionInfo.RegionName);
3387 3386
3388 m_sceneGraph.removeUserCount(!isChildAgent); 3387 m_sceneGraph.removeUserCount(!isChildAgent);
3389 3388
@@ -3981,41 +3980,41 @@ namespace OpenSim.Region.Framework.Scenes
3981 return m_authenticateHandler.TryChangeCiruitCode(oldcc, newcc); 3980 return m_authenticateHandler.TryChangeCiruitCode(oldcc, newcc);
3982 } 3981 }
3983 3982
3984 /// <summary> 3983// /// <summary>
3985 /// The Grid has requested that we log-off a user. Log them off. 3984// /// The Grid has requested that we log-off a user. Log them off.
3986 /// </summary> 3985// /// </summary>
3987 /// <param name="AvatarID">Unique ID of the avatar to log-off</param> 3986// /// <param name="AvatarID">Unique ID of the avatar to log-off</param>
3988 /// <param name="RegionSecret">SecureSessionID of the user, or the RegionSecret text when logging on to the grid</param> 3987// /// <param name="RegionSecret">SecureSessionID of the user, or the RegionSecret text when logging on to the grid</param>
3989 /// <param name="message">message to display to the user. Reason for being logged off</param> 3988// /// <param name="message">message to display to the user. Reason for being logged off</param>
3990 public void HandleLogOffUserFromGrid(UUID AvatarID, UUID RegionSecret, string message) 3989// public void HandleLogOffUserFromGrid(UUID AvatarID, UUID RegionSecret, string message)
3991 { 3990// {
3992 ScenePresence loggingOffUser = GetScenePresence(AvatarID); 3991// ScenePresence loggingOffUser = GetScenePresence(AvatarID);
3993 if (loggingOffUser != null) 3992// if (loggingOffUser != null)
3994 { 3993// {
3995 UUID localRegionSecret = UUID.Zero; 3994// UUID localRegionSecret = UUID.Zero;
3996 bool parsedsecret = UUID.TryParse(m_regInfo.regionSecret, out localRegionSecret); 3995// bool parsedsecret = UUID.TryParse(m_regInfo.regionSecret, out localRegionSecret);
3997 3996//
3998 // Region Secret is used here in case a new sessionid overwrites an old one on the user server. 3997// // Region Secret is used here in case a new sessionid overwrites an old one on the user server.
3999 // Will update the user server in a few revisions to use it. 3998// // Will update the user server in a few revisions to use it.
4000 3999//
4001 if (RegionSecret == loggingOffUser.ControllingClient.SecureSessionId || (parsedsecret && RegionSecret == localRegionSecret)) 4000// if (RegionSecret == loggingOffUser.ControllingClient.SecureSessionId || (parsedsecret && RegionSecret == localRegionSecret))
4002 { 4001// {
4003 m_sceneGridService.SendCloseChildAgentConnections(loggingOffUser.UUID, loggingOffUser.KnownRegionHandles); 4002// m_sceneGridService.SendCloseChildAgentConnections(loggingOffUser.UUID, loggingOffUser.KnownRegionHandles);
4004 loggingOffUser.ControllingClient.Kick(message); 4003// loggingOffUser.ControllingClient.Kick(message);
4005 // Give them a second to receive the message! 4004// // Give them a second to receive the message!
4006 Thread.Sleep(1000); 4005// Thread.Sleep(1000);
4007 loggingOffUser.ControllingClient.Close(); 4006// loggingOffUser.ControllingClient.Close();
4008 } 4007// }
4009 else 4008// else
4010 { 4009// {
4011 m_log.Info("[USERLOGOFF]: System sending the LogOff user message failed to sucessfully authenticate"); 4010// m_log.Info("[USERLOGOFF]: System sending the LogOff user message failed to sucessfully authenticate");
4012 } 4011// }
4013 } 4012// }
4014 else 4013// else
4015 { 4014// {
4016 m_log.InfoFormat("[USERLOGOFF]: Got a logoff request for {0} but the user isn't here. The user might already have been logged out", AvatarID.ToString()); 4015// m_log.InfoFormat("[USERLOGOFF]: Got a logoff request for {0} but the user isn't here. The user might already have been logged out", AvatarID.ToString());
4017 } 4016// }
4018 } 4017// }
4019 4018
4020 /// <summary> 4019 /// <summary>
4021 /// Triggered when an agent crosses into this sim. Also happens on initial login. 4020 /// Triggered when an agent crosses into this sim. Also happens on initial login.
@@ -4071,7 +4070,10 @@ namespace OpenSim.Region.Framework.Scenes
4071 ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID, Constants.RegionSize / 2, Constants.RegionSize / 2); 4070 ILandObject nearestParcel = GetNearestAllowedParcel(cAgentData.AgentID, Constants.RegionSize / 2, Constants.RegionSize / 2);
4072 if (nearestParcel == null) 4071 if (nearestParcel == null)
4073 { 4072 {
4074 m_log.DebugFormat("[SCENE]: Denying root agent entry to {0}: no allowed parcel", cAgentData.AgentID); 4073 m_log.DebugFormat(
4074 "[SCENE]: Denying root agent entry to {0} in {1}: no allowed parcel",
4075 cAgentData.AgentID, RegionInfo.RegionName);
4076
4075 return false; 4077 return false;
4076 } 4078 }
4077 4079