aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorMelanie2014-01-28 21:02:20 +0000
committerMelanie2014-01-28 21:02:20 +0000
commitc6e9db58669d773c85041db99b19b942f70324f7 (patch)
tree99f69fb669332cff69a45ce6f7473aed6d965a0d /OpenSim/Region/Framework/Scenes/Scene.cs
parentMerge branch 'master' into careminster (diff)
parentMerge branch 'justincc-master' (diff)
downloadopensim-SC_OLD-c6e9db58669d773c85041db99b19b942f70324f7.zip
opensim-SC_OLD-c6e9db58669d773c85041db99b19b942f70324f7.tar.gz
opensim-SC_OLD-c6e9db58669d773c85041db99b19b942f70324f7.tar.bz2
opensim-SC_OLD-c6e9db58669d773c85041db99b19b942f70324f7.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Framework/RegionSettings.cs OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs OpenSim/Region/Framework/Interfaces/IInterregionComms.cs OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs62
1 files changed, 35 insertions, 27 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 3fd7485..55766cf 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4121,32 +4121,52 @@ namespace OpenSim.Region.Framework.Scenes
4121 } 4121 }
4122 } 4122 }
4123 4123
4124// m_log.DebugFormat(
4125// "[SCENE]: Found telehub object {0} for new user connection {1} to {2}",
4126// RegionInfo.RegionSettings.TelehubObject, acd.Name, Name);
4127
4124 // Honor Estate teleport routing via Telehubs excluding ViaHome and GodLike TeleportFlags 4128 // Honor Estate teleport routing via Telehubs excluding ViaHome and GodLike TeleportFlags
4125 if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && 4129 if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero &&
4126 RegionInfo.EstateSettings.AllowDirectTeleport == false && 4130 RegionInfo.EstateSettings.AllowDirectTeleport == false &&
4127 !viahome && !godlike) 4131 !viahome && !godlike)
4128 { 4132 {
4129 SceneObjectGroup telehub = GetSceneObjectGroup(RegionInfo.RegionSettings.TelehubObject); 4133 SceneObjectGroup telehub = GetSceneObjectGroup(RegionInfo.RegionSettings.TelehubObject);
4130 // Can have multiple SpawnPoints 4134
4131 List<SpawnPoint> spawnpoints = RegionInfo.RegionSettings.SpawnPoints(); 4135 if (telehub != null)
4132 if (spawnpoints.Count > 1)
4133 { 4136 {
4134 // We have multiple SpawnPoints, Route the agent to a random or sequential one 4137 // Can have multiple SpawnPoints
4135 if (SpawnPointRouting == "random") 4138 List<SpawnPoint> spawnpoints = RegionInfo.RegionSettings.SpawnPoints();
4136 acd.startpos = spawnpoints[Util.RandomClass.Next(spawnpoints.Count) - 1].GetLocation( 4139 if (spawnpoints.Count > 1)
4137 telehub.AbsolutePosition, 4140 {
4138 telehub.GroupRotation 4141 // We have multiple SpawnPoints, Route the agent to a random or sequential one
4139 ); 4142 if (SpawnPointRouting == "random")
4143 acd.startpos = spawnpoints[Util.RandomClass.Next(spawnpoints.Count) - 1].GetLocation(
4144 telehub.AbsolutePosition,
4145 telehub.GroupRotation
4146 );
4147 else
4148 acd.startpos = spawnpoints[SpawnPoint()].GetLocation(
4149 telehub.AbsolutePosition,
4150 telehub.GroupRotation
4151 );
4152 }
4153 else if (spawnpoints.Count == 1)
4154 {
4155 // We have a single SpawnPoint and will route the agent to it
4156 acd.startpos = spawnpoints[0].GetLocation(telehub.AbsolutePosition, telehub.GroupRotation);
4157 }
4140 else 4158 else
4141 acd.startpos = spawnpoints[SpawnPoint()].GetLocation( 4159 {
4142 telehub.AbsolutePosition, 4160 m_log.DebugFormat(
4143 telehub.GroupRotation 4161 "[SCENE]: No spawnpoints defined for telehub {0} for {1} in {2}. Continuing.",
4144 ); 4162 RegionInfo.RegionSettings.TelehubObject, acd.Name, Name);
4163 }
4145 } 4164 }
4146 else 4165 else
4147 { 4166 {
4148 // We have a single SpawnPoint and will route the agent to it 4167 m_log.DebugFormat(
4149 acd.startpos = spawnpoints[0].GetLocation(telehub.AbsolutePosition, telehub.GroupRotation); 4168 "[SCENE]: No telehub {0} found to direct {1} in {2}. Continuing.",
4169 RegionInfo.RegionSettings.TelehubObject, acd.Name, Name);
4150 } 4170 }
4151 4171
4152 return true; 4172 return true;
@@ -4593,18 +4613,6 @@ namespace OpenSim.Region.Framework.Scenes
4593 return sp; 4613 return sp;
4594 } 4614 }
4595 4615
4596 public virtual bool IncomingRetrieveRootAgent(UUID id, out IAgentData agent)
4597 {
4598 agent = null;
4599 ScenePresence sp = GetScenePresence(id);
4600 if ((sp != null) && (!sp.IsChildAgent))
4601 {
4602 sp.IsChildAgent = true;
4603 return sp.CopyAgent(out agent);
4604 }
4605
4606 return false;
4607 }
4608 /// <summary> 4616 /// <summary>
4609 /// Authenticated close (via network) 4617 /// Authenticated close (via network)
4610 /// </summary> 4618 /// </summary>