diff options
author | UbitUmarov | 2015-08-19 08:48:50 +0100 |
---|---|---|
committer | UbitUmarov | 2015-08-19 08:48:50 +0100 |
commit | 0b105da626ae8c2fb519a817b827f90534ed7d08 (patch) | |
tree | 509e6d091fb12f38fd09528335e51aeedbe59c08 /OpenSim/Services | |
parent | Merge branch 'master' into ubitworkmaster (diff) | |
parent | varregion: update MapImageServiceModule to upload multiple map tiles for larg... (diff) | |
download | opensim-SC-0b105da626ae8c2fb519a817b827f90534ed7d08.zip opensim-SC-0b105da626ae8c2fb519a817b827f90534ed7d08.tar.gz opensim-SC-0b105da626ae8c2fb519a817b827f90534ed7d08.tar.bz2 opensim-SC-0b105da626ae8c2fb519a817b827f90534ed7d08.tar.xz |
Merge branch 'mbworkvar2' into ubitvar
Diffstat (limited to 'OpenSim/Services')
7 files changed, 73 insertions, 45 deletions
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs index 3cf3416..312832f 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs | |||
@@ -112,7 +112,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
112 | // m_log.Warn("Registering region " + regionInfo.RegionName + " (" + regionInfo.RegionID + ") that we are not tracking"); | 112 | // m_log.Warn("Registering region " + regionInfo.RegionName + " (" + regionInfo.RegionID + ") that we are not tracking"); |
113 | 113 | ||
114 | Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0); | 114 | Vector3d minPosition = new Vector3d(regionInfo.RegionLocX, regionInfo.RegionLocY, 0.0); |
115 | Vector3d maxPosition = minPosition + new Vector3d(Constants.RegionSize, Constants.RegionSize, Constants.RegionHeight); | 115 | Vector3d maxPosition = minPosition + new Vector3d(regionInfo.RegionSizeX, regionInfo.RegionSizeY, Constants.RegionHeight); |
116 | 116 | ||
117 | OSDMap extraData = new OSDMap | 117 | OSDMap extraData = new OSDMap |
118 | { | 118 | { |
@@ -174,8 +174,8 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
174 | if (region != null) | 174 | if (region != null) |
175 | { | 175 | { |
176 | List<GridRegion> regions = GetRegionRange(scopeID, | 176 | List<GridRegion> regions = GetRegionRange(scopeID, |
177 | region.RegionLocX - NEIGHBOR_RADIUS, region.RegionLocX + (int)Constants.RegionSize + NEIGHBOR_RADIUS, | 177 | region.RegionLocX - NEIGHBOR_RADIUS, region.RegionLocX + region.RegionSizeX + NEIGHBOR_RADIUS, |
178 | region.RegionLocY - NEIGHBOR_RADIUS, region.RegionLocY + (int)Constants.RegionSize + NEIGHBOR_RADIUS); | 178 | region.RegionLocY - NEIGHBOR_RADIUS, region.RegionLocY + region.RegionSizeY + NEIGHBOR_RADIUS); |
179 | 179 | ||
180 | for (int i = 0; i < regions.Count; i++) | 180 | for (int i = 0; i < regions.Count; i++) |
181 | { | 181 | { |
@@ -240,7 +240,7 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
240 | else | 240 | else |
241 | { | 241 | { |
242 | // m_log.InfoFormat("[SIMIAN GRID CONNECTOR]: Grid service did not find a match for region at {0},{1}", | 242 | // m_log.InfoFormat("[SIMIAN GRID CONNECTOR]: Grid service did not find a match for region at {0},{1}", |
243 | // x / Constants.RegionSize, y / Constants.RegionSize); | 243 | // Util.WorldToRegionLoc(x), Util.WorldToRegionLoc(y)); |
244 | return null; | 244 | return null; |
245 | } | 245 | } |
246 | } | 246 | } |
diff --git a/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs b/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs index 96c02d9..4759838 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 76415ce..eb44dcb 100644 --- a/OpenSim/Services/GridService/GridService.cs +++ b/OpenSim/Services/GridService/GridService.cs | |||
@@ -655,7 +655,7 @@ namespace OpenSim.Services.GridService | |||
655 | return; | 655 | return; |
656 | } | 656 | } |
657 | 657 | ||
658 | RegionData region = m_Database.Get(x * (int)Constants.RegionSize, y * (int)Constants.RegionSize, UUID.Zero); | 658 | RegionData region = m_Database.Get((int)Util.RegionToWorldLoc((uint)x), (int)Util.RegionToWorldLoc((uint)y), UUID.Zero); |
659 | if (region == null) | 659 | if (region == null) |
660 | { | 660 | { |
661 | MainConsole.Instance.OutputFormat("No region found at {0},{1}", x, y); | 661 | MainConsole.Instance.OutputFormat("No region found at {0},{1}", x, y); |
@@ -673,6 +673,7 @@ namespace OpenSim.Services.GridService | |||
673 | dispList.AddRow("Region Name", r.RegionName); | 673 | dispList.AddRow("Region Name", r.RegionName); |
674 | dispList.AddRow("Region ID", r.RegionID); | 674 | dispList.AddRow("Region ID", r.RegionID); |
675 | dispList.AddRow("Location", string.Format("{0},{1}", r.coordX, r.coordY)); | 675 | dispList.AddRow("Location", string.Format("{0},{1}", r.coordX, r.coordY)); |
676 | dispList.AddRow("Size", string.Format("{0}x{1}", r.sizeX, r.sizeY)); | ||
676 | dispList.AddRow("URI", r.Data["serverURI"]); | 677 | dispList.AddRow("URI", r.Data["serverURI"]); |
677 | dispList.AddRow("Owner ID", r.Data["owner_uuid"]); | 678 | dispList.AddRow("Owner ID", r.Data["owner_uuid"]); |
678 | dispList.AddRow("Flags", flags); | 679 | dispList.AddRow("Flags", flags); |
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs index 4024295..0448b54 100644 --- a/OpenSim/Services/GridService/HypergridLinker.cs +++ b/OpenSim/Services/GridService/HypergridLinker.cs | |||
@@ -183,8 +183,8 @@ namespace OpenSim.Services.GridService | |||
183 | public GridRegion LinkRegion(UUID scopeID, string regionDescriptor) | 183 | public GridRegion LinkRegion(UUID scopeID, string regionDescriptor) |
184 | { | 184 | { |
185 | string reason = string.Empty; | 185 | string reason = string.Empty; |
186 | int xloc = random.Next(0, Int16.MaxValue) * (int)Constants.RegionSize; | 186 | uint xloc = Util.RegionToWorldLoc((uint)random.Next(0, Int16.MaxValue)); |
187 | return TryLinkRegionToCoords(scopeID, regionDescriptor, xloc, 0, out reason); | 187 | return TryLinkRegionToCoords(scopeID, regionDescriptor, (int)xloc, 0, out reason); |
188 | } | 188 | } |
189 | 189 | ||
190 | private static Random random = new Random(); | 190 | private static Random random = new Random(); |
@@ -260,7 +260,7 @@ namespace OpenSim.Services.GridService | |||
260 | { | 260 | { |
261 | m_log.DebugFormat("[HYPERGRID LINKER]: Link to {0} {1}, in {2}-{3}", | 261 | m_log.DebugFormat("[HYPERGRID LINKER]: Link to {0} {1}, in {2}-{3}", |
262 | ((serverURI == null) ? (externalHostName + ":" + externalPort) : serverURI), | 262 | ((serverURI == null) ? (externalHostName + ":" + externalPort) : serverURI), |
263 | remoteRegionName, xloc / Constants.RegionSize, yloc / Constants.RegionSize); | 263 | remoteRegionName, Util.WorldToRegionLoc((uint)xloc), Util.WorldToRegionLoc((uint)yloc)); |
264 | 264 | ||
265 | reason = string.Empty; | 265 | reason = string.Empty; |
266 | Uri uri = null; | 266 | Uri uri = null; |
@@ -311,7 +311,7 @@ namespace OpenSim.Services.GridService | |||
311 | if (region != null) | 311 | if (region != null) |
312 | { | 312 | { |
313 | m_log.WarnFormat("[HYPERGRID LINKER]: Coordinates {0}-{1} are already occupied by region {2} with uuid {3}", | 313 | m_log.WarnFormat("[HYPERGRID LINKER]: Coordinates {0}-{1} are already occupied by region {2} with uuid {3}", |
314 | regInfo.RegionLocX / Constants.RegionSize, regInfo.RegionLocY / Constants.RegionSize, | 314 | Util.WorldToRegionLoc((uint)regInfo.RegionLocX), Util.WorldToRegionLoc((uint)regInfo.RegionLocY), |
315 | region.RegionName, region.RegionID); | 315 | region.RegionName, region.RegionID); |
316 | reason = "Coordinates are already in use"; | 316 | reason = "Coordinates are already in use"; |
317 | return false; | 317 | return false; |
@@ -347,7 +347,7 @@ namespace OpenSim.Services.GridService | |||
347 | if (region != null) | 347 | if (region != null) |
348 | { | 348 | { |
349 | m_log.DebugFormat("[HYPERGRID LINKER]: Region already exists in coordinates {0} {1}", | 349 | m_log.DebugFormat("[HYPERGRID LINKER]: Region already exists in coordinates {0} {1}", |
350 | region.RegionLocX / Constants.RegionSize, region.RegionLocY / Constants.RegionSize); | 350 | Util.WorldToRegionLoc((uint)regInfo.RegionLocX), Util.WorldToRegionLoc((uint)regInfo.RegionLocY)); |
351 | regInfo = region; | 351 | regInfo = region; |
352 | return true; | 352 | return true; |
353 | } | 353 | } |
@@ -424,10 +424,10 @@ namespace OpenSim.Services.GridService | |||
424 | // { | 424 | // { |
425 | // uint ux = 0, uy = 0; | 425 | // uint ux = 0, uy = 0; |
426 | // Utils.LongToUInts(realHandle, out ux, out uy); | 426 | // Utils.LongToUInts(realHandle, out ux, out uy); |
427 | // x = ux / Constants.RegionSize; | 427 | // x = Util.WorldToRegionLoc(ux); |
428 | // y = uy / Constants.RegionSize; | 428 | // y = Util.WorldToRegionLoc(uy); |
429 | // | 429 | // |
430 | // const uint limit = (4096 - 1) * Constants.RegionSize; | 430 | // const uint limit = Util.RegionToWorldLoc(4096 - 1); |
431 | // uint xmin = ux - limit; | 431 | // uint xmin = ux - limit; |
432 | // uint xmax = ux + limit; | 432 | // uint xmax = ux + limit; |
433 | // uint ymin = uy - limit; | 433 | // uint ymin = uy - limit; |
@@ -503,8 +503,9 @@ namespace OpenSim.Services.GridService | |||
503 | foreach (RegionData r in regions) | 503 | foreach (RegionData r in regions) |
504 | { | 504 | { |
505 | MainConsole.Instance.Output(String.Format("{0}\n{2,-32} {1}\n", | 505 | MainConsole.Instance.Output(String.Format("{0}\n{2,-32} {1}\n", |
506 | r.RegionName, r.RegionID, String.Format("{0},{1} ({2},{3})", r.posX, r.posY, | 506 | r.RegionName, r.RegionID, |
507 | r.posX / Constants.RegionSize, r.posY / Constants.RegionSize))); | 507 | String.Format("{0},{1} ({2},{3})", r.posX, r.posY, |
508 | Util.WorldToRegionLoc((uint)r.posX), Util.WorldToRegionLoc((uint)r.posY))) ); | ||
508 | } | 509 | } |
509 | return; | 510 | return; |
510 | } | 511 | } |
@@ -529,8 +530,8 @@ namespace OpenSim.Services.GridService | |||
529 | int xloc, yloc; | 530 | int xloc, yloc; |
530 | string serverURI; | 531 | string serverURI; |
531 | string remoteName = null; | 532 | string remoteName = null; |
532 | xloc = Convert.ToInt32(cmdparams[0]) * (int)Constants.RegionSize; | 533 | xloc = (int)Util.RegionToWorldLoc((uint)Convert.ToInt32(cmdparams[0])); |
533 | yloc = Convert.ToInt32(cmdparams[1]) * (int)Constants.RegionSize; | 534 | yloc = (int)Util.RegionToWorldLoc((uint)Convert.ToInt32(cmdparams[1])); |
534 | serverURI = cmdparams[2]; | 535 | serverURI = cmdparams[2]; |
535 | if (cmdparams.Length > 3) | 536 | if (cmdparams.Length > 3) |
536 | remoteName = string.Join(" ", cmdparams, 3, cmdparams.Length - 3); | 537 | remoteName = string.Join(" ", cmdparams, 3, cmdparams.Length - 3); |
@@ -601,13 +602,13 @@ namespace OpenSim.Services.GridService | |||
601 | { | 602 | { |
602 | // old format | 603 | // old format |
603 | GridRegion regInfo; | 604 | GridRegion regInfo; |
604 | int xloc, yloc; | 605 | uint xloc, yloc; |
605 | uint externalPort; | 606 | uint externalPort; |
606 | string externalHostName; | 607 | string externalHostName; |
607 | try | 608 | try |
608 | { | 609 | { |
609 | xloc = Convert.ToInt32(cmdparams[0]); | 610 | xloc = (uint)Convert.ToInt32(cmdparams[0]); |
610 | yloc = Convert.ToInt32(cmdparams[1]); | 611 | yloc = (uint)Convert.ToInt32(cmdparams[1]); |
611 | externalPort = Convert.ToUInt32(cmdparams[3]); | 612 | externalPort = Convert.ToUInt32(cmdparams[3]); |
612 | externalHostName = cmdparams[2]; | 613 | externalHostName = cmdparams[2]; |
613 | //internalPort = Convert.ToUInt32(cmdparams[4]); | 614 | //internalPort = Convert.ToUInt32(cmdparams[4]); |
@@ -621,10 +622,11 @@ namespace OpenSim.Services.GridService | |||
621 | } | 622 | } |
622 | 623 | ||
623 | // Convert cell coordinates given by the user to meters | 624 | // Convert cell coordinates given by the user to meters |
624 | xloc = xloc * (int)Constants.RegionSize; | 625 | xloc = Util.RegionToWorldLoc(xloc); |
625 | yloc = yloc * (int)Constants.RegionSize; | 626 | yloc = Util.RegionToWorldLoc(yloc); |
626 | string reason = string.Empty; | 627 | string reason = string.Empty; |
627 | if (TryCreateLink(UUID.Zero, xloc, yloc, string.Empty, externalPort, externalHostName, UUID.Zero, out regInfo, out reason)) | 628 | if (TryCreateLink(UUID.Zero, (int)xloc, (int)yloc, |
629 | string.Empty, externalPort, externalHostName, UUID.Zero, out regInfo, out reason)) | ||
628 | { | 630 | { |
629 | // What is this? The GridRegion instance will be discarded anyway, | 631 | // What is this? The GridRegion instance will be discarded anyway, |
630 | // which effectively ignores any local name given with the command. | 632 | // which effectively ignores any local name given with the command. |
@@ -704,13 +706,13 @@ namespace OpenSim.Services.GridService | |||
704 | private void ReadLinkFromConfig(IConfig config) | 706 | private void ReadLinkFromConfig(IConfig config) |
705 | { | 707 | { |
706 | GridRegion regInfo; | 708 | GridRegion regInfo; |
707 | int xloc, yloc; | 709 | uint xloc, yloc; |
708 | uint externalPort; | 710 | uint externalPort; |
709 | string externalHostName; | 711 | string externalHostName; |
710 | uint realXLoc, realYLoc; | 712 | uint realXLoc, realYLoc; |
711 | 713 | ||
712 | xloc = Convert.ToInt32(config.GetString("xloc", "0")); | 714 | xloc = (uint)Convert.ToInt32(config.GetString("xloc", "0")); |
713 | yloc = Convert.ToInt32(config.GetString("yloc", "0")); | 715 | yloc = (uint)Convert.ToInt32(config.GetString("yloc", "0")); |
714 | externalPort = Convert.ToUInt32(config.GetString("externalPort", "0")); | 716 | externalPort = Convert.ToUInt32(config.GetString("externalPort", "0")); |
715 | externalHostName = config.GetString("externalHostName", ""); | 717 | externalHostName = config.GetString("externalHostName", ""); |
716 | realXLoc = Convert.ToUInt32(config.GetString("real-xloc", "0")); | 718 | realXLoc = Convert.ToUInt32(config.GetString("real-xloc", "0")); |
@@ -718,18 +720,19 @@ namespace OpenSim.Services.GridService | |||
718 | 720 | ||
719 | if (m_enableAutoMapping) | 721 | if (m_enableAutoMapping) |
720 | { | 722 | { |
721 | xloc = (int)((xloc % 100) + m_autoMappingX); | 723 | xloc = (uint)((xloc % 100) + m_autoMappingX); |
722 | yloc = (int)((yloc % 100) + m_autoMappingY); | 724 | yloc = (uint)((yloc % 100) + m_autoMappingY); |
723 | } | 725 | } |
724 | 726 | ||
725 | if (((realXLoc == 0) && (realYLoc == 0)) || | 727 | if (((realXLoc == 0) && (realYLoc == 0)) || |
726 | (((realXLoc - xloc < 3896) || (xloc - realXLoc < 3896)) && | 728 | (((realXLoc - xloc < 3896) || (xloc - realXLoc < 3896)) && |
727 | ((realYLoc - yloc < 3896) || (yloc - realYLoc < 3896)))) | 729 | ((realYLoc - yloc < 3896) || (yloc - realYLoc < 3896)))) |
728 | { | 730 | { |
729 | xloc = xloc * (int)Constants.RegionSize; | 731 | xloc = Util.RegionToWorldLoc(xloc); |
730 | yloc = yloc * (int)Constants.RegionSize; | 732 | yloc = Util.RegionToWorldLoc(yloc); |
731 | string reason = string.Empty; | 733 | string reason = string.Empty; |
732 | if (TryCreateLink(UUID.Zero, xloc, yloc, string.Empty, externalPort, externalHostName, UUID.Zero, out regInfo, out reason)) | 734 | if (TryCreateLink(UUID.Zero, (int)xloc, (int)yloc, |
735 | string.Empty, externalPort, externalHostName, UUID.Zero, out regInfo, out reason)) | ||
733 | { | 736 | { |
734 | regInfo.RegionName = config.GetString("localName", ""); | 737 | regInfo.RegionName = config.GetString("localName", ""); |
735 | } | 738 | } |
diff --git a/OpenSim/Services/Interfaces/IGridService.cs b/OpenSim/Services/Interfaces/IGridService.cs index 19ea0fe..1119e48 100644 --- a/OpenSim/Services/Interfaces/IGridService.cs +++ b/OpenSim/Services/Interfaces/IGridService.cs | |||
@@ -179,14 +179,14 @@ namespace OpenSim.Services.Interfaces | |||
179 | protected IPEndPoint m_internalEndPoint; | 179 | protected IPEndPoint m_internalEndPoint; |
180 | 180 | ||
181 | /// <summary> | 181 | /// <summary> |
182 | /// The co-ordinate of this region. | 182 | /// The co-ordinate of this region in region units. |
183 | /// </summary> | 183 | /// </summary> |
184 | public int RegionCoordX { get { return RegionLocX / (int)Constants.RegionSize; } } | 184 | public int RegionCoordX { get { return (int)Util.WorldToRegionLoc((uint)RegionLocX); } } |
185 | 185 | ||
186 | /// <summary> | 186 | /// <summary> |
187 | /// The co-ordinate of this region | 187 | /// The co-ordinate of this region in region units |
188 | /// </summary> | 188 | /// </summary> |
189 | public int RegionCoordY { get { return RegionLocY / (int)Constants.RegionSize; } } | 189 | public int RegionCoordY { get { return (int)Util.WorldToRegionLoc((uint)RegionLocY); } } |
190 | 190 | ||
191 | /// <summary> | 191 | /// <summary> |
192 | /// The location of this region in meters. | 192 | /// The location of this region in meters. |
@@ -265,8 +265,8 @@ namespace OpenSim.Services.Interfaces | |||
265 | 265 | ||
266 | public GridRegion(uint xcell, uint ycell) | 266 | public GridRegion(uint xcell, uint ycell) |
267 | { | 267 | { |
268 | m_regionLocX = (int)(xcell * Constants.RegionSize); | 268 | m_regionLocX = (int)Util.RegionToWorldLoc(xcell); |
269 | m_regionLocY = (int)(ycell * Constants.RegionSize); | 269 | m_regionLocY = (int)Util.RegionToWorldLoc(ycell); |
270 | RegionSizeX = (int)Constants.RegionSize; | 270 | RegionSizeX = (int)Constants.RegionSize; |
271 | RegionSizeY = (int)Constants.RegionSize; | 271 | RegionSizeY = (int)Constants.RegionSize; |
272 | } | 272 | } |
@@ -274,8 +274,8 @@ namespace OpenSim.Services.Interfaces | |||
274 | public GridRegion(RegionInfo ConvertFrom) | 274 | public GridRegion(RegionInfo ConvertFrom) |
275 | { | 275 | { |
276 | m_regionName = ConvertFrom.RegionName; | 276 | m_regionName = ConvertFrom.RegionName; |
277 | m_regionLocX = (int)(ConvertFrom.RegionLocX * Constants.RegionSize); | 277 | m_regionLocX = (int)(ConvertFrom.WorldLocX); |
278 | m_regionLocY = (int)(ConvertFrom.RegionLocY * Constants.RegionSize); | 278 | m_regionLocY = (int)(ConvertFrom.WorldLocY); |
279 | RegionSizeX = (int)ConvertFrom.RegionSizeX; | 279 | RegionSizeX = (int)ConvertFrom.RegionSizeX; |
280 | RegionSizeY = (int)ConvertFrom.RegionSizeY; | 280 | RegionSizeY = (int)ConvertFrom.RegionSizeY; |
281 | m_internalEndPoint = ConvertFrom.InternalEndPoint; | 281 | m_internalEndPoint = ConvertFrom.InternalEndPoint; |
diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs index f641955..da351b9 100644 --- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs +++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs | |||
@@ -368,7 +368,8 @@ namespace OpenSim.Services.LLLoginService | |||
368 | 368 | ||
369 | private void FillOutHomeData(GridUserInfo pinfo, GridRegion home) | 369 | private void FillOutHomeData(GridUserInfo pinfo, GridRegion home) |
370 | { | 370 | { |
371 | int x = 1000 * (int)Constants.RegionSize, y = 1000 * (int)Constants.RegionSize; | 371 | int x = (int)Util.RegionToWorldLoc(1000); |
372 | int y = (int)Util.RegionToWorldLoc(1000); | ||
372 | if (home != null) | 373 | if (home != null) |
373 | { | 374 | { |
374 | x = home.RegionLocX; | 375 | x = home.RegionLocX; |
@@ -443,10 +444,23 @@ namespace OpenSim.Services.LLLoginService | |||
443 | ErrorReason = "key"; | 444 | ErrorReason = "key"; |
444 | welcomeMessage = "Welcome to OpenSim!"; | 445 | welcomeMessage = "Welcome to OpenSim!"; |
445 | seedCapability = String.Empty; | 446 | seedCapability = String.Empty; |
446 | home = "{'region_handle':[r" + (1000*Constants.RegionSize).ToString() + ",r" + (1000*Constants.RegionSize).ToString() + "], 'position':[r" + | 447 | home = "{'region_handle':[" |
447 | userProfile.homepos.X.ToString() + ",r" + userProfile.homepos.Y.ToString() + ",r" + | 448 | + "r" + Util.RegionToWorldLoc(1000).ToString() |
448 | userProfile.homepos.Z.ToString() + "], 'look_at':[r" + userProfile.homelookat.X.ToString() + ",r" + | 449 | + "," |
449 | userProfile.homelookat.Y.ToString() + ",r" + userProfile.homelookat.Z.ToString() + "]}"; | 450 | + "r" + Util.RegionToWorldLoc(1000).ToString() |
451 | + "], 'position':[" | ||
452 | + "r" + userProfile.homepos.X.ToString() | ||
453 | + "," | ||
454 | + "r" + userProfile.homepos.Y.ToString() | ||
455 | + "," | ||
456 | + "r" + userProfile.homepos.Z.ToString() | ||
457 | + "], 'look_at':[" | ||
458 | + "r" + userProfile.homelookat.X.ToString() | ||
459 | + "," | ||
460 | + "r" + userProfile.homelookat.Y.ToString() | ||
461 | + "," | ||
462 | + "r" + userProfile.homelookat.Z.ToString() | ||
463 | + "]}"; | ||
450 | lookAt = "[r0.99949799999999999756,r0.03166859999999999814,r0]"; | 464 | lookAt = "[r0.99949799999999999756,r0.03166859999999999814,r0]"; |
451 | RegionX = (uint) 255232; | 465 | RegionX = (uint) 255232; |
452 | RegionY = (uint) 254976; | 466 | RegionY = (uint) 254976; |
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 1c1c9b0..c833131 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -695,7 +695,7 @@ namespace OpenSim.Services.LLLoginService | |||
695 | private GridRegion FindAlternativeRegion(UUID scopeID) | 695 | private GridRegion FindAlternativeRegion(UUID scopeID) |
696 | { | 696 | { |
697 | List<GridRegion> hyperlinks = null; | 697 | List<GridRegion> hyperlinks = null; |
698 | List<GridRegion> regions = m_GridService.GetFallbackRegions(scopeID, 1000 * (int)Constants.RegionSize, 1000 * (int)Constants.RegionSize); | 698 | List<GridRegion> regions = m_GridService.GetFallbackRegions(scopeID, (int)Util.RegionToWorldLoc(1000), (int)Util.RegionToWorldLoc(1000)); |
699 | if (regions != null && regions.Count > 0) | 699 | if (regions != null && regions.Count > 0) |
700 | { | 700 | { |
701 | hyperlinks = m_GridService.GetHyperlinks(scopeID); | 701 | hyperlinks = m_GridService.GetHyperlinks(scopeID); |