aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs
diff options
context:
space:
mode:
authorKitto Flora2009-09-30 19:07:18 +0200
committerKitto Flora2009-09-30 19:07:18 +0200
commit07df0e0ab0c69633a6afec8d05cccc117656d3d9 (patch)
tree3048cc38b313e255cbf03fa3e2900e28cadc47c9 /OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs
parentAnd another merge issue (diff)
parentFix loading modules with alternate configurations and ports into ROBUST. (diff)
downloadopensim-SC_OLD-07df0e0ab0c69633a6afec8d05cccc117656d3d9.zip
opensim-SC_OLD-07df0e0ab0c69633a6afec8d05cccc117656d3d9.tar.gz
opensim-SC_OLD-07df0e0ab0c69633a6afec8d05cccc117656d3d9.tar.bz2
opensim-SC_OLD-07df0e0ab0c69633a6afec8d05cccc117656d3d9.tar.xz
Merge branch '0.6.7-post-fixes' into vehicles
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs
index 5c99d73..efc644d 100644
--- a/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs
@@ -77,7 +77,7 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
77 if (regionHandle == m_regionInfo.RegionHandle) 77 if (regionHandle == m_regionInfo.RegionHandle)
78 { 78 {
79 // Teleport within the same region 79 // Teleport within the same region
80 if (position.X < 0 || position.X > Constants.RegionSize || position.Y < 0 || position.Y > Constants.RegionSize || position.Z < 0) 80 if (IsOutsideRegion(avatar.Scene, position) || position.Z < 0)
81 { 81 {
82 Vector3 emergencyPos = new Vector3(128, 128, 128); 82 Vector3 emergencyPos = new Vector3(128, 128, 128);
83 83
@@ -89,7 +89,13 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
89 // TODO: Get proper AVG Height 89 // TODO: Get proper AVG Height
90 float localAVHeight = 1.56f; 90 float localAVHeight = 1.56f;
91 91
92 float posZLimit = (float)avatar.Scene.Heightmap[(int)position.X, (int)position.Y]; 92 float posZLimit = 22;
93
94 if (position.X > 0 && position.X <= (int)Constants.RegionSize && position.Y > 0 && position.Y <= (int)Constants.RegionSize)
95 {
96 posZLimit = (float) avatar.Scene.Heightmap[(int) position.X, (int) position.Y];
97 }
98
93 float newPosZ = posZLimit + localAVHeight; 99 float newPosZ = posZLimit + localAVHeight;
94 if (posZLimit >= (position.Z - (localAVHeight / 2)) && !(Single.IsInfinity(newPosZ) || Single.IsNaN(newPosZ))) 100 if (posZLimit >= (position.Z - (localAVHeight / 2)) && !(Single.IsInfinity(newPosZ) || Single.IsNaN(newPosZ)))
95 { 101 {