aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.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/Region/Framework/Scenes/Scene.cs
parentvarregion: add lots of DEBUG level log messages. Especially for teleport. (diff)
downloadopensim-SC_OLD-2d2bea4aa75ff6e82384f0842fe3719bf946b1cc.zip
opensim-SC_OLD-2d2bea4aa75ff6e82384f0842fe3719bf946b1cc.tar.gz
opensim-SC_OLD-2d2bea4aa75ff6e82384f0842fe3719bf946b1cc.tar.bz2
opensim-SC_OLD-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 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs53
1 files changed, 2 insertions, 51 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 10421ff..5a7e2dd 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1099,8 +1099,6 @@ namespace OpenSim.Region.Framework.Scenes
1099 /// <returns>True after all operations complete, throws exceptions otherwise.</returns> 1099 /// <returns>True after all operations complete, throws exceptions otherwise.</returns>
1100 public override void OtherRegionUp(GridRegion otherRegion) 1100 public override void OtherRegionUp(GridRegion otherRegion)
1101 { 1101 {
1102 // uint xcell = (uint)((int)otherRegion.RegionLocX / (int)Constants.RegionSize);
1103 // uint ycell = (uint)((int)otherRegion.RegionLocY / (int)Constants.RegionSize);
1104 uint xcell = Util.WorldToRegionLoc((uint)otherRegion.RegionLocX); 1102 uint xcell = Util.WorldToRegionLoc((uint)otherRegion.RegionLocX);
1105 uint ycell = Util.WorldToRegionLoc((uint)otherRegion.RegionLocY); 1103 uint ycell = Util.WorldToRegionLoc((uint)otherRegion.RegionLocY);
1106 1104
@@ -2450,9 +2448,9 @@ namespace OpenSim.Region.Framework.Scenes
2450 int xx = (int)Math.Floor(pos.X); 2448 int xx = (int)Math.Floor(pos.X);
2451 int yy = (int)Math.Floor(pos.Y); 2449 int yy = (int)Math.Floor(pos.Y);
2452 if (xx < 0 2450 if (xx < 0
2453 || xx > RegionInfo.RegionSizeX 2451 || xx >= RegionInfo.RegionSizeX
2454 || yy < 0 2452 || yy < 0
2455 || yy > RegionInfo.RegionSizeY) 2453 || yy >= RegionInfo.RegionSizeY)
2456 ret = false; 2454 ret = false;
2457 return ret; 2455 return ret;
2458 2456
@@ -4581,53 +4579,6 @@ namespace OpenSim.Region.Framework.Scenes
4581 ScenePresence sp = GetScenePresence(remoteClient.AgentId); 4579 ScenePresence sp = GetScenePresence(remoteClient.AgentId);
4582 if (sp != null) 4580 if (sp != null)
4583 { 4581 {
4584 /*
4585 uint regionX = RegionInfo.LegacyRegionLocX;
4586 uint regionY = RegionInfo.LegacyRegionLocY;
4587
4588 Util.RegionHandleToWorldLoc(regionHandle, out regionX, out regionY);
4589 Utils.LongToUInts(regionHandle, out regionX, out regionY);
4590
4591 int shiftx = (int) regionX - (int) RegionInfo.LegacyRegionLocX * (int)Constants.RegionSize;
4592 int shifty = (int) regionY - (int) RegionInfo.LegacyRegionLocY * (int)Constants.RegionSize;
4593 */
4594
4595 uint regionX, regionY;
4596 Util.RegionHandleToWorldLoc(regionHandle, out regionX, out regionY);
4597
4598 int shiftx = (int) regionX - (int)RegionInfo.WorldLocX;
4599 int shifty = (int) regionY - (int)RegionInfo.WorldLocY;
4600
4601 position.X += shiftx;
4602 position.Y += shifty;
4603
4604 bool result = false;
4605
4606 if (TestBorderCross(position,Cardinals.N))
4607 result = true;
4608
4609 if (TestBorderCross(position, Cardinals.S))
4610 result = true;
4611
4612 if (TestBorderCross(position, Cardinals.E))
4613 result = true;
4614
4615 if (TestBorderCross(position, Cardinals.W))
4616 result = true;
4617
4618 // bordercross if position is outside of region
4619
4620 if (!result)
4621 {
4622 regionHandle = RegionInfo.RegionHandle;
4623 }
4624 else
4625 {
4626 // not in this region, undo the shift!
4627 position.X -= shiftx;
4628 position.Y -= shifty;
4629 }
4630
4631 if (EntityTransferModule != null) 4582 if (EntityTransferModule != null)
4632 { 4583 {
4633 EntityTransferModule.Teleport(sp, regionHandle, position, lookAt, teleportFlags); 4584 EntityTransferModule.Teleport(sp, regionHandle, position, lookAt, teleportFlags);