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.
0.7.1-dev
Justin Clark-Casey (justincc) 2011-04-05 21:25:54 +01:00
parent f030ba8992
commit 0e465da187
9 changed files with 31 additions and 196 deletions

View File

@ -77,7 +77,6 @@ namespace OpenSim.Region.Framework.Interfaces
/// </param>
void Clear(bool setupDefaultParcel);
bool IsLandPrimCountTainted();
bool IsForcefulBansAllowed();
void UpdateLandObject(int localID, LandData data);
void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient);

View File

@ -89,7 +89,7 @@ namespace OpenSim.Framework
void SendForceObjectSelect(int local_id, int request_type, List<UUID> returnIDs, IClientAPI remote_client);
void SendLandObjectOwners(IClientAPI remote_client);
void ReturnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client);
void ResetLandPrimCounts();
void ResetOverMeRecord();
void UpdateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area);
void DeedToGroup(UUID groupID);

View File

@ -54,12 +54,10 @@ namespace OpenSim.Framework
private int _claimPrice = 0; //Unemplemented
private UUID _globalID = UUID.Zero;
private UUID _groupID = UUID.Zero;
private int _groupPrims = 0;
private bool _isGroupOwned = false;
private byte[] _bitmap = new byte[512];
private string _description = String.Empty;
private uint _flags = (uint) ParcelFlags.AllowFly | (uint) ParcelFlags.AllowLandmark |
(uint) ParcelFlags.AllowAPrimitiveEntry |
(uint) ParcelFlags.AllowDeedToGroup | (uint) ParcelFlags.AllowTerraform |
@ -72,17 +70,13 @@ namespace OpenSim.Framework
private int _localID = 0;
private byte _mediaAutoScale = 0;
private UUID _mediaID = UUID.Zero;
private string _mediaURL = String.Empty;
private string _musicURL = String.Empty;
private int _otherPrims = 0;
private UUID _ownerID = UUID.Zero;
private int _ownerPrims = 0;
private List<ParcelManager.ParcelAccessEntry> _parcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
private float _passHours = 0;
private int _passPrice = 0;
private int _salePrice = 0; //Unemeplemented. Parcels price.
private int _selectedPrims = 0;
private int _simwideArea = 0;
private int _simwidePrims = 0;
private UUID _snapshotID = UUID.Zero;
@ -283,19 +277,6 @@ namespace OpenSim.Framework
}
}
/// <summary>
/// Number of SceneObjectPart that are owned by a Group
/// </summary>
[XmlIgnore]
public int GroupPrims {
get {
return _groupPrims;
}
set {
_groupPrims = value;
}
}
/// <summary>
/// Returns true if the Land Parcel is owned by a group
/// </summary>
@ -453,20 +434,6 @@ namespace OpenSim.Framework
}
}
/// <summary>
/// Number of SceneObjectPart that are owned by users who do not own the parcel
/// and don't have the 'group. These are elegable for AutoReturn collection
/// </summary>
[XmlIgnore]
public int OtherPrims {
get {
return _otherPrims;
}
set {
_otherPrims = value;
}
}
/// <summary>
/// Owner Avatar or Group of the parcel. Naturally, all land masses must be
/// owned by someone
@ -480,19 +447,6 @@ namespace OpenSim.Framework
}
}
/// <summary>
/// Number of SceneObjectPart that are owned by the owner of the parcel
/// </summary>
[XmlIgnore]
public int OwnerPrims {
get {
return _ownerPrims;
}
set {
_ownerPrims = value;
}
}
/// <summary>
/// List of access data for the parcel. User data, some bitflags, and a time
/// </summary>
@ -541,19 +495,6 @@ namespace OpenSim.Framework
}
}
/// <summary>
/// Number of SceneObjectPart that are currently selected by avatar
/// </summary>
[XmlIgnore]
public int SelectedPrims {
get {
return _selectedPrims;
}
set {
_selectedPrims = value;
}
}
/// <summary>
/// Number of meters^2 in the Simulator
/// </summary>
@ -666,10 +607,6 @@ namespace OpenSim.Framework
landData._claimPrice = _claimPrice;
landData._globalID = _globalID;
landData._groupID = _groupID;
landData._groupPrims = _groupPrims;
landData._otherPrims = _otherPrims;
landData._ownerPrims = _ownerPrims;
landData._selectedPrims = _selectedPrims;
landData._isGroupOwned = _isGroupOwned;
landData._localID = _localID;
landData._landingType = _landingType;
@ -731,4 +668,4 @@ namespace OpenSim.Framework
return land;
}
}
}
}

