diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/LandData.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 51 |
2 files changed, 32 insertions, 21 deletions
diff --git a/OpenSim/Framework/LandData.cs b/OpenSim/Framework/LandData.cs index 4fbbbc1..da541af 100644 --- a/OpenSim/Framework/LandData.cs +++ b/OpenSim/Framework/LandData.cs | |||
@@ -71,7 +71,7 @@ namespace OpenSim.Framework | |||
71 | (uint)ParcelFlags.CreateObjects | (uint)ParcelFlags.AllowOtherScripts | | 71 | (uint)ParcelFlags.CreateObjects | (uint)ParcelFlags.AllowOtherScripts | |
72 | (uint)ParcelFlags.AllowVoiceChat; | 72 | (uint)ParcelFlags.AllowVoiceChat; |
73 | 73 | ||
74 | private byte _landingType = 0; | 74 | private byte _landingType = (byte)OpenMetaverse.LandingType.Direct; |
75 | private string _name = "Your Parcel"; | 75 | private string _name = "Your Parcel"; |
76 | private ParcelStatus _status = ParcelStatus.Leased; | 76 | private ParcelStatus _status = ParcelStatus.Leased; |
77 | private int _localID = 0; | 77 | private int _localID = 0; |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 084fadf..873035b 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -951,20 +951,26 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
951 | 951 | ||
952 | ILandObject startLandObject = GetLandObject(start_x, start_y); | 952 | ILandObject startLandObject = GetLandObject(start_x, start_y); |
953 | 953 | ||
954 | if (startLandObject == null) return; | 954 | if (startLandObject == null) |
955 | return; | ||
956 | |||
957 | if (!m_scene.Permissions.CanEditParcelProperties(attempting_user_id, startLandObject, GroupPowers.LandDivideJoin, true)) | ||
958 | { | ||
959 | return; | ||
960 | } | ||
955 | 961 | ||
956 | //Loop through the points | 962 | //Loop through the points |
957 | try | 963 | try |
958 | { | 964 | { |
959 | int totalX = end_x - start_x; | 965 | for (int y = start_y; y < end_y; y++) |
960 | int totalY = end_y - start_y; | ||
961 | for (int y = 0; y < totalY; y++) | ||
962 | { | 966 | { |
963 | for (int x = 0; x < totalX; x++) | 967 | for (int x = start_x; x < end_x; x++) |
964 | { | 968 | { |
965 | ILandObject tempLandObject = GetLandObject(start_x + x, start_y + y); | 969 | ILandObject tempLandObject = GetLandObject(x, y); |
966 | if (tempLandObject == null) return; | 970 | if (tempLandObject == null) |
967 | if (tempLandObject != startLandObject) return; | 971 | return; |
972 | if (tempLandObject != startLandObject) | ||
973 | return; | ||
968 | } | 974 | } |
969 | } | 975 | } |
970 | } | 976 | } |
@@ -973,18 +979,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
973 | return; | 979 | return; |
974 | } | 980 | } |
975 | 981 | ||
976 | //If we are still here, then they are subdividing within one piece of land | ||
977 | //Check owner | ||
978 | if (!m_scene.Permissions.CanEditParcelProperties(attempting_user_id, startLandObject, GroupPowers.LandDivideJoin, true)) | ||
979 | { | ||
980 | return; | ||
981 | } | ||
982 | |||
983 | // invalidate landing point | ||
984 | startLandObject.LandData.LandingType = (byte)LandingType.None; | ||
985 | startLandObject.LandData.UserLocation = Vector3.Zero; | ||
986 | startLandObject.LandData.UserLookAt = Vector3.Zero; | ||
987 | |||
988 | //Lets create a new land object with bitmap activated at that point (keeping the old land objects info) | 982 | //Lets create a new land object with bitmap activated at that point (keeping the old land objects info) |
989 | ILandObject newLand = startLandObject.Copy(); | 983 | ILandObject newLand = startLandObject.Copy(); |
990 | 984 | ||
@@ -993,6 +987,10 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
993 | newLand.LandData.Dwell = 0; | 987 | newLand.LandData.Dwell = 0; |
994 | // Clear "Show in search" on the cut out parcel to prevent double-charging | 988 | // Clear "Show in search" on the cut out parcel to prevent double-charging |
995 | newLand.LandData.Flags &= ~(uint)ParcelFlags.ShowDirectory; | 989 | newLand.LandData.Flags &= ~(uint)ParcelFlags.ShowDirectory; |
990 | // invalidate landing point | ||
991 | newLand.LandData.LandingType = (byte)LandingType.Direct; | ||
992 | newLand.LandData.UserLocation = Vector3.Zero; | ||
993 | newLand.LandData.UserLookAt = Vector3.Zero; | ||
996 | 994 | ||
997 | newLand.SetLandBitmap(newLand.GetSquareLandBitmap(start_x, start_y, end_x, end_y)); | 995 | newLand.SetLandBitmap(newLand.GetSquareLandBitmap(start_x, start_y, end_x, end_y)); |
998 | 996 | ||
@@ -1010,6 +1008,19 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1010 | 1008 | ||
1011 | UpdateLandObject(startLandObject.LandData.LocalID, startLandObject.LandData); | 1009 | UpdateLandObject(startLandObject.LandData.LocalID, startLandObject.LandData); |
1012 | result.SendLandUpdateToAvatarsOverMe(); | 1010 | result.SendLandUpdateToAvatarsOverMe(); |
1011 | |||
1012 | if(startLandObject.LandData.LandingType == (byte)LandingType.LandingPoint) | ||
1013 | { | ||
1014 | int x = (int)startLandObject.LandData.UserLocation.X; | ||
1015 | int y = (int)startLandObject.LandData.UserLocation.Y; | ||
1016 | if(!startLandObject.ContainsPoint(x, y)) | ||
1017 | { | ||
1018 | startLandObject.LandData.LandingType = (byte)LandingType.Direct; | ||
1019 | startLandObject.LandData.UserLocation = Vector3.Zero; | ||
1020 | startLandObject.LandData.UserLookAt = Vector3.Zero; | ||
1021 | } | ||
1022 | } | ||
1023 | |||
1013 | startLandObject.SendLandUpdateToAvatarsOverMe(); | 1024 | startLandObject.SendLandUpdateToAvatarsOverMe(); |
1014 | m_scene.ForEachClient(SendParcelOverlay); | 1025 | m_scene.ForEachClient(SendParcelOverlay); |
1015 | 1026 | ||