diff options
Diffstat (limited to 'OpenSim/Services')
6 files changed, 52 insertions, 5 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs index b999509..71334ee 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs | |||
@@ -201,8 +201,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
201 | NameValueCollection requestArgs = new NameValueCollection | 201 | NameValueCollection requestArgs = new NameValueCollection |
202 | { | 202 | { |
203 | { "RequestMethod", "xAddMapTile" }, | 203 | { "RequestMethod", "xAddMapTile" }, |
204 | { "X", scene.RegionInfo.RegionLocX.ToString() }, | 204 | { "X", scene.RegionInfo.LegacyRegionLocX.ToString() }, |
205 | { "Y", scene.RegionInfo.RegionLocY.ToString() }, | 205 | { "Y", scene.RegionInfo.LegacyRegionLocY.ToString() }, |
206 | { "ContentType", "image/png" }, | 206 | { "ContentType", "image/png" }, |
207 | { "EncodedData", System.Convert.ToBase64String(pngData) } | 207 | { "EncodedData", System.Convert.ToBase64String(pngData) } |
208 | }; | 208 | }; |
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs b/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs index 504fcaf..2cbf967 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs | |||
@@ -100,6 +100,11 @@ namespace OpenSim.Services.Connectors | |||
100 | return m_database.LoadObjects(regionUUID); | 100 | return m_database.LoadObjects(regionUUID); |
101 | } | 101 | } |
102 | 102 | ||
103 | public void StoreTerrain(TerrainData terrain, UUID regionID) | ||
104 | { | ||
105 | m_database.StoreTerrain(terrain, regionID); | ||
106 | } | ||
107 | |||
103 | public void StoreTerrain(double[,] terrain, UUID regionID) | 108 | public void StoreTerrain(double[,] terrain, UUID regionID) |
104 | { | 109 | { |
105 | m_database.StoreTerrain(terrain, regionID); | 110 | m_database.StoreTerrain(terrain, regionID); |
@@ -110,6 +115,11 @@ namespace OpenSim.Services.Connectors | |||
110 | return m_database.LoadTerrain(regionID); | 115 | return m_database.LoadTerrain(regionID); |
111 | } | 116 | } |
112 | 117 | ||
118 | public TerrainData LoadTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ) | ||
119 | { | ||
120 | return m_database.LoadTerrain(regionID, pSizeX, pSizeY, pSizeZ); | ||
121 | } | ||
122 | |||
113 | public void StoreLandObject(ILandObject Parcel) | 123 | public void StoreLandObject(ILandObject Parcel) |
114 | { | 124 | { |
115 | m_database.StoreLandObject(Parcel); | 125 | m_database.StoreLandObject(Parcel); |
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs index e72b7f9..9fa2dc5 100644 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs | |||
@@ -441,6 +441,8 @@ namespace OpenSim.Services.GridService | |||
441 | RegionData rdata = new RegionData(); | 441 | RegionData rdata = new RegionData(); |
442 | rdata.posX = (int)rinfo.RegionLocX; | 442 | rdata.posX = (int)rinfo.RegionLocX; |
443 | rdata.posY = (int)rinfo.RegionLocY; | 443 | rdata.posY = (int)rinfo.RegionLocY; |
444 | rdata.sizeX = rinfo.RegionSizeX; | ||
445 | rdata.sizeY = rinfo.RegionSizeY; | ||
444 | rdata.RegionID = rinfo.RegionID; | 446 | rdata.RegionID = rinfo.RegionID; |
445 | rdata.RegionName = rinfo.RegionName; | 447 | rdata.RegionName = rinfo.RegionName; |
446 | rdata.Data = rinfo.ToKeyValuePairs(); | 448 | rdata.Data = rinfo.ToKeyValuePairs(); |
@@ -454,6 +456,8 @@ namespace OpenSim.Services.GridService | |||
454 | GridRegion rinfo = new GridRegion(rdata.Data); | 456 | GridRegion rinfo = new GridRegion(rdata.Data); |
455 | rinfo.RegionLocX = rdata.posX; | 457 | rinfo.RegionLocX = rdata.posX; |
456 | rinfo.RegionLocY = rdata.posY; | 458 | rinfo.RegionLocY = rdata.posY; |
459 | rinfo.RegionSizeX = rdata.sizeX; | ||
460 | rinfo.RegionSizeY = rdata.sizeY; | ||
457 | rinfo.RegionID = rdata.RegionID; | 461 | rinfo.RegionID = rdata.RegionID; |
458 | rinfo.RegionName = rdata.RegionName; | 462 | rinfo.RegionName = rdata.RegionName; |
459 | rinfo.ScopeID = rdata.ScopeID; | 463 | rinfo.ScopeID = rdata.ScopeID; |
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs index 88ac5b3..a830f17 100644 --- a/OpenSim/Services/Interfaces/IGridService.cs +++ b/OpenSim/Services/Interfaces/IGridService.cs | |||
@@ -185,6 +185,9 @@ namespace OpenSim.Services.Interfaces | |||
185 | } | 185 | } |
186 | protected int m_regionLocX; | 186 | protected int m_regionLocX; |
187 | 187 | ||
188 | public int RegionSizeX { get; set; } | ||
189 | public int RegionSizeY { get; set; } | ||
190 | |||
188 | /// <summary> | 191 | /// <summary> |
189 | /// The location of this region in meters. | 192 | /// The location of this region in meters. |
190 | /// </summary> | 193 | /// </summary> |
@@ -222,6 +225,8 @@ namespace OpenSim.Services.Interfaces | |||
222 | { | 225 | { |
223 | m_regionLocX = regionLocX; | 226 | m_regionLocX = regionLocX; |
224 | m_regionLocY = regionLocY; | 227 | m_regionLocY = regionLocY; |
228 | RegionSizeX = (int)Constants.RegionSize; | ||
229 | RegionSizeY = (int)Constants.RegionSize; | ||
225 | 230 | ||
226 | m_internalEndPoint = internalEndPoint; | 231 | m_internalEndPoint = internalEndPoint; |
227 | m_externalHostName = externalUri; | 232 | m_externalHostName = externalUri; |
@@ -231,6 +236,8 @@ namespace OpenSim.Services.Interfaces | |||
231 | { | 236 | { |
232 | m_regionLocX = regionLocX; | 237 | m_regionLocX = regionLocX; |
233 | m_regionLocY = regionLocY; | 238 | m_regionLocY = regionLocY; |
239 | RegionSizeX = (int)Constants.RegionSize; | ||
240 | RegionSizeY = (int)Constants.RegionSize; | ||
234 | 241 | ||
235 | m_externalHostName = externalUri; | 242 | m_externalHostName = externalUri; |
236 | 243 | ||
@@ -241,13 +248,17 @@ namespace OpenSim.Services.Interfaces | |||
241 | { | 248 | { |
242 | m_regionLocX = (int)(xcell * Constants.RegionSize); | 249 | m_regionLocX = (int)(xcell * Constants.RegionSize); |
243 | m_regionLocY = (int)(ycell * Constants.RegionSize); | 250 | m_regionLocY = (int)(ycell * Constants.RegionSize); |
251 | RegionSizeX = (int)Constants.RegionSize; | ||
252 | RegionSizeY = (int)Constants.RegionSize; | ||
244 | } | 253 | } |
245 | 254 | ||
246 | public GridRegion(RegionInfo ConvertFrom) | 255 | public GridRegion(RegionInfo ConvertFrom) |
247 | { | 256 | { |
248 | m_regionName = ConvertFrom.RegionName; | 257 | m_regionName = ConvertFrom.RegionName; |
249 | m_regionLocX = (int)(ConvertFrom.RegionLocX * Constants.RegionSize); | 258 | m_regionLocX = (int)(ConvertFrom.RegionWorldLocX); |
250 | m_regionLocY = (int)(ConvertFrom.RegionLocY * Constants.RegionSize); | 259 | m_regionLocY = (int)(ConvertFrom.RegionWorldLocY); |
260 | RegionSizeX = (int)ConvertFrom.RegionSizeX; | ||
261 | RegionSizeY = (int)ConvertFrom.RegionSizeY; | ||
251 | m_internalEndPoint = ConvertFrom.InternalEndPoint; | 262 | m_internalEndPoint = ConvertFrom.InternalEndPoint; |
252 | m_externalHostName = ConvertFrom.ExternalHostName; | 263 | m_externalHostName = ConvertFrom.ExternalHostName; |
253 | m_httpPort = ConvertFrom.HttpPort; | 264 | m_httpPort = ConvertFrom.HttpPort; |
@@ -266,6 +277,8 @@ namespace OpenSim.Services.Interfaces | |||
266 | m_regionName = ConvertFrom.RegionName; | 277 | m_regionName = ConvertFrom.RegionName; |
267 | m_regionLocX = ConvertFrom.RegionLocX; | 278 | m_regionLocX = ConvertFrom.RegionLocX; |
268 | m_regionLocY = ConvertFrom.RegionLocY; | 279 | m_regionLocY = ConvertFrom.RegionLocY; |
280 | RegionSizeX = ConvertFrom.RegionSizeX; | ||
281 | RegionSizeY = ConvertFrom.RegionSizeY; | ||
269 | m_internalEndPoint = ConvertFrom.InternalEndPoint; | 282 | m_internalEndPoint = ConvertFrom.InternalEndPoint; |
270 | m_externalHostName = ConvertFrom.ExternalHostName; | 283 | m_externalHostName = ConvertFrom.ExternalHostName; |
271 | m_httpPort = ConvertFrom.HttpPort; | 284 | m_httpPort = ConvertFrom.HttpPort; |
@@ -373,6 +386,8 @@ namespace OpenSim.Services.Interfaces | |||
373 | kvp["uuid"] = RegionID.ToString(); | 386 | kvp["uuid"] = RegionID.ToString(); |
374 | kvp["locX"] = RegionLocX.ToString(); | 387 | kvp["locX"] = RegionLocX.ToString(); |
375 | kvp["locY"] = RegionLocY.ToString(); | 388 | kvp["locY"] = RegionLocY.ToString(); |
389 | kvp["sizeX"] = RegionSizeX.ToString(); | ||
390 | kvp["sizeY"] = RegionSizeY.ToString(); | ||
376 | kvp["regionName"] = RegionName; | 391 | kvp["regionName"] = RegionName; |
377 | kvp["serverIP"] = ExternalHostName; //ExternalEndPoint.Address.ToString(); | 392 | kvp["serverIP"] = ExternalHostName; //ExternalEndPoint.Address.ToString(); |
378 | kvp["serverHttpPort"] = HttpPort.ToString(); | 393 | kvp["serverHttpPort"] = HttpPort.ToString(); |
@@ -399,6 +414,12 @@ namespace OpenSim.Services.Interfaces | |||
399 | if (kvp.ContainsKey("locY")) | 414 | if (kvp.ContainsKey("locY")) |
400 | RegionLocY = Convert.ToInt32((string)kvp["locY"]); | 415 | RegionLocY = Convert.ToInt32((string)kvp["locY"]); |
401 | 416 | ||
417 | if (kvp.ContainsKey("sizeX")) | ||
418 | RegionSizeX = Convert.ToInt32((string)kvp["sizeX"]); | ||
419 | |||
420 | if (kvp.ContainsKey("sizeY")) | ||
421 | RegionSizeY = Convert.ToInt32((string)kvp["sizeY"]); | ||
422 | |||
402 | if (kvp.ContainsKey("regionName")) | 423 | if (kvp.ContainsKey("regionName")) |
403 | RegionName = (string)kvp["regionName"]; | 424 | RegionName = (string)kvp["regionName"]; |
404 | 425 | ||
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs index 6ab5258..f96480c 100644 --- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs +++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs | |||
@@ -254,11 +254,12 @@ namespace OpenSim.Services.LLLoginService | |||
254 | Currency = currency; | 254 | Currency = currency; |
255 | ClassifiedFee = classifiedFee; | 255 | ClassifiedFee = classifiedFee; |
256 | 256 | ||
257 | |||
258 | FillOutHomeData(pinfo, home); | 257 | FillOutHomeData(pinfo, home); |
259 | LookAt = String.Format("[r{0},r{1},r{2}]", lookAt.X, lookAt.Y, lookAt.Z); | 258 | LookAt = String.Format("[r{0},r{1},r{2}]", lookAt.X, lookAt.Y, lookAt.Z); |
260 | 259 | ||
261 | FillOutRegionData(destination); | 260 | FillOutRegionData(destination); |
261 | m_log.DebugFormat("[LOGIN RESPONSE] LLLoginResponse create. sizeX={0}, sizeY={1}", RegionSizeX, RegionSizeY); | ||
262 | Util.PrintCallStack(); | ||
262 | 263 | ||
263 | FillOutSeedCap(aCircuit, destination, clientIP); | 264 | FillOutSeedCap(aCircuit, destination, clientIP); |
264 | 265 | ||
@@ -384,6 +385,8 @@ namespace OpenSim.Services.LLLoginService | |||
384 | SimPort = (uint)endPoint.Port; | 385 | SimPort = (uint)endPoint.Port; |
385 | RegionX = (uint)destination.RegionLocX; | 386 | RegionX = (uint)destination.RegionLocX; |
386 | RegionY = (uint)destination.RegionLocY; | 387 | RegionY = (uint)destination.RegionLocY; |
388 | RegionSizeX = destination.RegionSizeX; | ||
389 | RegionSizeY = destination.RegionSizeY; | ||
387 | } | 390 | } |
388 | 391 | ||
389 | private void FillOutSeedCap(AgentCircuitData aCircuit, GridRegion destination, IPEndPoint ipepClient) | 392 | private void FillOutSeedCap(AgentCircuitData aCircuit, GridRegion destination, IPEndPoint ipepClient) |
@@ -529,6 +532,9 @@ namespace OpenSim.Services.LLLoginService | |||
529 | responseData["message"] = welcomeMessage; | 532 | responseData["message"] = welcomeMessage; |
530 | responseData["region_x"] = (Int32)(RegionX); | 533 | responseData["region_x"] = (Int32)(RegionX); |
531 | responseData["region_y"] = (Int32)(RegionY); | 534 | responseData["region_y"] = (Int32)(RegionY); |
535 | responseData["region_size_x"] = (Int32)RegionSizeX; | ||
536 | responseData["region_size_y"] = (Int32)RegionSizeY; | ||
537 | m_log.DebugFormat("[LOGIN RESPONSE] returning sizeX={0}, sizeY={1}", RegionSizeX, RegionSizeY); | ||
532 | 538 | ||
533 | if (searchURL != String.Empty) | 539 | if (searchURL != String.Empty) |
534 | responseData["search"] = searchURL; | 540 | responseData["search"] = searchURL; |
@@ -918,6 +924,9 @@ namespace OpenSim.Services.LLLoginService | |||
918 | set { regionY = value; } | 924 | set { regionY = value; } |
919 | } | 925 | } |
920 | 926 | ||
927 | public int RegionSizeX { get; private set; } | ||
928 | public int RegionSizeY { get; private set; } | ||
929 | |||
921 | public string SunTexture | 930 | public string SunTexture |
922 | { | 931 | { |
923 | get { return sunTexture; } | 932 | get { return sunTexture; } |
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index fe43582..e2f9966 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -50,6 +50,8 @@ namespace OpenSim.Services.LLLoginService | |||
50 | public class LLLoginService : ILoginService | 50 | public class LLLoginService : ILoginService |
51 | { | 51 | { |
52 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 52 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
53 | private static readonly string LogHeader = "[LLOGIN SERVICE]"; | ||
54 | |||
53 | private static bool Initialized = false; | 55 | private static bool Initialized = false; |
54 | 56 | ||
55 | protected IUserAccountService m_UserAccountService; | 57 | protected IUserAccountService m_UserAccountService; |
@@ -389,6 +391,7 @@ namespace OpenSim.Services.LLLoginService | |||
389 | if (guinfo == null) | 391 | if (guinfo == null) |
390 | { | 392 | { |
391 | // something went wrong, make something up, so that we don't have to test this anywhere else | 393 | // something went wrong, make something up, so that we don't have to test this anywhere else |
394 | m_log.DebugFormat("{0} Failed to fetch GridUserInfo. Creating empty GridUserInfo as home", LogHeader); | ||
392 | guinfo = new GridUserInfo(); | 395 | guinfo = new GridUserInfo(); |
393 | guinfo.LastPosition = guinfo.HomePosition = new Vector3(128, 128, 30); | 396 | guinfo.LastPosition = guinfo.HomePosition = new Vector3(128, 128, 30); |
394 | } | 397 | } |