aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/GridService/GridService.cs
diff options
context:
space:
mode:
authorRobert Adams2013-12-26 22:45:59 -0800
committerRobert Adams2013-12-26 22:45:59 -0800
commit2d2bea4aa75ff6e82384f0842fe3719bf946b1cc (patch)
tree9c1429ad59674925944ece4ec366888794e91822 /OpenSim/Services/GridService/GridService.cs
parentvarregion: add lots of DEBUG level log messages. Especially for teleport. (diff)
downloadopensim-SC-2d2bea4aa75ff6e82384f0842fe3719bf946b1cc.zip
opensim-SC-2d2bea4aa75ff6e82384f0842fe3719bf946b1cc.tar.gz
opensim-SC-2d2bea4aa75ff6e82384f0842fe3719bf946b1cc.tar.bz2
opensim-SC-2d2bea4aa75ff6e82384f0842fe3719bf946b1cc.tar.xz
varregion: many more updates removing the constant RegionSize and replacing
with a passed region size. This time in the map code and grid services code.
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/GridService/GridService.cs14
1 files changed, 8 insertions, 6 deletions
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index aa7ffc1..8198592 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -313,8 +313,10 @@ namespace OpenSim.Services.GridService
313 if (region != null) 313 if (region != null)
314 { 314 {
315 // Not really? Maybe? 315 // Not really? Maybe?
316 List<RegionData> rdatas = m_Database.Get(region.posX - (int)Constants.RegionSize - 1, region.posY - (int)Constants.RegionSize - 1, 316 // The adjacent regions are presumed to be the same size as the current region
317 region.posX + (int)Constants.RegionSize + 1, region.posY + (int)Constants.RegionSize + 1, scopeID); 317 List<RegionData> rdatas = m_Database.Get(
318 region.posX - region.sizeX - 1, region.posY - region.sizeY - 1,
319 region.posX + region.sizeX + 1, region.posY + region.sizeY + 1, scopeID);
318 320
319 foreach (RegionData rdata in rdatas) 321 foreach (RegionData rdata in rdatas)
320 { 322 {
@@ -642,20 +644,20 @@ namespace OpenSim.Services.GridService
642 return; 644 return;
643 } 645 }
644 646
645 int x, y; 647 uint x, y;
646 if (!int.TryParse(cmd[3], out x)) 648 if (!uint.TryParse(cmd[3], out x))
647 { 649 {
648 MainConsole.Instance.Output("x-coord must be an integer"); 650 MainConsole.Instance.Output("x-coord must be an integer");
649 return; 651 return;
650 } 652 }
651 653
652 if (!int.TryParse(cmd[4], out y)) 654 if (!uint.TryParse(cmd[4], out y))
653 { 655 {
654 MainConsole.Instance.Output("y-coord must be an integer"); 656 MainConsole.Instance.Output("y-coord must be an integer");
655 return; 657 return;
656 } 658 }
657 659
658 RegionData region = m_Database.Get(x * (int)Constants.RegionSize, y * (int)Constants.RegionSize, UUID.Zero); 660 RegionData region = m_Database.Get((int)Util.RegionToWorldLoc(x), (int)Util.RegionToWorldLoc(y), UUID.Zero);
659 if (region == null) 661 if (region == null)
660 { 662 {
661 MainConsole.Instance.OutputFormat("No region found at {0},{1}", x, y); 663 MainConsole.Instance.OutputFormat("No region found at {0},{1}", x, y);