diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 81 |
1 files changed, 56 insertions, 25 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index e3bd527..32c7262 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -77,7 +77,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
77 | public bool DebugUpdates { get; private set; } | 77 | public bool DebugUpdates { get; private set; } |
78 | 78 | ||
79 | public SynchronizeSceneHandler SynchronizeScene; | 79 | public SynchronizeSceneHandler SynchronizeScene; |
80 | public SimStatsReporter StatsReporter; | 80 | |
81 | /// <summary> | ||
82 | /// Statistical information for this scene. | ||
83 | /// </summary> | ||
84 | public SimStatsReporter StatsReporter { get; private set; } | ||
85 | |||
81 | public List<Border> NorthBorders = new List<Border>(); | 86 | public List<Border> NorthBorders = new List<Border>(); |
82 | public List<Border> EastBorders = new List<Border>(); | 87 | public List<Border> EastBorders = new List<Border>(); |
83 | public List<Border> SouthBorders = new List<Border>(); | 88 | public List<Border> SouthBorders = new List<Border>(); |
@@ -164,7 +169,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
164 | protected IConfigSource m_config; | 169 | protected IConfigSource m_config; |
165 | protected IRegionSerialiserModule m_serialiser; | 170 | protected IRegionSerialiserModule m_serialiser; |
166 | protected IDialogModule m_dialogModule; | 171 | protected IDialogModule m_dialogModule; |
167 | protected IEntityTransferModule m_teleportModule; | ||
168 | protected ICapabilitiesModule m_capsModule; | 172 | protected ICapabilitiesModule m_capsModule; |
169 | protected IGroupsModule m_groupsModule; | 173 | protected IGroupsModule m_groupsModule; |
170 | 174 | ||
@@ -515,6 +519,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
515 | } | 519 | } |
516 | 520 | ||
517 | public IAttachmentsModule AttachmentsModule { get; set; } | 521 | public IAttachmentsModule AttachmentsModule { get; set; } |
522 | public IEntityTransferModule EntityTransferModule { get; private set; } | ||
518 | 523 | ||
519 | public IAvatarFactoryModule AvatarFactory | 524 | public IAvatarFactoryModule AvatarFactory |
520 | { | 525 | { |
@@ -952,8 +957,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
952 | List<ulong> old = new List<ulong>(); | 957 | List<ulong> old = new List<ulong>(); |
953 | old.Add(otherRegion.RegionHandle); | 958 | old.Add(otherRegion.RegionHandle); |
954 | agent.DropOldNeighbours(old); | 959 | agent.DropOldNeighbours(old); |
955 | if (m_teleportModule != null && agent.PresenceType != PresenceType.Npc) | 960 | if (EntityTransferModule != null && agent.PresenceType != PresenceType.Npc) |
956 | m_teleportModule.EnableChildAgent(agent, otherRegion); | 961 | EntityTransferModule.EnableChildAgent(agent, otherRegion); |
957 | }); | 962 | }); |
958 | } | 963 | } |
959 | catch (NullReferenceException) | 964 | catch (NullReferenceException) |
@@ -1060,13 +1065,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1060 | } | 1065 | } |
1061 | } | 1066 | } |
1062 | 1067 | ||
1068 | m_log.Error("[REGION]: Closing"); | ||
1069 | Close(); | ||
1070 | |||
1063 | if (PhysicsScene != null) | 1071 | if (PhysicsScene != null) |
1064 | { | 1072 | { |
1065 | PhysicsScene.Dispose(); | 1073 | PhysicsScene.Dispose(); |
1066 | } | 1074 | } |
1067 | |||
1068 | m_log.Error("[REGION]: Closing"); | ||
1069 | Close(); | ||
1070 | 1075 | ||
1071 | m_log.Error("[REGION]: Firing Region Restart Message"); | 1076 | m_log.Error("[REGION]: Firing Region Restart Message"); |
1072 | 1077 | ||
@@ -1090,8 +1095,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1090 | { | 1095 | { |
1091 | ForEachRootScenePresence(delegate(ScenePresence agent) | 1096 | ForEachRootScenePresence(delegate(ScenePresence agent) |
1092 | { | 1097 | { |
1093 | if (m_teleportModule != null && agent.PresenceType != PresenceType.Npc) | 1098 | if (EntityTransferModule != null && agent.PresenceType != PresenceType.Npc) |
1094 | m_teleportModule.EnableChildAgent(agent, r); | 1099 | EntityTransferModule.EnableChildAgent(agent, r); |
1095 | }); | 1100 | }); |
1096 | } | 1101 | } |
1097 | catch (NullReferenceException) | 1102 | catch (NullReferenceException) |
@@ -1281,7 +1286,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1281 | m_serialiser = RequestModuleInterface<IRegionSerialiserModule>(); | 1286 | m_serialiser = RequestModuleInterface<IRegionSerialiserModule>(); |
1282 | m_dialogModule = RequestModuleInterface<IDialogModule>(); | 1287 | m_dialogModule = RequestModuleInterface<IDialogModule>(); |
1283 | m_capsModule = RequestModuleInterface<ICapabilitiesModule>(); | 1288 | m_capsModule = RequestModuleInterface<ICapabilitiesModule>(); |
1284 | m_teleportModule = RequestModuleInterface<IEntityTransferModule>(); | 1289 | EntityTransferModule = RequestModuleInterface<IEntityTransferModule>(); |
1285 | m_groupsModule = RequestModuleInterface<IGroupsModule>(); | 1290 | m_groupsModule = RequestModuleInterface<IGroupsModule>(); |
1286 | } | 1291 | } |
1287 | 1292 | ||
@@ -2380,8 +2385,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2380 | return; | 2385 | return; |
2381 | } | 2386 | } |
2382 | 2387 | ||
2383 | if (m_teleportModule != null) | 2388 | if (EntityTransferModule != null) |
2384 | m_teleportModule.Cross(grp, attemptedPosition, silent); | 2389 | EntityTransferModule.Cross(grp, attemptedPosition, silent); |
2385 | } | 2390 | } |
2386 | 2391 | ||
2387 | public Border GetCrossedBorder(Vector3 position, Cardinals gridline) | 2392 | public Border GetCrossedBorder(Vector3 position, Cardinals gridline) |
@@ -3225,8 +3230,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
3225 | /// <param name="client">The IClientAPI for the client</param> | 3230 | /// <param name="client">The IClientAPI for the client</param> |
3226 | public virtual bool TeleportClientHome(UUID agentId, IClientAPI client) | 3231 | public virtual bool TeleportClientHome(UUID agentId, IClientAPI client) |
3227 | { | 3232 | { |
3228 | if (m_teleportModule != null) | 3233 | if (EntityTransferModule != null) |
3229 | return m_teleportModule.TeleportHome(agentId, client); | 3234 | { |
3235 | EntityTransferModule.TeleportHome(agentId, client); | ||
3236 | } | ||
3230 | else | 3237 | else |
3231 | { | 3238 | { |
3232 | m_log.DebugFormat("[SCENE]: Unable to teleport user home: no AgentTransferModule is active"); | 3239 | m_log.DebugFormat("[SCENE]: Unable to teleport user home: no AgentTransferModule is active"); |
@@ -4332,8 +4339,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
4332 | position.Y -= shifty; | 4339 | position.Y -= shifty; |
4333 | } | 4340 | } |
4334 | 4341 | ||
4335 | if (m_teleportModule != null) | 4342 | if (EntityTransferModule != null) |
4336 | m_teleportModule.Teleport(sp, regionHandle, position, lookAt, teleportFlags); | 4343 | { |
4344 | EntityTransferModule.Teleport(sp, regionHandle, position, lookAt, teleportFlags); | ||
4345 | } | ||
4337 | else | 4346 | else |
4338 | { | 4347 | { |
4339 | m_log.DebugFormat("[SCENE]: Unable to perform teleports: no AgentTransferModule is active"); | 4348 | m_log.DebugFormat("[SCENE]: Unable to perform teleports: no AgentTransferModule is active"); |
@@ -4344,8 +4353,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
4344 | 4353 | ||
4345 | public bool CrossAgentToNewRegion(ScenePresence agent, bool isFlying) | 4354 | public bool CrossAgentToNewRegion(ScenePresence agent, bool isFlying) |
4346 | { | 4355 | { |
4347 | if (m_teleportModule != null) | 4356 | if (EntityTransferModule != null) |
4348 | return m_teleportModule.Cross(agent, isFlying); | 4357 | { |
4358 | return EntityTransferModule.Cross(agent, isFlying); | ||
4359 | } | ||
4349 | else | 4360 | else |
4350 | { | 4361 | { |
4351 | m_log.DebugFormat("[SCENE]: Unable to cross agent to neighbouring region, because there is no AgentTransferModule"); | 4362 | m_log.DebugFormat("[SCENE]: Unable to cross agent to neighbouring region, because there is no AgentTransferModule"); |
@@ -5493,16 +5504,36 @@ Environment.Exit(1); | |||
5493 | throw new Exception(error); | 5504 | throw new Exception(error); |
5494 | } | 5505 | } |
5495 | 5506 | ||
5496 | // This method is called across the simulation connector to | 5507 | /// <summary> |
5497 | // determine if a given agent is allowed in this region | 5508 | /// This method is called across the simulation connector to |
5498 | // AS A ROOT AGENT. Returning false here will prevent them | 5509 | /// determine if a given agent is allowed in this region |
5499 | // from logging into the region, teleporting into the region | 5510 | /// AS A ROOT AGENT |
5500 | // or corssing the broder walking, but will NOT prevent | 5511 | /// </summary> |
5501 | // child agent creation, thereby emulating the SL behavior. | 5512 | /// <remarks> |
5513 | /// Returning false here will prevent them | ||
5514 | /// from logging into the region, teleporting into the region | ||
5515 | /// or corssing the broder walking, but will NOT prevent | ||
5516 | /// child agent creation, thereby emulating the SL behavior. | ||
5517 | /// </remarks> | ||
5518 | /// <param name='agentID'></param> | ||
5519 | /// <param name='position'></param> | ||
5520 | /// <param name='reason'></param> | ||
5521 | /// <returns></returns> | ||
5502 | public bool QueryAccess(UUID agentID, Vector3 position, out string reason) | 5522 | public bool QueryAccess(UUID agentID, Vector3 position, out string reason) |
5503 | { | 5523 | { |
5504 | reason = "You are banned from the region"; | 5524 | reason = "You are banned from the region"; |
5505 | 5525 | ||
5526 | if (EntityTransferModule.IsInTransit(agentID)) | ||
5527 | { | ||
5528 | reason = "Agent is still in transit from this region"; | ||
5529 | |||
5530 | m_log.WarnFormat( | ||
5531 | "[SCENE]: Denying agent {0} entry into {1} since region still has them registered as in transit", | ||
5532 | agentID, RegionInfo.RegionName); | ||
5533 | |||
5534 | return false; | ||
5535 | } | ||
5536 | |||
5506 | if (Permissions.IsGod(agentID)) | 5537 | if (Permissions.IsGod(agentID)) |
5507 | { | 5538 | { |
5508 | reason = String.Empty; | 5539 | reason = String.Empty; |