diff options
author | Robert Adams | 2013-11-30 15:28:39 -0800 |
---|---|---|
committer | Robert Adams | 2013-11-30 15:28:39 -0800 |
commit | 6cd0d7a62b696d28d488f3cb82838ccf973ccfd7 (patch) | |
tree | 6b058a23eccf0eda55666abee9a3bb52c415e0ce /OpenSim/Region/Framework/Scenes/Scene.cs | |
parent | varregion: add ITerrainChannel.GetHeightAtXYZ() for eventual mesh terrain. (diff) | |
download | opensim-SC_OLD-6cd0d7a62b696d28d488f3cb82838ccf973ccfd7.zip opensim-SC_OLD-6cd0d7a62b696d28d488f3cb82838ccf973ccfd7.tar.gz opensim-SC_OLD-6cd0d7a62b696d28d488f3cb82838ccf973ccfd7.tar.bz2 opensim-SC_OLD-6cd0d7a62b696d28d488f3cb82838ccf973ccfd7.tar.xz |
varregion: Add MaxRegionSize constant and enforce in RegionInfo.
Intermediate checkin of changing border cross computation from checking
boundry limits to requests to GridService. Not totally functional.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 17 |
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) |