aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs132
1 files changed, 70 insertions, 62 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 092c96e..0d142f4 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -37,6 +37,7 @@ using System.Xml;
37using log4net; 37using log4net;
38using OpenMetaverse; 38using OpenMetaverse;
39using OpenMetaverse.Packets; 39using OpenMetaverse.Packets;
40using OpenMetaverse.Messages.Linden;
40using OpenMetaverse.StructuredData; 41using OpenMetaverse.StructuredData;
41using OpenSim.Framework; 42using OpenSim.Framework;
42using OpenSim.Framework.Client; 43using OpenSim.Framework.Client;
@@ -4199,94 +4200,101 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4199 4200
4200 public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) 4201 public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags)
4201 { 4202 {
4202 ParcelPropertiesPacket updatePacket = (ParcelPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ParcelProperties); 4203 ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage();
4203 // TODO: don't create new blocks if recycling an old packet
4204 4204
4205 updatePacket.ParcelData.AABBMax = landData.AABBMax; 4205 updateMessage.AABBMax = landData.AABBMax;
4206 updatePacket.ParcelData.AABBMin = landData.AABBMin; 4206 updateMessage.AABBMin = landData.AABBMin;
4207 updatePacket.ParcelData.Area = landData.Area; 4207 updateMessage.Area = landData.Area;
4208 updatePacket.ParcelData.AuctionID = landData.AuctionID; 4208 updateMessage.AuctionID = landData.AuctionID;
4209 updatePacket.ParcelData.AuthBuyerID = landData.AuthBuyerID; 4209 updateMessage.AuthBuyerID = landData.AuthBuyerID;
4210 4210
4211 updatePacket.ParcelData.Bitmap = landData.Bitmap; 4211 updateMessage.Bitmap = landData.Bitmap;
4212 4212
4213 updatePacket.ParcelData.Desc = Utils.StringToBytes(landData.Description); 4213 updateMessage.Desc = landData.Description;
4214 updatePacket.ParcelData.Category = (byte)landData.Category; 4214 updateMessage.Category = landData.Category;
4215 updatePacket.ParcelData.ClaimDate = landData.ClaimDate; 4215 updateMessage.ClaimDate = Util.ToDateTime(landData.ClaimDate);
4216 updatePacket.ParcelData.ClaimPrice = landData.ClaimPrice; 4216 updateMessage.ClaimPrice = landData.ClaimPrice;
4217 updatePacket.ParcelData.GroupID = landData.GroupID; 4217 updateMessage.GroupID = landData.GroupID;
4218 updatePacket.ParcelData.GroupPrims = landData.GroupPrims; 4218 updateMessage.GroupPrims = landData.GroupPrims;
4219 updatePacket.ParcelData.IsGroupOwned = landData.IsGroupOwned; 4219 updateMessage.IsGroupOwned = landData.IsGroupOwned;
4220 updatePacket.ParcelData.LandingType = landData.LandingType; 4220 updateMessage.LandingType = (LandingType) landData.LandingType;
4221 updatePacket.ParcelData.LocalID = landData.LocalID; 4221 updateMessage.LocalID = landData.LocalID;
4222 4222
4223 if (landData.Area > 0) 4223 if (landData.Area > 0)
4224 { 4224 {
4225 updatePacket.ParcelData.MaxPrims = parcelObjectCapacity; 4225 updateMessage.MaxPrims = parcelObjectCapacity;
4226 } 4226 }
4227 else 4227 else
4228 { 4228 {
4229 updatePacket.ParcelData.MaxPrims = 0; 4229 updateMessage.MaxPrims = 0;
4230 } 4230 }
4231 4231
4232 updatePacket.ParcelData.MediaAutoScale = landData.MediaAutoScale; 4232 updateMessage.MediaAutoScale = Convert.ToBoolean(landData.MediaAutoScale);
4233 updatePacket.ParcelData.MediaID = landData.MediaID; 4233 updateMessage.MediaID = landData.MediaID;
4234 updatePacket.ParcelData.MediaURL = Util.StringToBytes256(landData.MediaURL); 4234 updateMessage.MediaURL = landData.MediaURL;
4235 updatePacket.ParcelData.MusicURL = Util.StringToBytes256(landData.MusicURL); 4235 updateMessage.MusicURL = landData.MusicURL;
4236 updatePacket.ParcelData.Name = Util.StringToBytes256(landData.Name); 4236 updateMessage.Name = landData.Name;
4237 updatePacket.ParcelData.OtherCleanTime = landData.OtherCleanTime; 4237 updateMessage.OtherCleanTime = landData.OtherCleanTime;
4238 updatePacket.ParcelData.OtherCount = 0; //TODO: Unimplemented 4238 updateMessage.OtherCount = 0; //TODO: Unimplemented
4239 updatePacket.ParcelData.OtherPrims = landData.OtherPrims; 4239 updateMessage.OtherPrims = landData.OtherPrims;
4240 updatePacket.ParcelData.OwnerID = landData.OwnerID; 4240 updateMessage.OwnerID = landData.OwnerID;
4241 updatePacket.ParcelData.OwnerPrims = landData.OwnerPrims; 4241 updateMessage.OwnerPrims = landData.OwnerPrims;
4242 updatePacket.ParcelData.ParcelFlags = landData.Flags; 4242 updateMessage.ParcelFlags = (ParcelFlags) landData.Flags;
4243 updatePacket.ParcelData.ParcelPrimBonus = simObjectBonusFactor; 4243 updateMessage.ParcelPrimBonus = simObjectBonusFactor;
4244 updatePacket.ParcelData.PassHours = landData.PassHours; 4244 updateMessage.PassHours = landData.PassHours;
4245 updatePacket.ParcelData.PassPrice = landData.PassPrice; 4245 updateMessage.PassPrice = landData.PassPrice;
4246 updatePacket.ParcelData.PublicCount = 0; //TODO: Unimplemented 4246 updateMessage.PublicCount = 0; //TODO: Unimplemented
4247 4247
4248 updatePacket.ParcelData.RegionDenyAnonymous = (regionFlags & (uint)RegionFlags.DenyAnonymous) > 0; 4248 updateMessage.RegionPushOverride = (regionFlags & (uint)RegionFlags.RestrictPushObject) > 0;
4249 updatePacket.ParcelData.RegionDenyIdentified = (regionFlags & (uint)RegionFlags.DenyIdentified) > 0; 4249 updateMessage.RegionDenyAnonymous = (regionFlags & (uint)RegionFlags.DenyAnonymous) > 0;
4250 updatePacket.ParcelData.RegionDenyTransacted = (regionFlags & (uint)RegionFlags.DenyTransacted) > 0; 4250
4251 updatePacket.ParcelData.RegionPushOverride = (regionFlags & (uint)RegionFlags.RestrictPushObject) > 0; 4251 //updateMessage.RegionDenyIdentified = (regionFlags & (uint)RegionFlags.DenyIdentified) > 0;
4252 4252 //updateMessage.RegionDenyTransacted = (regionFlags & (uint)RegionFlags.DenyTransacted) > 0;
4253 updatePacket.ParcelData.RentPrice = 0; 4253
4254 updatePacket.ParcelData.RequestResult = request_result; 4254 updateMessage.RentPrice = 0;
4255 updatePacket.ParcelData.SalePrice = landData.SalePrice; 4255 updateMessage.RequestResult = (ParcelResult) request_result;
4256 updatePacket.ParcelData.SelectedPrims = landData.SelectedPrims; 4256 updateMessage.SalePrice = landData.SalePrice;
4257 updatePacket.ParcelData.SelfCount = 0; //TODO: Unimplemented 4257 updateMessage.SelectedPrims = landData.SelectedPrims;
4258 updatePacket.ParcelData.SequenceID = sequence_id; 4258 updateMessage.SelfCount = 0; //TODO: Unimplemented
4259 updateMessage.SequenceID = sequence_id;
4259 if (landData.SimwideArea > 0) 4260 if (landData.SimwideArea > 0)
4260 { 4261 {
4261 updatePacket.ParcelData.SimWideMaxPrims = parcelObjectCapacity; 4262 updateMessage.SimWideMaxPrims = parcelObjectCapacity;
4262 } 4263 }
4263 else 4264 else
4264 { 4265 {
4265 updatePacket.ParcelData.SimWideMaxPrims = 0; 4266 updateMessage.SimWideMaxPrims = 0;
4266 } 4267 }
4267 updatePacket.ParcelData.SimWideTotalPrims = landData.SimwidePrims; 4268 updateMessage.SimWideTotalPrims = landData.SimwidePrims;
4268 updatePacket.ParcelData.SnapSelection = snap_selection; 4269 updateMessage.SnapSelection = snap_selection;
4269 updatePacket.ParcelData.SnapshotID = landData.SnapshotID; 4270 updateMessage.SnapshotID = landData.SnapshotID;
4270 updatePacket.ParcelData.Status = (byte)landData.Status; 4271 updateMessage.Status = (ParcelStatus) landData.Status;
4271 updatePacket.ParcelData.TotalPrims = landData.OwnerPrims + landData.GroupPrims + landData.OtherPrims + 4272 updateMessage.TotalPrims = landData.OwnerPrims + landData.GroupPrims + landData.OtherPrims +
4272 landData.SelectedPrims; 4273 landData.SelectedPrims;
4273 updatePacket.ParcelData.UserLocation = landData.UserLocation; 4274 updateMessage.UserLocation = landData.UserLocation;
4274 updatePacket.ParcelData.UserLookAt = landData.UserLookAt; 4275 updateMessage.UserLookAt = landData.UserLookAt;
4275 updatePacket.Header.Zerocoded = true; 4276
4277 updateMessage.MediaType = landData.MediaType;
4278 updateMessage.MediaDesc = landData.MediaDescription;
4279 updateMessage.MediaWidth = landData.MediaWidth;
4280 updateMessage.MediaHeight = landData.MediaHeight;
4281 updateMessage.MediaLoop = landData.MediaLoop;
4282 updateMessage.ObscureMusic = landData.ObscureMusic;
4283 updateMessage.ObscureMedia = landData.ObscureMedia;
4276 4284
4277 try 4285 try
4278 { 4286 {
4279 IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>(); 4287 IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
4280 if (eq != null) 4288 if (eq != null)
4281 { 4289 {
4282 eq.ParcelProperties(updatePacket, this.AgentId); 4290 eq.ParcelProperties(updateMessage, this.AgentId);
4283 } 4291 } else {
4292 m_log.Warn("No EQ Interface when sending parcel data.");
4293 }
4284 } 4294 }
4285 catch (Exception ex) 4295 catch (Exception ex)
4286 { 4296 {
4287 m_log.Error("Unable to send parcel data via eventqueue - exception: " + ex.ToString()); 4297 m_log.Error("Unable to send parcel data via eventqueue - exception: " + ex.ToString());
4288 m_log.Warn("sending parcel data via UDP");
4289 OutPacket(updatePacket, ThrottleOutPacketType.Task);
4290 } 4298 }
4291 } 4299 }
4292 4300