aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
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
parentAnd another merge issue (diff)
parentFix loading modules with alternate configurations and ports into ROBUST. (diff)
downloadopensim-SC-07df0e0ab0c69633a6afec8d05cccc117656d3d9.zip
opensim-SC-07df0e0ab0c69633a6afec8d05cccc117656d3d9.tar.gz
opensim-SC-07df0e0ab0c69633a6afec8d05cccc117656d3d9.tar.bz2
opensim-SC-07df0e0ab0c69633a6afec8d05cccc117656d3d9.tar.xz
Merge branch '0.6.7-post-fixes' into vehicles
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Hypergrid/HGAssetMapper.cs17
-rw-r--r--OpenSim/Region/Framework/Scenes/Hypergrid/HGSceneCommunicationService.cs10
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs9
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs7
4 files changed, 30 insertions, 13 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 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 {
diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
index 204c319..5f2333e 100644
--- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs
@@ -63,6 +63,13 @@ namespace OpenSim.Region.Framework.Scenes
63 63
64 protected List<UUID> m_agentsInTransit; 64 protected List<UUID> m_agentsInTransit;
65 65
66 public bool RegionLoginsEnabled
67 {
68 get { return m_regionLoginsEnabled; }
69 set { m_regionLoginsEnabled = value; }
70 }
71 private bool m_regionLoginsEnabled = false;
72
66 /// <summary> 73 /// <summary>
67 /// An agent is crossing into this region 74 /// An agent is crossing into this region
68 /// </summary> 75 /// </summary>
@@ -1163,7 +1170,7 @@ namespace OpenSim.Region.Framework.Scenes
1163 } 1170 }
1164 } 1171 }
1165 1172
1166 private bool IsOutsideRegion(Scene s, Vector3 pos) 1173 protected bool IsOutsideRegion(Scene s, Vector3 pos)
1167 { 1174 {
1168 1175
1169 if (s.TestBorderCross(pos,Cardinals.N)) 1176 if (s.TestBorderCross(pos,Cardinals.N))
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 4bd10bd..a260653 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -245,6 +245,11 @@ namespace OpenSim.Region.Framework.Scenes
245 } 245 }
246 } 246 }
247 247
248 private bool IsAttachmentCheckFull()
249 {
250 return (IsAttachment || (m_rootPart.Shape.PCode == 9 && m_rootPart.Shape.State != 0));
251 }
252
248 /// <summary> 253 /// <summary>
249 /// The absolute position of this scene object in the scene 254 /// The absolute position of this scene object in the scene
250 /// </summary> 255 /// </summary>
@@ -257,7 +262,7 @@ namespace OpenSim.Region.Framework.Scenes
257 262
258 if ((m_scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E) || m_scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W) 263 if ((m_scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E) || m_scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W)
259 || m_scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N) || m_scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S)) 264 || m_scene.TestBorderCross(val - Vector3.UnitY, Cardinals.N) || m_scene.TestBorderCross(val + Vector3.UnitY, Cardinals.S))
260 && !IsAttachment) 265 && !IsAttachmentCheckFull())
261 { 266 {
262 m_scene.CrossPrimGroupIntoNewRegion(val, this, true); 267 m_scene.CrossPrimGroupIntoNewRegion(val, this, true);
263 } 268 }