aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorBlueWall2012-01-23 14:53:25 -0500
committerBlueWall2012-01-23 14:53:25 -0500
commit6a85abbd14f36f9d1f1035820730f3e8cd395987 (patch)
treea582758ce528fc7cd8a13c70f15e992ddc7b10af
parentCleanup (diff)
downloadopensim-SC_OLD-6a85abbd14f36f9d1f1035820730f3e8cd395987.zip
opensim-SC_OLD-6a85abbd14f36f9d1f1035820730f3e8cd395987.tar.gz
opensim-SC_OLD-6a85abbd14f36f9d1f1035820730f3e8cd395987.tar.bz2
opensim-SC_OLD-6a85abbd14f36f9d1f1035820730f3e8cd395987.tar.xz
Add update to Telehub position and rotation before adding SpawnPoints
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/TelehubManager.cs15
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);