aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/Land
diff options
context:
space:
mode:
authoronefang2019-05-19 21:24:15 +1000
committeronefang2019-05-19 21:24:15 +1000
commit5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch)
treea9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /OpenSim/Services/Connectors/Land
parentAdd a build script. (diff)
downloadopensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2
opensim-SC_OLD-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to 'OpenSim/Services/Connectors/Land')
-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}