aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/Land/LandServicesConnector.cs
diff options
context:
space:
mode:
authoronefang2019-09-11 16:36:50 +1000
committeronefang2019-09-11 16:36:50 +1000
commit50cd1ffd32f69228e566f2b0b89f86ea0d9fe489 (patch)
tree52f2ab0c04f1a5d7d6ac5dc872981b4b156447e7 /OpenSim/Services/Connectors/Land/LandServicesConnector.cs
parentRenamed branch to SledjChisl. (diff)
parentBump to release flavour, build 0. (diff)
downloadopensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.zip
opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.gz
opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.bz2
opensim-SC_OLD-50cd1ffd32f69228e566f2b0b89f86ea0d9fe489.tar.xz
Merge branch 'SledjChisl'
Diffstat (limited to 'OpenSim/Services/Connectors/Land/LandServicesConnector.cs')
-rw-r--r--OpenSim/Services/Connectors/Land/LandServicesConnector.cs29
1 files changed, 20 insertions, 9 deletions
diff --git a/OpenSim/Services/Connectors/Land/LandServicesConnector.cs b/OpenSim/Services/Connectors/Land/LandServicesConnector.cs
index 034c42e..5492e83 100644
--- a/OpenSim/Services/Connectors/Land/LandServicesConnector.cs
+++ b/OpenSim/Services/Connectors/Land/LandServicesConnector.cs
@@ -66,22 +66,31 @@ namespace OpenSim.Services.Connectors
66 public virtual LandData GetLandData(UUID scopeID, ulong regionHandle, uint x, uint y, out byte regionAccess) 66 public virtual LandData GetLandData(UUID scopeID, ulong regionHandle, uint x, uint y, out byte regionAccess)
67 { 67 {
68 LandData landData = null; 68 LandData landData = null;
69 Hashtable hash = new Hashtable();
70 hash["region_handle"] = regionHandle.ToString();
71 hash["x"] = x.ToString();
72 hash["y"] = y.ToString();
73 69
74 IList paramList = new ArrayList(); 70 IList paramList = new ArrayList();
75 paramList.Add(hash);
76 regionAccess = 42; // Default to adult. Better safe... 71 regionAccess = 42; // Default to adult. Better safe...
77 72
78 try 73 try
79 { 74 {
80 uint xpos = 0, ypos = 0; 75 uint xpos = 0, ypos = 0;
81 Util.RegionHandleToWorldLoc(regionHandle, out xpos, out ypos); 76 Util.RegionHandleToWorldLoc(regionHandle, out xpos, out ypos);
77
82 GridRegion info = m_GridService.GetRegionByPosition(scopeID, (int)xpos, (int)ypos); 78 GridRegion info = m_GridService.GetRegionByPosition(scopeID, (int)xpos, (int)ypos);
83 if (info != null) // just to be sure 79 if (info != null) // just to be sure
84 { 80 {
81 string targetHandlestr = info.RegionHandle.ToString();
82 if( ypos == 0 ) //HG proxy?
83 {
84 // this is real region handle on hg proxies hack
85 targetHandlestr = info.RegionSecret;
86 }
87
88 Hashtable hash = new Hashtable();
89 hash["region_handle"] = targetHandlestr;
90 hash["x"] = x.ToString();
91 hash["y"] = y.ToString();
92 paramList.Add(hash);
93
85 XmlRpcRequest request = new XmlRpcRequest("land_data", paramList); 94 XmlRpcRequest request = new XmlRpcRequest("land_data", paramList);
86 XmlRpcResponse response = request.Send(info.ServerURI, 10000); 95 XmlRpcResponse response = request.Send(info.ServerURI, 10000);
87 if (response.IsFault) 96 if (response.IsFault)
@@ -108,17 +117,19 @@ namespace OpenSim.Services.Connectors
108 landData.UserLocation = Vector3.Parse((string)hash["UserLocation"]); 117 landData.UserLocation = Vector3.Parse((string)hash["UserLocation"]);
109 if (hash["RegionAccess"] != null) 118 if (hash["RegionAccess"] != null)
110 regionAccess = (byte)Convert.ToInt32((string)hash["RegionAccess"]); 119 regionAccess = (byte)Convert.ToInt32((string)hash["RegionAccess"]);
120 if(hash["Dwell"] != null)
121 landData.Dwell = Convert.ToSingle((string)hash["Dwell"]);
111 m_log.DebugFormat("[LAND CONNECTOR]: Got land data for parcel {0}", landData.Name); 122 m_log.DebugFormat("[LAND CONNECTOR]: Got land data for parcel {0}", landData.Name);
112 } 123 }
113 catch (Exception e) 124 catch (Exception e)
114 { 125 {
115 m_log.ErrorFormat( 126 m_log.ErrorFormat(
116 "[LAND CONNECTOR]: Got exception while parsing land-data: {0} {1}", 127 "[LAND CONNECTOR]: Got exception while parsing land-data: {0} {1}",
117 e.Message, e.StackTrace); 128 e.Message, e.StackTrace);
118 } 129 }
119 } 130 }
120 } 131 }
121 else 132 else
122 m_log.WarnFormat("[LAND CONNECTOR]: Couldn't find region with handle {0}", regionHandle); 133 m_log.WarnFormat("[LAND CONNECTOR]: Couldn't find region with handle {0}", regionHandle);
123 } 134 }
124 catch (Exception e) 135 catch (Exception e)
@@ -126,8 +137,8 @@ namespace OpenSim.Services.Connectors
126 m_log.ErrorFormat( 137 m_log.ErrorFormat(
127 "[LAND CONNECTOR]: Couldn't contact region {0}: {1} {2}", regionHandle, e.Message, e.StackTrace); 138 "[LAND CONNECTOR]: Couldn't contact region {0}: {1} {2}", regionHandle, e.Message, e.StackTrace);
128 } 139 }
129 140
130 return landData; 141 return landData;
131 } 142 }
132 } 143 }
133} \ No newline at end of file 144}