diff options
author | UbitUmarov | 2015-12-15 17:20:00 +0000 |
---|---|---|
committer | UbitUmarov | 2015-12-15 17:20:00 +0000 |
commit | a9e8bd2884dd24bcbbd4a1da6219511b041bb4cd (patch) | |
tree | c01581d65de18f818c4bfce7c39f3549dd6f0abb /OpenSim | |
parent | replace GetNearestPoint... funtions (diff) | |
download | opensim-SC-a9e8bd2884dd24bcbbd4a1da6219511b041bb4cd.zip opensim-SC-a9e8bd2884dd24bcbbd4a1da6219511b041bb4cd.tar.gz opensim-SC-a9e8bd2884dd24bcbbd4a1da6219511b041bb4cd.tar.bz2 opensim-SC-a9e8bd2884dd24bcbbd4a1da6219511b041bb4cd.tar.xz |
remove replaced code
Diffstat (limited to 'OpenSim')
-rwxr-xr-x | OpenSim/Region/Framework/Scenes/Scene.cs | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 9ae0c10..1dbfa6d 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -5838,42 +5838,6 @@ Environment.Exit(1); | |||
5838 | return GetPositionAtGround(center.X, center.Y); | 5838 | return GetPositionAtGround(center.X, center.Y); |
5839 | } | 5839 | } |
5840 | 5840 | ||
5841 | private Vector3? GetNearestPointInParcelAlongDirectionFromPoint(Vector3 pos, Vector3 direction, ILandObject parcel) | ||
5842 | { | ||
5843 | float maxX = RegionInfo.RegionSizeX; | ||
5844 | float maxY = RegionInfo.RegionSizeY; | ||
5845 | |||
5846 | // reduce resolution since regions can be very large now | ||
5847 | direction *= 4.0f; | ||
5848 | Vector3 testPos = pos; | ||
5849 | //Making distance to search go through some sane limit of distance | ||
5850 | while(true) | ||
5851 | { | ||
5852 | testPos += direction; | ||
5853 | if (parcel.ContainsPoint((int)testPos.X, (int)testPos.Y)) | ||
5854 | { | ||
5855 | direction *= -0.125f; // .5m resolution | ||
5856 | Vector3 testPos2 = testPos - direction; | ||
5857 | for(int i = 0; i < 7; i++) | ||
5858 | { | ||
5859 | if (!parcel.ContainsPoint((int)testPos2.X, (int)testPos2.Y)) | ||
5860 | return testPos; | ||
5861 | testPos = testPos2; | ||
5862 | } | ||
5863 | return testPos; | ||
5864 | } | ||
5865 | if(testPos.X < 0) | ||
5866 | break; | ||
5867 | else if (testPos.X >= maxX) | ||
5868 | break; | ||
5869 | if(testPos.Y < 0) | ||
5870 | break; | ||
5871 | else if (testPos.Y >= maxY) | ||
5872 | break; | ||
5873 | } | ||
5874 | return null; | ||
5875 | } | ||
5876 | |||
5877 | public ILandObject GetNearestAllowedParcel(UUID avatarId, float x, float y) | 5841 | public ILandObject GetNearestAllowedParcel(UUID avatarId, float x, float y) |
5878 | { | 5842 | { |
5879 | return GetNearestAllowedParcel(avatarId, x, y, null); | 5843 | return GetNearestAllowedParcel(avatarId, x, y, null); |