diff options
-rw-r--r-- | OpenSim/Region/CoreModules/World/Estate/TelehubManager.cs | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/TelehubManager.cs b/OpenSim/Region/CoreModules/World/Estate/TelehubManager.cs index 9b92df9..2d7d0ee 100644 --- a/OpenSim/Region/CoreModules/World/Estate/TelehubManager.cs +++ b/OpenSim/Region/CoreModules/World/Estate/TelehubManager.cs | |||
@@ -109,11 +109,18 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
109 | 109 | ||
110 | try | 110 | try |
111 | { | 111 | { |
112 | Vector3 thPos = m_Scene.RegionInfo.RegionSettings.TelehubPos; | 112 | // Need to update the position in case the Telehubn has been moved |
113 | Quaternion thRot = m_Scene.RegionInfo.RegionSettings.TelehubRot; | 113 | UUID TelehubID = m_Scene.RegionInfo.RegionSettings.TelehubObject; |
114 | SceneObjectPart part = m_Scene.GetSceneObjectPart(TelehubID); | ||
114 | 115 | ||
115 | float dist = (float) Util.GetDistanceTo(thPos, point); | 116 | Vector3 TelehubPos = part.AbsolutePosition; |
116 | Vector3 nvec = Util.GetNormalizedVector(point - thPos); | 117 | Quaternion TelehubRot = part.GetWorldRotation(); |
118 | |||
119 | m_Scene.RegionInfo.RegionSettings.TelehubPos = TelehubPos; | ||
120 | m_Scene.RegionInfo.RegionSettings.TelehubRot = TelehubRot; | ||
121 | |||
122 | float dist = (float) Util.GetDistanceTo(TelehubPos, point); | ||
123 | Vector3 nvec = Util.GetNormalizedVector(point - TelehubPos); | ||
117 | Vector3 spoint = nvec * dist; | 124 | Vector3 spoint = nvec * dist; |
118 | 125 | ||
119 | m_Scene.RegionInfo.RegionSettings.AddSpawnPoint(spoint); | 126 | m_Scene.RegionInfo.RegionSettings.AddSpawnPoint(spoint); |