From 6ae04448f73afdca791ea185fdc0e9c062dea87b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 25 Mar 2011 23:05:51 +0000 Subject: Start using IPrimCounts populated by PrimCountModule instead of LandData counts populated by LandManagementModule. In order to pass ILandObject into IClientAPI.SendLandProperties(), had to push ILandObject and IPrimCounts into OpenSim.Framework from OpenSim.Region.Framework.Interfaces, in order to avoid ci Counts are showing odd behaviour at the moment, this will be addressed shortly. --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 35 ++++++++++++++-------- 1 file changed, 22 insertions(+), 13 deletions(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 2c6795f..6138056 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -4272,8 +4272,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP OutPacket(packet, ThrottleOutPacketType.Task); } - public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) + public void SendLandProperties( + int sequence_id, bool snap_selection, int request_result, ILandObject lo, + float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) { + LandData landData = lo.LandData; + ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage(); updateMessage.AABBMax = landData.AABBMax; @@ -4281,15 +4285,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP updateMessage.Area = landData.Area; updateMessage.AuctionID = landData.AuctionID; updateMessage.AuthBuyerID = landData.AuthBuyerID; - updateMessage.Bitmap = landData.Bitmap; - updateMessage.Desc = landData.Description; updateMessage.Category = landData.Category; updateMessage.ClaimDate = Util.ToDateTime(landData.ClaimDate); updateMessage.ClaimPrice = landData.ClaimPrice; - updateMessage.GroupID = landData.GroupID; - updateMessage.GroupPrims = landData.GroupPrims; + updateMessage.GroupID = landData.GroupID; updateMessage.IsGroupOwned = landData.IsGroupOwned; updateMessage.LandingType = (LandingType) landData.LandingType; updateMessage.LocalID = landData.LocalID; @@ -4310,9 +4311,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP updateMessage.Name = landData.Name; updateMessage.OtherCleanTime = landData.OtherCleanTime; updateMessage.OtherCount = 0; //TODO: Unimplemented - updateMessage.OtherPrims = landData.OtherPrims; - updateMessage.OwnerID = landData.OwnerID; - updateMessage.OwnerPrims = landData.OwnerPrims; + updateMessage.OwnerID = landData.OwnerID; updateMessage.ParcelFlags = (ParcelFlags) landData.Flags; updateMessage.ParcelPrimBonus = simObjectBonusFactor; updateMessage.PassHours = landData.PassHours; @@ -4327,10 +4326,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP updateMessage.RentPrice = 0; updateMessage.RequestResult = (ParcelResult) request_result; - updateMessage.SalePrice = landData.SalePrice; - updateMessage.SelectedPrims = landData.SelectedPrims; + updateMessage.SalePrice = landData.SalePrice; updateMessage.SelfCount = 0; //TODO: Unimplemented updateMessage.SequenceID = sequence_id; + if (landData.SimwideArea > 0) { int simulatorCapacity = (int)(((float)landData.SimwideArea / 65536.0f) * (float)m_scene.RegionInfo.ObjectCapacity * (float)m_scene.RegionInfo.RegionSettings.ObjectBonus); @@ -4340,12 +4339,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP { updateMessage.SimWideMaxPrims = 0; } - updateMessage.SimWideTotalPrims = landData.SimwidePrims; + updateMessage.SnapSelection = snap_selection; updateMessage.SnapshotID = landData.SnapshotID; updateMessage.Status = (ParcelStatus) landData.Status; - updateMessage.TotalPrims = landData.OwnerPrims + landData.GroupPrims + landData.OtherPrims + - landData.SelectedPrims; updateMessage.UserLocation = landData.UserLocation; updateMessage.UserLookAt = landData.UserLookAt; @@ -4356,6 +4353,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP updateMessage.MediaLoop = landData.MediaLoop; updateMessage.ObscureMusic = landData.ObscureMusic; updateMessage.ObscureMedia = landData.ObscureMedia; + + IPrimCounts pc = lo.PrimCounts; + updateMessage.OwnerPrims = pc.Owner; + updateMessage.GroupPrims = pc.Group; + updateMessage.OtherPrims = pc.Others; + updateMessage.SimWideTotalPrims = pc.Simulator; + + // FIXME: Need to do selected prims once this is reimplemented. + updateMessage.TotalPrims = pc.Owner + pc.Group + pc.Others; + + // TODO: Need to transfer selected prims to new prim count structure. + updateMessage.SelectedPrims = landData.SelectedPrims; try { -- cgit v1.1