diff options
author | Robert Adams | 2014-01-21 11:31:51 -0800 |
---|---|---|
committer | Robert Adams | 2014-01-21 11:31:51 -0800 |
commit | 4c362a83f9ce0b168ea96ba7dbd7ec012445ecff (patch) | |
tree | 7f03a860379fb2c6905d78a6616db762c86dd634 /OpenSim/Region/Framework/Scenes/Scene.cs | |
parent | varregion: remove debugging splat file saving that fills up the (diff) | |
parent | Adds a configuration option to cannibalize bandwidth from the (diff) | |
download | opensim-SC-4c362a83f9ce0b168ea96ba7dbd7ec012445ecff.zip opensim-SC-4c362a83f9ce0b168ea96ba7dbd7ec012445ecff.tar.gz opensim-SC-4c362a83f9ce0b168ea96ba7dbd7ec012445ecff.tar.bz2 opensim-SC-4c362a83f9ce0b168ea96ba7dbd7ec012445ecff.tar.xz |
Merge branch 'master' into varregion
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 50 |
1 files changed, 35 insertions, 15 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index aee621f..2f666c0 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3930,32 +3930,52 @@ namespace OpenSim.Region.Framework.Scenes | |||
3930 | } | 3930 | } |
3931 | } | 3931 | } |
3932 | 3932 | ||
3933 | // m_log.DebugFormat( | ||
3934 | // "[SCENE]: Found telehub object {0} for new user connection {1} to {2}", | ||
3935 | // RegionInfo.RegionSettings.TelehubObject, acd.Name, Name); | ||
3936 | |||
3933 | // Honor Estate teleport routing via Telehubs excluding ViaHome and GodLike TeleportFlags | 3937 | // Honor Estate teleport routing via Telehubs excluding ViaHome and GodLike TeleportFlags |
3934 | if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && | 3938 | if (RegionInfo.RegionSettings.TelehubObject != UUID.Zero && |
3935 | RegionInfo.EstateSettings.AllowDirectTeleport == false && | 3939 | RegionInfo.EstateSettings.AllowDirectTeleport == false && |
3936 | !viahome && !godlike) | 3940 | !viahome && !godlike) |
3937 | { | 3941 | { |
3938 | SceneObjectGroup telehub = GetSceneObjectGroup(RegionInfo.RegionSettings.TelehubObject); | 3942 | SceneObjectGroup telehub = GetSceneObjectGroup(RegionInfo.RegionSettings.TelehubObject); |
3939 | // Can have multiple SpawnPoints | 3943 | |
3940 | List<SpawnPoint> spawnpoints = RegionInfo.RegionSettings.SpawnPoints(); | 3944 | if (telehub != null) |
3941 | if (spawnpoints.Count > 1) | ||
3942 | { | 3945 | { |
3943 | // We have multiple SpawnPoints, Route the agent to a random or sequential one | 3946 | // Can have multiple SpawnPoints |
3944 | if (SpawnPointRouting == "random") | 3947 | List<SpawnPoint> spawnpoints = RegionInfo.RegionSettings.SpawnPoints(); |
3945 | acd.startpos = spawnpoints[Util.RandomClass.Next(spawnpoints.Count) - 1].GetLocation( | 3948 | if (spawnpoints.Count > 1) |
3946 | telehub.AbsolutePosition, | 3949 | { |
3947 | telehub.GroupRotation | 3950 | // We have multiple SpawnPoints, Route the agent to a random or sequential one |
3948 | ); | 3951 | if (SpawnPointRouting == "random") |
3952 | acd.startpos = spawnpoints[Util.RandomClass.Next(spawnpoints.Count) - 1].GetLocation( | ||
3953 | telehub.AbsolutePosition, | ||
3954 | telehub.GroupRotation | ||
3955 | ); | ||
3956 | else | ||
3957 | acd.startpos = spawnpoints[SpawnPoint()].GetLocation( | ||
3958 | telehub.AbsolutePosition, | ||
3959 | telehub.GroupRotation | ||
3960 | ); | ||
3961 | } | ||
3962 | else if (spawnpoints.Count == 1) | ||
3963 | { | ||
3964 | // We have a single SpawnPoint and will route the agent to it | ||
3965 | acd.startpos = spawnpoints[0].GetLocation(telehub.AbsolutePosition, telehub.GroupRotation); | ||
3966 | } | ||
3949 | else | 3967 | else |
3950 | acd.startpos = spawnpoints[SpawnPoint()].GetLocation( | 3968 | { |
3951 | telehub.AbsolutePosition, | 3969 | m_log.DebugFormat( |
3952 | telehub.GroupRotation | 3970 | "[SCENE]: No spawnpoints defined for telehub {0} for {1} in {2}. Continuing.", |
3953 | ); | 3971 | RegionInfo.RegionSettings.TelehubObject, acd.Name, Name); |
3972 | } | ||
3954 | } | 3973 | } |
3955 | else | 3974 | else |
3956 | { | 3975 | { |
3957 | // We have a single SpawnPoint and will route the agent to it | 3976 | m_log.DebugFormat( |
3958 | acd.startpos = spawnpoints[0].GetLocation(telehub.AbsolutePosition, telehub.GroupRotation); | 3977 | "[SCENE]: No telehub {0} found to direct {1} in {2}. Continuing.", |
3978 | RegionInfo.RegionSettings.TelehubObject, acd.Name, Name); | ||
3959 | } | 3979 | } |
3960 | 3980 | ||
3961 | return true; | 3981 | return true; |