diff options
author | Justin Clark-Casey (justincc) | 2011-04-05 21:25:54 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-04-05 21:25:54 +0100 |
commit | 0e465da187c93e7ff21f91742f75ee9f3b76b04e (patch) | |
tree | 0d7fdd229ad942886257d48723b25cf488695f70 /OpenSim/Region/CoreModules/World/Land/LandObject.cs | |
parent | replace magic numbers in llGetParcelPrimCount() with constants (diff) | |
download | opensim-SC_OLD-0e465da187c93e7ff21f91742f75ee9f3b76b04e.zip opensim-SC_OLD-0e465da187c93e7ff21f91742f75ee9f3b76b04e.tar.gz opensim-SC_OLD-0e465da187c93e7ff21f91742f75ee9f3b76b04e.tar.bz2 opensim-SC_OLD-0e465da187c93e7ff21f91742f75ee9f3b76b04e.tar.xz |
remove now unused individual LandData prim counts.
However, the calls to the land management module to record prims need to remain, since they were also being used to return owner object lists, etc.
This is probably why prim counts were being done there in the first place.
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Land/LandObject.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandObject.cs | 83 |
1 files changed, 16 insertions, 67 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index e7bdb19..9803bdf 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -64,8 +64,6 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
64 | 64 | ||
65 | #endregion | 65 | #endregion |
66 | 66 | ||
67 | #region ILandObject Members | ||
68 | |||
69 | public int GetPrimsFree() | 67 | public int GetPrimsFree() |
70 | { | 68 | { |
71 | m_scene.EventManager.TriggerParcelPrimCountUpdate(); | 69 | m_scene.EventManager.TriggerParcelPrimCountUpdate(); |
@@ -213,6 +211,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
213 | return simMax; | 211 | return simMax; |
214 | } | 212 | } |
215 | } | 213 | } |
214 | |||
216 | #endregion | 215 | #endregion |
217 | 216 | ||
218 | #region Packet Request Handling | 217 | #region Packet Request Handling |
@@ -909,9 +908,12 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
909 | 908 | ||
910 | lock (primsOverMe) | 909 | lock (primsOverMe) |
911 | { | 910 | { |
911 | // m_log.DebugFormat( | ||
912 | // "[LAND OBJECT]: Request for SendLandObjectOwners() from {0} with {1} known prims on region", | ||
913 | // remote_client.Name, primsOverMe.Count); | ||
914 | |||
912 | try | 915 | try |
913 | { | 916 | { |
914 | |||
915 | foreach (SceneObjectGroup obj in primsOverMe) | 917 | foreach (SceneObjectGroup obj in primsOverMe) |
916 | { | 918 | { |
917 | try | 919 | try |
@@ -950,6 +952,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
950 | public Dictionary<UUID, int> GetLandObjectOwners() | 952 | public Dictionary<UUID, int> GetLandObjectOwners() |
951 | { | 953 | { |
952 | Dictionary<UUID, int> ownersAndCount = new Dictionary<UUID, int>(); | 954 | Dictionary<UUID, int> ownersAndCount = new Dictionary<UUID, int>(); |
955 | |||
953 | lock (primsOverMe) | 956 | lock (primsOverMe) |
954 | { | 957 | { |
955 | try | 958 | try |
@@ -986,8 +989,10 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
986 | 989 | ||
987 | public void ReturnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client) | 990 | public void ReturnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client) |
988 | { | 991 | { |
989 | Dictionary<UUID,List<SceneObjectGroup>> returns = | 992 | // m_log.DebugFormat( |
990 | new Dictionary<UUID,List<SceneObjectGroup>>(); | 993 | // "[LAND OBJECT]: Request to return objects in {0} from {1}", LandData.Name, remote_client.Name); |
994 | |||
995 | Dictionary<UUID,List<SceneObjectGroup>> returns = new Dictionary<UUID,List<SceneObjectGroup>>(); | ||
991 | 996 | ||
992 | lock (primsOverMe) | 997 | lock (primsOverMe) |
993 | { | 998 | { |
@@ -1060,83 +1065,25 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1060 | 1065 | ||
1061 | #region Object Adding/Removing from Parcel | 1066 | #region Object Adding/Removing from Parcel |
1062 | 1067 | ||
1063 | public void ResetLandPrimCounts() | 1068 | public void ResetOverMeRecord() |
1064 | { | 1069 | { |
1065 | LandData.GroupPrims = 0; | ||
1066 | LandData.OwnerPrims = 0; | ||
1067 | LandData.OtherPrims = 0; | ||
1068 | LandData.SelectedPrims = 0; | ||
1069 | |||
1070 | |||
1071 | lock (primsOverMe) | 1070 | lock (primsOverMe) |
1072 | primsOverMe.Clear(); | 1071 | primsOverMe.Clear(); |
1073 | } | 1072 | } |
1074 | 1073 | ||
1075 | public void AddPrimToCount(SceneObjectGroup obj) | 1074 | public void AddPrimOverMe(SceneObjectGroup obj) |
1076 | { | 1075 | { |
1077 | |||
1078 | UUID prim_owner = obj.OwnerID; | ||
1079 | int prim_count = obj.PrimCount; | ||
1080 | |||
1081 | if (obj.IsSelected) | ||
1082 | { | ||
1083 | LandData.SelectedPrims += prim_count; | ||
1084 | } | ||
1085 | else | ||
1086 | { | ||
1087 | if (prim_owner == LandData.OwnerID) | ||
1088 | { | ||
1089 | LandData.OwnerPrims += prim_count; | ||
1090 | } | ||
1091 | else if ((obj.GroupID == LandData.GroupID || | ||
1092 | prim_owner == LandData.GroupID) && | ||
1093 | LandData.GroupID != UUID.Zero) | ||
1094 | { | ||
1095 | LandData.GroupPrims += prim_count; | ||
1096 | } | ||
1097 | else | ||
1098 | { | ||
1099 | LandData.OtherPrims += prim_count; | ||
1100 | } | ||
1101 | } | ||
1102 | |||
1103 | lock (primsOverMe) | 1076 | lock (primsOverMe) |
1104 | primsOverMe.Add(obj); | 1077 | primsOverMe.Add(obj); |
1105 | } | 1078 | } |
1106 | 1079 | ||
1107 | public void RemovePrimFromCount(SceneObjectGroup obj) | 1080 | public void RemovePrimFromOverMe(SceneObjectGroup obj) |
1108 | { | 1081 | { |
1109 | lock (primsOverMe) | 1082 | lock (primsOverMe) |
1110 | { | 1083 | primsOverMe.Remove(obj); |
1111 | if (primsOverMe.Contains(obj)) | ||
1112 | { | ||
1113 | UUID prim_owner = obj.OwnerID; | ||
1114 | int prim_count = obj.PrimCount; | ||
1115 | |||
1116 | if (prim_owner == LandData.OwnerID) | ||
1117 | { | ||
1118 | LandData.OwnerPrims -= prim_count; | ||
1119 | } | ||
1120 | else if (obj.GroupID == LandData.GroupID || | ||
1121 | prim_owner == LandData.GroupID) | ||
1122 | { | ||
1123 | LandData.GroupPrims -= prim_count; | ||
1124 | } | ||
1125 | else | ||
1126 | { | ||
1127 | LandData.OtherPrims -= prim_count; | ||
1128 | } | ||
1129 | |||
1130 | primsOverMe.Remove(obj); | ||
1131 | } | ||
1132 | } | ||
1133 | } | 1084 | } |
1134 | 1085 | ||
1135 | #endregion | 1086 | #endregion |
1136 | |||
1137 | #endregion | ||
1138 | |||
1139 | #endregion | ||
1140 | 1087 | ||
1141 | /// <summary> | 1088 | /// <summary> |
1142 | /// Set the media url for this land parcel | 1089 | /// Set the media url for this land parcel |
@@ -1157,5 +1104,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
1157 | LandData.MusicURL = url; | 1104 | LandData.MusicURL = url; |
1158 | SendLandUpdateToAvatarsOverMe(); | 1105 | SendLandUpdateToAvatarsOverMe(); |
1159 | } | 1106 | } |
1107 | |||
1108 | #endregion | ||
1160 | } | 1109 | } |
1161 | } | 1110 | } |