aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Land
diff options
context:
space:
mode:
authorUbitUmarov2015-12-13 18:07:40 +0000
committerUbitUmarov2015-12-13 18:07:40 +0000
commit736bcc70feab07c6d5ad2987af0ff4c61222d7dc (patch)
treef75c50d1e762912ac35c53aeb52e4a076510ed45 /OpenSim/Region/CoreModules/World/Land
parentseveral changes to telehubs, LandPoint and land access (diff)
downloadopensim-SC-736bcc70feab07c6d5ad2987af0ff4c61222d7dc.zip
opensim-SC-736bcc70feab07c6d5ad2987af0ff4c61222d7dc.tar.gz
opensim-SC-736bcc70feab07c6d5ad2987af0ff4c61222d7dc.tar.bz2
opensim-SC-736bcc70feab07c6d5ad2987af0ff4c61222d7dc.tar.xz
change default landpoint type to anywhere (direct)
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Land')
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs51
1 files changed, 31 insertions, 20 deletions
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