View File

@ -42,10 +42,7 @@ namespace OpenSim.Framework.Serialization.Tests
private LandData landWithParcelAccessList;
private static string preSerialized = "<?xml version=\"1.0\" encoding=\"utf-16\"?>\n<LandData>\n <Area>128</Area>\n <AuctionID>0</AuctionID>\n <AuthBuyerID>00000000-0000-0000-0000-000000000000</AuthBuyerID>\n <Category>10</Category>\n <ClaimDate>0</ClaimDate>\n <ClaimPrice>0</ClaimPrice>\n <GlobalID>54ff9641-dd40-4a2c-b1f1-47dd3af24e50</GlobalID>\n <GroupID>d740204e-bbbf-44aa-949d-02c7d739f6a5</GroupID>\n <IsGroupOwned>False</IsGroupOwned>\n <Bitmap>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</Bitmap>\n <Description>land data to test LandDataSerializer</Description>\n <Flags>536870944</Flags>\n <LandingType>2</LandingType>\n <Name>LandDataSerializerTest Land</Name>\n <Status>0</Status>\n <LocalID>0</LocalID>\n <MediaAutoScale>1</MediaAutoScale>\n <MediaID>d4452578-2f25-4b97-a81b-819af559cfd7</MediaID>\n <MediaURL>http://videos.opensimulator.org/bumblebee.mp4</MediaURL>\n <MusicURL />\n <OwnerID>1b8eedf9-6d15-448b-8015-24286f1756bf</OwnerID>\n <ParcelAccessList />\n <PassHours>0</PassHours>\n <PassPrice>0</PassPrice>\n <SalePrice>0</SalePrice>\n <SnapshotID>00000000-0000-0000-0000-000000000000</SnapshotID>\n <UserLocation>&lt;0, 0, 0&gt;</UserLocation>\n <UserLookAt>&lt;0, 0, 0&gt;</UserLookAt>\n <Dwell>0</Dwell>\n <OtherCleanTime>0</OtherCleanTime>\n</LandData>";
private static string preSerializedWithParcelAccessList = "<?xml version=\"1.0\" encoding=\"utf-16\"?>\n<LandData>\n <Area>128</Area>\n <AuctionID>0</AuctionID>\n <AuthBuyerID>00000000-0000-0000-0000-000000000000</AuthBuyerID>\n <Category>10</Category>\n <ClaimDate>0</ClaimDate>\n <ClaimPrice>0</ClaimPrice>\n <GlobalID>54ff9641-dd40-4a2c-b1f1-47dd3af24e50</GlobalID>\n <GroupID>d740204e-bbbf-44aa-949d-02c7d739f6a5</GroupID>\n <IsGroupOwned>False</IsGroupOwned>\n <Bitmap>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</Bitmap>\n <Description>land data to test LandDataSerializer</Description>\n <Flags>536870944</Flags>\n <LandingType>2</LandingType>\n <Name>LandDataSerializerTest Land</Name>\n <Status>0</Status>\n <LocalID>0</LocalID>\n <MediaAutoScale>1</MediaAutoScale>\n <MediaID>d4452578-2f25-4b97-a81b-819af559cfd7</MediaID>\n <MediaURL>http://videos.opensimulator.org/bumblebee.mp4</MediaURL>\n <MusicURL />\n <OwnerID>1b8eedf9-6d15-448b-8015-24286f1756bf</OwnerID>\n <ParcelAccessList>\n <ParcelAccessEntry>\n <AgentID>62d65d45-c91a-4f77-862c-46557d978b6c</AgentID>\n <Time>2009-10-01T00:00:00</Time>\n <AccessList>2</AccessList>\n </ParcelAccessEntry>\n <ParcelAccessEntry>\n <AgentID>ec2a8d18-2378-4fe0-8b68-2a31b57c481e</AgentID>\n <Time>2010-10-20T00:00:00</Time>\n <AccessList>1</AccessList>\n </ParcelAccessEntry>\n </ParcelAccessList>\n <PassHours>0</PassHours>\n <PassPrice>0</PassPrice>\n <SalePrice>0</SalePrice>\n <SnapshotID>00000000-0000-0000-0000-000000000000</SnapshotID>\n <UserLocation>&lt;0, 0, 0&gt;</UserLocation>\n <UserLookAt>&lt;0, 0, 0&gt;</UserLookAt>\n <Dwell>0</Dwell>\n <OtherCleanTime>0</OtherCleanTime>\n</LandData>";
private static string preSerializedWithParcelAccessList = "<?xml version=\"1.0\" encoding=\"utf-16\"?>\n<LandData>\n <Area>128</Area>\n <AuctionID>0</AuctionID>\n <AuthBuyerID>00000000-0000-0000-0000-000000000000</AuthBuyerID>\n <Category>10</Category>\n <ClaimDate>0</ClaimDate>\n <ClaimPrice>0</ClaimPrice>\n <GlobalID>54ff9641-dd40-4a2c-b1f1-47dd3af24e50</GlobalID>\n <GroupID>d740204e-bbbf-44aa-949d-02c7d739f6a5</GroupID>\n <IsGroupOwned>False</IsGroupOwned>\n <Bitmap>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=</Bitmap>\n <Description>land data to test LandDataSerializer</Description>\n <Flags>536870944</Flags>\n <LandingType>2</LandingType>\n <Name>LandDataSerializerTest Land</Name>\n <Status>0</Status>\n <LocalID>0</LocalID>\n <MediaAutoScale>1</MediaAutoScale>\n <MediaID>d4452578-2f25-4b97-a81b-819af559cfd7</MediaID>\n <MediaURL>http://videos.opensimulator.org/bumblebee.mp4</MediaURL>\n <MusicURL />\n <OwnerID>1b8eedf9-6d15-448b-8015-24286f1756bf</OwnerID>\n <ParcelAccessList>\n <ParcelAccessEntry>\n <AgentID>62d65d45-c91a-4f77-862c-46557d978b6c</AgentID>\n <Time>2009-10-01T00:00:00</Time>\n <AccessList>2</AccessList>\n </ParcelAccessEntry>\n <ParcelAccessEntry>\n <AgentID>ec2a8d18-2378-4fe0-8b68-2a31b57c481e</AgentID>\n <Time>2010-10-20T00:00:00</Time>\n <AccessList>1</AccessList>\n </ParcelAccessEntry>\n </ParcelAccessList>\n <PassHours>0</PassHours>\n <PassPrice>0</PassPrice>\n <SalePrice>0</SalePrice>\n <SnapshotID>00000000-0000-0000-0000-000000000000</SnapshotID>\n <UserLocation>&lt;0, 0, 0&gt;</UserLocation>\n <UserLookAt>&lt;0, 0, 0&gt;</UserLookAt>\n <Dwell>0</Dwell>\n <OtherCleanTime>0</OtherCleanTime>\n</LandData>";
[SetUp]
public void setup()
@ -62,7 +59,6 @@ namespace OpenSim.Framework.Serialization.Tests
this.land.ClaimPrice = 0;
this.land.GlobalID = new UUID("54ff9641-dd40-4a2c-b1f1-47dd3af24e50");
this.land.GroupID = new UUID("d740204e-bbbf-44aa-949d-02c7d739f6a5");
this.land.GroupPrims = 0;
this.land.Description = "land data to test LandDataSerializer";
this.land.Flags = (uint)(ParcelFlags.AllowDamage | ParcelFlags.AllowVoiceChat);
this.land.LandingType = (byte)LandingType.Direct;
@ -132,4 +128,4 @@ namespace OpenSim.Framework.Serialization.Tests
"Reified LandData.Name != original LandData.Name (pre-serialized with parcel access list)");
}
}
}
}

