aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 99c7079..be8aed1 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2483,6 +2483,23 @@ namespace OpenSim.Region.Framework.Scenes
2483 EntityTransferModule.Cross(grp, attemptedPosition, silent); 2483 EntityTransferModule.Cross(grp, attemptedPosition, silent);
2484 } 2484 }
2485 2485
2486 // Simple test to see if a position is in the current region.
2487 // Resuming the position is relative to the region so anything outside its bounds.
2488 // Return 'true' if position inside region.
2489 public bool PositionIsInCurrentRegion(Vector3 pos)
2490 {
2491 bool ret = true;
2492 int xx = (int)Math.Floor(pos.X);
2493 int yy = (int)Math.Floor(pos.Y);
2494 if (xx < 0
2495 || xx > RegionInfo.RegionSizeX
2496 || yy < 0
2497 || yy > RegionInfo.RegionSizeY)
2498 ret = false;
2499 return ret;
2500
2501 }
2502
2486 public Border GetCrossedBorder(Vector3 position, Cardinals gridline) 2503 public Border GetCrossedBorder(Vector3 position, Cardinals gridline)
2487 { 2504 {
2488 if (BordersLocked) 2505 if (BordersLocked)