diff options
author | Melanie | 2012-01-23 21:25:59 +0000 |
---|---|---|
committer | Melanie | 2012-01-23 21:25:59 +0000 |
commit | c36c916342460751d25350b66ffbd7eb0a401c2b (patch) | |
tree | 8c8a33ea70dcfff4c62d903bbfe7075550d7c1cf | |
parent | IMPORTANT!!!!! Please READ. DO NOT Use this version or any before it since the (diff) | |
parent | Merge branch 'master' of /home/opensim/var/repo/opensim into telehub (diff) | |
download | opensim-SC-c36c916342460751d25350b66ffbd7eb0a401c2b.zip opensim-SC-c36c916342460751d25350b66ffbd7eb0a401c2b.tar.gz opensim-SC-c36c916342460751d25350b66ffbd7eb0a401c2b.tar.bz2 opensim-SC-c36c916342460751d25350b66ffbd7eb0a401c2b.tar.xz |
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Diffstat (limited to '')
-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); |