View File

@ -133,16 +133,6 @@ namespace OpenSim.Region.CoreModules.World.Land
return new List<ILandObject>();
}
public bool IsLandPrimCountTainted()
{
if (m_landManagementModule != null)
{
return m_landManagementModule.IsLandPrimCountTainted();
}
return false;
}
public bool IsForcefulBansAllowed()
{
if (m_landManagementModule != null)

View File

@ -89,7 +89,6 @@ namespace OpenSim.Region.CoreModules.World.Land
/// </value>
private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>();
private bool m_landPrimCountTainted;
private int m_lastLandLocalID = LandChannel.START_LAND_LOCAL_ID - 1;
private bool m_allowedForcefulBans = true;
@ -122,18 +121,18 @@ namespace OpenSim.Region.CoreModules.World.Land
m_scene.EventManager.OnParcelPrimCountAdd += EventManagerOnParcelPrimCountAdd;
m_scene.EventManager.OnParcelPrimCountUpdate += EventManagerOnParcelPrimCountUpdate;
m_scene.EventManager.OnObjectBeingRemovedFromScene += EventManagerOnObjectBeingRemovedFromScene;
m_scene.EventManager.OnRequestParcelPrimCountUpdate += EventManagerOnRequestParcelPrimCountUpdate;
m_scene.EventManager.OnAvatarEnteringNewParcel += EventManagerOnAvatarEnteringNewParcel;
m_scene.EventManager.OnClientMovement += EventManagerOnClientMovement;
m_scene.EventManager.OnValidateLandBuy += EventManagerOnValidateLandBuy;
m_scene.EventManager.OnLandBuy += EventManagerOnLandBuy;
m_scene.EventManager.OnNewClient += EventManagerOnNewClient;
m_scene.EventManager.OnSignificantClientMovement += EventManagerOnSignificantClientMovement;
m_scene.EventManager.OnObjectBeingRemovedFromScene += EventManagerOnObjectBeingRemovedFromScene;
m_scene.EventManager.OnNoticeNoLandDataFromStorage += EventManagerOnNoLandDataFromStorage;
m_scene.EventManager.OnIncomingLandDataFromStorage += EventManagerOnIncomingLandDataFromStorage;
m_scene.EventManager.OnSetAllowForcefulBan += EventManagerOnSetAllowedForcefulBan;
m_scene.EventManager.OnRequestParcelPrimCountUpdate += EventManagerOnRequestParcelPrimCountUpdate;
m_scene.EventManager.OnParcelPrimCountTainted += EventManagerOnParcelPrimCountTainted;
m_scene.EventManager.OnSetAllowForcefulBan += EventManagerOnSetAllowedForcefulBan;
m_scene.EventManager.OnRegisterCaps += EventManagerOnRegisterCaps;
m_scene.EventManager.OnPluginConsole += EventManagerOnPluginConsole;
@ -779,34 +778,24 @@ namespace OpenSim.Region.CoreModules.World.Land
#region Parcel Modification
public void ResetAllLandPrimCounts()
public void ResetOverMeRecord()
{
lock (m_landList)
{
foreach (LandObject p in m_landList.Values)
{
p.ResetLandPrimCounts();
p.ResetOverMeRecord();
}
}
}
public void EventManagerOnParcelPrimCountTainted()
{
m_landPrimCountTainted = true;
}
public bool IsLandPrimCountTainted()
{
return m_landPrimCountTainted;
}
public void EventManagerOnParcelPrimCountAdd(SceneObjectGroup obj)
{
Vector3 position = obj.AbsolutePosition;
ILandObject landUnderPrim = GetLandObject(position.X, position.Y);
if (landUnderPrim != null)
{
((LandObject)landUnderPrim).AddPrimToCount(obj);
((LandObject)landUnderPrim).AddPrimOverMe(obj);
}
}
@ -816,7 +805,7 @@ namespace OpenSim.Region.CoreModules.World.Land
{
foreach (LandObject p in m_landList.Values)
{
p.RemovePrimFromCount(obj);
p.RemovePrimFromOverMe(obj);
}
}
}
@ -849,8 +838,7 @@ namespace OpenSim.Region.CoreModules.World.Land
foreach (LandObject p in landOwnersAndParcels[owner])
{
simArea += p.LandData.Area;
simPrims += p.LandData.OwnerPrims + p.LandData.OtherPrims + p.LandData.GroupPrims +
p.LandData.SelectedPrims;
simPrims += p.PrimCounts.Total;
}
foreach (LandObject p in landOwnersAndParcels[owner])
@ -867,7 +855,7 @@ namespace OpenSim.Region.CoreModules.World.Land
// "[LAND MANAGEMENT MODULE]: Triggered EventManagerOnParcelPrimCountUpdate() for {0}",
// m_scene.RegionInfo.RegionName);
ResetAllLandPrimCounts();
ResetOverMeRecord();
EntityBase[] entities = m_scene.Entities.GetEntities();
foreach (EntityBase obj in entities)
{
@ -880,15 +868,13 @@ namespace OpenSim.Region.CoreModules.World.Land
}
}
FinalizeLandPrimCountUpdate();
m_landPrimCountTainted = false;
}
public void EventManagerOnRequestParcelPrimCountUpdate()
{
ResetAllLandPrimCounts();
ResetOverMeRecord();
m_scene.EventManager.TriggerParcelPrimCountUpdate();
FinalizeLandPrimCountUpdate();
m_landPrimCountTainted = false;
}
/// <summary>
@ -952,8 +938,6 @@ namespace OpenSim.Region.CoreModules.World.Land
m_landList[startLandObjectIndex].ForceUpdateLandInfo();
}
EventManagerOnParcelPrimCountTainted();
//Now add the new land object
ILandObject result = AddLandObject(newLand);
UpdateLandObject(startLandObject.LandData.LocalID, startLandObject.LandData);
@ -1020,7 +1004,6 @@ namespace OpenSim.Region.CoreModules.World.Land
performFinalLandJoin(masterLandObject, slaveLandObject);
}
}
EventManagerOnParcelPrimCountTainted();
masterLandObject.SendLandUpdateToAvatarsOverMe();
}

