aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Hypergrid
diff options
context:
space:
mode:
authorDiva Canto2009-09-26 07:49:04 -0700
committerDiva Canto2009-09-26 07:49:04 -0700
commit7253a9453e25560396e4f8c25402012b840ed0c4 (patch)
tree0291b369787f1dd136e75b1eedf752bfa19686cc /OpenSim/Region/Framework/Scenes/Hypergrid
parentFirst pass at the heart surgery for grid services. Compiles and runs minimall... (diff)
parentMerge branch 'master' of ssh://MyConnection/var/git/opensim (diff)
downloadopensim-SC-7253a9453e25560396e4f8c25402012b840ed0c4.zip
opensim-SC-7253a9453e25560396e4f8c25402012b840ed0c4.tar.gz
opensim-SC-7253a9453e25560396e4f8c25402012b840ed0c4.tar.bz2
opensim-SC-7253a9453e25560396e4f8c25402012b840ed0c4.tar.xz
Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Hypergrid')
-rw-r--r--OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs17
-rw-r--r--OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs10
2 files changed, 16 insertions, 11 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs
index 5d65f98..62efd60 100644
--- a/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs
+++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs
@@ -47,8 +47,7 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
47 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 47 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
48 48
49 // This maps between inventory server urls and inventory server clients 49 // This maps between inventory server urls and inventory server clients
50 private Dictionary<string, InventoryClient> m_inventoryServers = new Dictionary<string, InventoryClient>(); 50// private Dictionary<string, InventoryClient> m_inventoryServers = new Dictionary<string, InventoryClient>();
51
52 51
53 private Scene m_scene; 52 private Scene m_scene;
54 #endregion 53 #endregion
@@ -72,13 +71,13 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
72 return null; 71 return null;
73 } 72 }
74 73
75 private string UserInventoryURL(UUID userID) 74// private string UserInventoryURL(UUID userID)
76 { 75// {
77 CachedUserInfo uinfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(userID); 76// CachedUserInfo uinfo = m_scene.CommsManager.UserProfileCacheService.GetUserDetails(userID);
78 if (uinfo != null) 77// if (uinfo != null)
79 return (uinfo.UserProfile.UserInventoryURI == "") ? null : uinfo.UserProfile.UserInventoryURI; 78// return (uinfo.UserProfile.UserInventoryURI == "") ? null : uinfo.UserProfile.UserInventoryURI;
80 return null; 79// return null;
81 } 80// }
82 81
83 private bool IsLocalUser(UUID userID) 82 private bool IsLocalUser(UUID userID)
84 { 83 {
diff --git a/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs
index e8e5e78..ee5eb90 100644
--- a/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs
@@ -78,7 +78,7 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
78 if (regionHandle == m_regionInfo.RegionHandle) 78 if (regionHandle == m_regionInfo.RegionHandle)
79 { 79 {
80 // Teleport within the same region 80 // Teleport within the same region
81 if (position.X < 0 || position.X > Constants.RegionSize || position.Y < 0 || position.Y > Constants.RegionSize || position.Z < 0) 81 if (IsOutsideRegion(avatar.Scene, position) || position.Z < 0)
82 { 82 {
83 Vector3 emergencyPos = new Vector3(128, 128, 128); 83 Vector3 emergencyPos = new Vector3(128, 128, 128);
84 84
@@ -90,7 +90,13 @@ namespace OpenSim.Region.Framework.Scenes.Hypergrid
90 // TODO: Get proper AVG Height 90 // TODO: Get proper AVG Height
91 float localAVHeight = 1.56f; 91 float localAVHeight = 1.56f;
92 92
93 float posZLimit = (float)avatar.Scene.Heightmap[(int)position.X, (int)position.Y]; 93 float posZLimit = 22;
94
95 if (position.X > 0 && position.X <= (int)Constants.RegionSize && position.Y > 0 && position.Y <= (int)Constants.RegionSize)
96 {
97 posZLimit = (float) avatar.Scene.Heightmap[(int) position.X, (int) position.Y];
98 }
99
94 float newPosZ = posZLimit + localAVHeight; 100 float newPosZ = posZLimit + localAVHeight;
95 if (posZLimit >= (position.Z - (localAVHeight / 2)) && !(Single.IsInfinity(newPosZ) || Single.IsNaN(newPosZ))) 101 if (posZLimit >= (position.Z - (localAVHeight / 2)) && !(Single.IsInfinity(newPosZ) || Single.IsNaN(newPosZ)))
96 { 102 {