diff options
author | Justin Clark-Casey (justincc) | 2011-03-25 23:05:51 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-03-25 23:05:51 +0000 |
commit | 6ae04448f73afdca791ea185fdc0e9c062dea87b (patch) | |
tree | 704c7f3722ae802543c9b0d01bd704ca33f4f720 /OpenSim/Region/ClientStack | |
parent | Add ILandObject.IPrimCounts for the new prim count module. (diff) | |
download | opensim-SC_OLD-6ae04448f73afdca791ea185fdc0e9c062dea87b.zip opensim-SC_OLD-6ae04448f73afdca791ea185fdc0e9c062dea87b.tar.gz opensim-SC_OLD-6ae04448f73afdca791ea185fdc0e9c062dea87b.tar.bz2 opensim-SC_OLD-6ae04448f73afdca791ea185fdc0e9c062dea87b.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 35 |
1 files changed, 22 insertions, 13 deletions
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 | |||
4272 | OutPacket(packet, ThrottleOutPacketType.Task); | 4272 | OutPacket(packet, ThrottleOutPacketType.Task); |
4273 | } | 4273 | } |
4274 | 4274 | ||
4275 | public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) | 4275 | public void SendLandProperties( |
4276 | int sequence_id, bool snap_selection, int request_result, ILandObject lo, | ||
4277 | float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) | ||
4276 | { | 4278 | { |
4279 | LandData landData = lo.LandData; | ||
4280 | |||
4277 | ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage(); | 4281 | ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage(); |
4278 | 4282 | ||
4279 | updateMessage.AABBMax = landData.AABBMax; | 4283 | updateMessage.AABBMax = landData.AABBMax; |
@@ -4281,15 +4285,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4281 | updateMessage.Area = landData.Area; | 4285 | updateMessage.Area = landData.Area; |
4282 | updateMessage.AuctionID = landData.AuctionID; | 4286 | updateMessage.AuctionID = landData.AuctionID; |
4283 | updateMessage.AuthBuyerID = landData.AuthBuyerID; | 4287 | updateMessage.AuthBuyerID = landData.AuthBuyerID; |
4284 | |||
4285 | updateMessage.Bitmap = landData.Bitmap; | 4288 | updateMessage.Bitmap = landData.Bitmap; |
4286 | |||
4287 | updateMessage.Desc = landData.Description; | 4289 | updateMessage.Desc = landData.Description; |
4288 | updateMessage.Category = landData.Category; | 4290 | updateMessage.Category = landData.Category; |
4289 | updateMessage.ClaimDate = Util.ToDateTime(landData.ClaimDate); | 4291 | updateMessage.ClaimDate = Util.ToDateTime(landData.ClaimDate); |
4290 | updateMessage.ClaimPrice = landData.ClaimPrice; | 4292 | updateMessage.ClaimPrice = landData.ClaimPrice; |
4291 | updateMessage.GroupID = landData.GroupID; | 4293 | updateMessage.GroupID = landData.GroupID; |
4292 | updateMessage.GroupPrims = landData.GroupPrims; | ||
4293 | updateMessage.IsGroupOwned = landData.IsGroupOwned; | 4294 | updateMessage.IsGroupOwned = landData.IsGroupOwned; |
4294 | updateMessage.LandingType = (LandingType) landData.LandingType; | 4295 | updateMessage.LandingType = (LandingType) landData.LandingType; |
4295 | updateMessage.LocalID = landData.LocalID; | 4296 | updateMessage.LocalID = landData.LocalID; |
@@ -4310,9 +4311,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4310 | updateMessage.Name = landData.Name; | 4311 | updateMessage.Name = landData.Name; |
4311 | updateMessage.OtherCleanTime = landData.OtherCleanTime; | 4312 | updateMessage.OtherCleanTime = landData.OtherCleanTime; |
4312 | updateMessage.OtherCount = 0; //TODO: Unimplemented | 4313 | updateMessage.OtherCount = 0; //TODO: Unimplemented |
4313 | updateMessage.OtherPrims = landData.OtherPrims; | 4314 | updateMessage.OwnerID = landData.OwnerID; |
4314 | updateMessage.OwnerID = landData.OwnerID; | ||
4315 | updateMessage.OwnerPrims = landData.OwnerPrims; | ||
4316 | updateMessage.ParcelFlags = (ParcelFlags) landData.Flags; | 4315 | updateMessage.ParcelFlags = (ParcelFlags) landData.Flags; |
4317 | updateMessage.ParcelPrimBonus = simObjectBonusFactor; | 4316 | updateMessage.ParcelPrimBonus = simObjectBonusFactor; |
4318 | updateMessage.PassHours = landData.PassHours; | 4317 | updateMessage.PassHours = landData.PassHours; |
@@ -4327,10 +4326,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4327 | 4326 | ||
4328 | updateMessage.RentPrice = 0; | 4327 | updateMessage.RentPrice = 0; |
4329 | updateMessage.RequestResult = (ParcelResult) request_result; | 4328 | updateMessage.RequestResult = (ParcelResult) request_result; |
4330 | updateMessage.SalePrice = landData.SalePrice; | 4329 | updateMessage.SalePrice = landData.SalePrice; |
4331 | updateMessage.SelectedPrims = landData.SelectedPrims; | ||
4332 | updateMessage.SelfCount = 0; //TODO: Unimplemented | 4330 | updateMessage.SelfCount = 0; //TODO: Unimplemented |
4333 | updateMessage.SequenceID = sequence_id; | 4331 | updateMessage.SequenceID = sequence_id; |
4332 | |||
4334 | if (landData.SimwideArea > 0) | 4333 | if (landData.SimwideArea > 0) |
4335 | { | 4334 | { |
4336 | int simulatorCapacity = (int)(((float)landData.SimwideArea / 65536.0f) * (float)m_scene.RegionInfo.ObjectCapacity * (float)m_scene.RegionInfo.RegionSettings.ObjectBonus); | 4335 | 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 | |||
4340 | { | 4339 | { |
4341 | updateMessage.SimWideMaxPrims = 0; | 4340 | updateMessage.SimWideMaxPrims = 0; |
4342 | } | 4341 | } |
4343 | updateMessage.SimWideTotalPrims = landData.SimwidePrims; | 4342 | |
4344 | updateMessage.SnapSelection = snap_selection; | 4343 | updateMessage.SnapSelection = snap_selection; |
4345 | updateMessage.SnapshotID = landData.SnapshotID; | 4344 | updateMessage.SnapshotID = landData.SnapshotID; |
4346 | updateMessage.Status = (ParcelStatus) landData.Status; | 4345 | updateMessage.Status = (ParcelStatus) landData.Status; |
4347 | updateMessage.TotalPrims = landData.OwnerPrims + landData.GroupPrims + landData.OtherPrims + | ||
4348 | landData.SelectedPrims; | ||
4349 | updateMessage.UserLocation = landData.UserLocation; | 4346 | updateMessage.UserLocation = landData.UserLocation; |
4350 | updateMessage.UserLookAt = landData.UserLookAt; | 4347 | updateMessage.UserLookAt = landData.UserLookAt; |
4351 | 4348 | ||
@@ -4356,6 +4353,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4356 | updateMessage.MediaLoop = landData.MediaLoop; | 4353 | updateMessage.MediaLoop = landData.MediaLoop; |
4357 | updateMessage.ObscureMusic = landData.ObscureMusic; | 4354 | updateMessage.ObscureMusic = landData.ObscureMusic; |
4358 | updateMessage.ObscureMedia = landData.ObscureMedia; | 4355 | updateMessage.ObscureMedia = landData.ObscureMedia; |
4356 | |||
4357 | IPrimCounts pc = lo.PrimCounts; | ||
4358 | updateMessage.OwnerPrims = pc.Owner; | ||
4359 | updateMessage.GroupPrims = pc.Group; | ||
4360 | updateMessage.OtherPrims = pc.Others; | ||
4361 | updateMessage.SimWideTotalPrims = pc.Simulator; | ||
4362 | |||
4363 | // FIXME: Need to do selected prims once this is reimplemented. | ||
4364 | updateMessage.TotalPrims = pc.Owner + pc.Group + pc.Others; | ||
4365 | |||
4366 | // TODO: Need to transfer selected prims to new prim count structure. | ||
4367 | updateMessage.SelectedPrims = landData.SelectedPrims; | ||
4359 | 4368 | ||
4360 | try | 4369 | try |
4361 | { | 4370 | { |