View File

@ -64,8 +64,6 @@ namespace OpenSim.Region.CoreModules.World.Land
#endregion
#region ILandObject Members
public int GetPrimsFree()
{
m_scene.EventManager.TriggerParcelPrimCountUpdate();
@ -213,6 +211,7 @@ namespace OpenSim.Region.CoreModules.World.Land
return simMax;
}
}
#endregion
#region Packet Request Handling
@ -909,9 +908,12 @@ namespace OpenSim.Region.CoreModules.World.Land
lock (primsOverMe)
{
// m_log.DebugFormat(
// "[LAND OBJECT]: Request for SendLandObjectOwners() from {0} with {1} known prims on region",
// remote_client.Name, primsOverMe.Count);
try
{
foreach (SceneObjectGroup obj in primsOverMe)
{
try
@ -950,6 +952,7 @@ namespace OpenSim.Region.CoreModules.World.Land
public Dictionary<UUID, int> GetLandObjectOwners()
{
Dictionary<UUID, int> ownersAndCount = new Dictionary<UUID, int>();
lock (primsOverMe)
{
try
@ -986,8 +989,10 @@ namespace OpenSim.Region.CoreModules.World.Land
public void ReturnLandObjects(uint type, UUID[] owners, UUID[] tasks, IClientAPI remote_client)
{
Dictionary<UUID,List<SceneObjectGroup>> returns =
new Dictionary<UUID,List<SceneObjectGroup>>();
// m_log.DebugFormat(
// "[LAND OBJECT]: Request to return objects in {0} from {1}", LandData.Name, remote_client.Name);
Dictionary<UUID,List<SceneObjectGroup>> returns = new Dictionary<UUID,List<SceneObjectGroup>>();
lock (primsOverMe)
{
@ -1060,82 +1065,24 @@ namespace OpenSim.Region.CoreModules.World.Land
#region Object Adding/Removing from Parcel
public void ResetLandPrimCounts()
public void ResetOverMeRecord()
{
LandData.GroupPrims = 0;
LandData.OwnerPrims = 0;
LandData.OtherPrims = 0;
LandData.SelectedPrims = 0;
lock (primsOverMe)
primsOverMe.Clear();
}
public void AddPrimToCount(SceneObjectGroup obj)
public void AddPrimOverMe(SceneObjectGroup obj)
{
UUID prim_owner = obj.OwnerID;
int prim_count = obj.PrimCount;
if (obj.IsSelected)
{
LandData.SelectedPrims += prim_count;
}
else
{
if (prim_owner == LandData.OwnerID)
{
LandData.OwnerPrims += prim_count;
}
else if ((obj.GroupID == LandData.GroupID ||
prim_owner == LandData.GroupID) &&
LandData.GroupID != UUID.Zero)
{
LandData.GroupPrims += prim_count;
}
else
{
LandData.OtherPrims += prim_count;
}
}
lock (primsOverMe)
primsOverMe.Add(obj);
}
public void RemovePrimFromCount(SceneObjectGroup obj)
public void RemovePrimFromOverMe(SceneObjectGroup obj)
{
lock (primsOverMe)
{
if (primsOverMe.Contains(obj))
{
UUID prim_owner = obj.OwnerID;
int prim_count = obj.PrimCount;
if (prim_owner == LandData.OwnerID)
{
LandData.OwnerPrims -= prim_count;
}
else if (obj.GroupID == LandData.GroupID ||
prim_owner == LandData.GroupID)
{
LandData.GroupPrims -= prim_count;
}
else
{
LandData.OtherPrims -= prim_count;
}
primsOverMe.Remove(obj);
}
}
primsOverMe.Remove(obj);
}
#endregion
#endregion
#endregion
/// <summary>
@ -1157,5 +1104,7 @@ namespace OpenSim.Region.CoreModules.World.Land
LandData.MusicURL = url;
SendLandUpdateToAvatarsOverMe();
}
#endregion
}
}

View File

@ -1427,20 +1427,6 @@ namespace OpenSim.Region.Framework.Scenes
);
}
/// <summary>
/// Recount SceneObjectPart in parcel aabb
/// </summary>
private void UpdateLand()
{
if (LandChannel != null)
{
if (LandChannel.IsLandPrimCountTainted())
{
EventManager.TriggerParcelPrimCountUpdate();
}
}
}
/// <summary>
/// Update the terrain if it needs to be updated.
/// </summary>

View File

@ -130,11 +130,6 @@ public class RegionCombinerLargeLandChannel : ILandChannel
}
}
public bool IsLandPrimCountTainted()
{
return RootRegionLandChannel.IsLandPrimCountTainted();
}
public bool IsForcefulBansAllowed()
{
return RootRegionLandChannel.IsForcefulBansAllowed();