aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden')
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs17
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs370
2 files changed, 239 insertions, 148 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
index 4da4412..58860b0 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/EventQueue/EventQueueGetModule.cs
@@ -499,6 +499,23 @@ namespace OpenSim.Region.ClientStack.Linden
499 Enqueue(item, avatarID); 499 Enqueue(item, avatarID);
500 } 500 }
501*/ 501*/
502 public StringBuilder StartEvent(string eventName)
503 {
504 StringBuilder sb = new StringBuilder(256);
505 LLSDxmlEncode.AddMap(sb);
506 LLSDxmlEncode.AddElem("message", eventName, sb);
507 LLSDxmlEncode.AddMap("body", sb);
508
509 return sb;
510 }
511
512 public string EndEvent(StringBuilder sb)
513 {
514 LLSDxmlEncode.AddEndMap(sb); // close body
515 LLSDxmlEncode.AddEndMap(sb); // close event
516 return sb.ToString();
517 }
518
502 public virtual void EnableSimulator(ulong handle, IPEndPoint endPoint, UUID avatarID, int regionSizeX, int regionSizeY) 519 public virtual void EnableSimulator(ulong handle, IPEndPoint endPoint, UUID avatarID, int regionSizeX, int regionSizeY)
503 { 520 {
504 if (DebugLevel > 0) 521 if (DebugLevel > 0)
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index cbb1075..fa619c7 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -30,6 +30,7 @@ using System.Collections.Generic;
30using System.Net; 30using System.Net;
31using System.Reflection; 31using System.Reflection;
32using System.Runtime; 32using System.Runtime;
33using System.Text;
33using System.Threading; 34using System.Threading;
34 35
35using log4net; 36using log4net;
@@ -4847,19 +4848,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4847 m_entityProps.Enqueue(priority, new ObjectPropertyUpdate(entity,0,false,true)); 4848 m_entityProps.Enqueue(priority, new ObjectPropertyUpdate(entity,0,false,true));
4848 } 4849 }
4849 4850
4850 List<ObjectPropertiesFamilyPacket.ObjectDataBlock> objectFamilyBlocks = new
4851 List<ObjectPropertiesFamilyPacket.ObjectDataBlock>();
4852 List<ObjectPropertiesPacket.ObjectDataBlock> objectPropertiesBlocks =
4853 new List<ObjectPropertiesPacket.ObjectDataBlock>();
4854 List<SceneObjectPart> needPhysics = new List<SceneObjectPart>();
4855
4856 private void ProcessEntityPropertyRequests(int maxUpdateBytes) 4851 private void ProcessEntityPropertyRequests(int maxUpdateBytes)
4857 { 4852 {
4858// OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>> familyUpdates = 4853 List<ObjectPropertiesFamilyPacket.ObjectDataBlock> objectFamilyBlocks = null;
4859// new OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>>(); 4854 List<ObjectPropertiesPacket.ObjectDataBlock> objectPropertiesBlocks = null;
4860 4855 List<SceneObjectPart> needPhysics = null;
4861// OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>> propertyUpdates =
4862// new OpenSim.Framework.Lazy<List<ObjectPropertyUpdate>>();
4863 4856
4864 bool orderedDequeue = m_scene.UpdatePrioritizationScheme == UpdatePrioritizationSchemes.SimpleAngularDistance; 4857 bool orderedDequeue = m_scene.UpdatePrioritizationScheme == UpdatePrioritizationSchemes.SimpleAngularDistance;
4865 4858
@@ -4888,8 +4881,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4888 { 4881 {
4889 SceneObjectPart sop = (SceneObjectPart)update.Entity; 4882 SceneObjectPart sop = (SceneObjectPart)update.Entity;
4890 ObjectPropertiesFamilyPacket.ObjectDataBlock objPropDB = CreateObjectPropertiesFamilyBlock(sop,update.Flags); 4883 ObjectPropertiesFamilyPacket.ObjectDataBlock objPropDB = CreateObjectPropertiesFamilyBlock(sop,update.Flags);
4884 if(objectFamilyBlocks == null)
4885 objectFamilyBlocks = new List<ObjectPropertiesFamilyPacket.ObjectDataBlock>();
4891 objectFamilyBlocks.Add(objPropDB); 4886 objectFamilyBlocks.Add(objPropDB);
4892// familyUpdates.Value.Add(update);
4893 maxUpdateBytes -= objPropDB.Length; 4887 maxUpdateBytes -= objPropDB.Length;
4894 } 4888 }
4895 } 4889 }
@@ -4899,26 +4893,25 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4899 if (update.Entity is SceneObjectPart) 4893 if (update.Entity is SceneObjectPart)
4900 { 4894 {
4901 SceneObjectPart sop = (SceneObjectPart)update.Entity; 4895 SceneObjectPart sop = (SceneObjectPart)update.Entity;
4896 if(needPhysics == null)
4897 needPhysics = new List<SceneObjectPart>();
4902 needPhysics.Add(sop); 4898 needPhysics.Add(sop);
4903 ObjectPropertiesPacket.ObjectDataBlock objPropDB = CreateObjectPropertiesBlock(sop); 4899 ObjectPropertiesPacket.ObjectDataBlock objPropDB = CreateObjectPropertiesBlock(sop);
4900 if(objectPropertiesBlocks == null)
4901 objectPropertiesBlocks = new List<ObjectPropertiesPacket.ObjectDataBlock>();
4904 objectPropertiesBlocks.Add(objPropDB); 4902 objectPropertiesBlocks.Add(objPropDB);
4905// propertyUpdates.Value.Add(update);
4906 maxUpdateBytes -= objPropDB.Length; 4903 maxUpdateBytes -= objPropDB.Length;
4907 } 4904 }
4908 } 4905 }
4909 } 4906 }
4910 4907
4911 if (objectPropertiesBlocks.Count > 0) 4908 if (objectPropertiesBlocks != null)
4912 { 4909 {
4913 ObjectPropertiesPacket packet = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties); 4910 ObjectPropertiesPacket packet = (ObjectPropertiesPacket)PacketPool.Instance.GetPacket(PacketType.ObjectProperties);
4914 packet.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[objectPropertiesBlocks.Count]; 4911 packet.ObjectData = new ObjectPropertiesPacket.ObjectDataBlock[objectPropertiesBlocks.Count];
4915 for (int i = 0; i < objectPropertiesBlocks.Count; i++) 4912 for (int i = 0; i < objectPropertiesBlocks.Count; i++)
4916 packet.ObjectData[i] = objectPropertiesBlocks[i]; 4913 packet.ObjectData[i] = objectPropertiesBlocks[i];
4917 4914
4918
4919 objectPropertiesBlocks.Clear();
4920 packet.Header.Zerocoded = true;
4921
4922 // Pass in the delegate so that if this packet needs to be resent, we send the current properties 4915 // Pass in the delegate so that if this packet needs to be resent, we send the current properties
4923 // of the object rather than the properties when the packet was created 4916 // of the object rather than the properties when the packet was created
4924 // HACK : Remove intelligent resending until it's fixed in core 4917 // HACK : Remove intelligent resending until it's fixed in core
@@ -4928,15 +4921,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4928 // ResendPropertyUpdates(propertyUpdates.Value, oPacket); 4921 // ResendPropertyUpdates(propertyUpdates.Value, oPacket);
4929 // }); 4922 // });
4930 OutPacket(packet, ThrottleOutPacketType.Task, true); 4923 OutPacket(packet, ThrottleOutPacketType.Task, true);
4931
4932 // pbcnt += blocks.Count;
4933 // ppcnt++;
4934 } 4924 }
4935 4925
4936 // Int32 fpcnt = 0; 4926 if (objectFamilyBlocks != null)
4937 // Int32 fbcnt = 0;
4938
4939 if (objectFamilyBlocks.Count > 0)
4940 { 4927 {
4941 // one packet per object block... uggh... 4928 // one packet per object block... uggh...
4942 for (int i = 0; i < objectFamilyBlocks.Count; i++) 4929 for (int i = 0; i < objectFamilyBlocks.Count; i++)
@@ -4945,7 +4932,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4945 (ObjectPropertiesFamilyPacket)PacketPool.Instance.GetPacket(PacketType.ObjectPropertiesFamily); 4932 (ObjectPropertiesFamilyPacket)PacketPool.Instance.GetPacket(PacketType.ObjectPropertiesFamily);
4946 4933
4947 packet.ObjectData = objectFamilyBlocks[i]; 4934 packet.ObjectData = objectFamilyBlocks[i];
4948 packet.Header.Zerocoded = true;
4949 4935
4950 // Pass in the delegate so that if this packet needs to be resent, we send the current properties 4936 // Pass in the delegate so that if this packet needs to be resent, we send the current properties
4951 // of the object rather than the properties when the packet was created 4937 // of the object rather than the properties when the packet was created
@@ -4958,41 +4944,32 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4958 // ResendPropertyUpdates(updates, oPacket); 4944 // ResendPropertyUpdates(updates, oPacket);
4959 // }); 4945 // });
4960 OutPacket(packet, ThrottleOutPacketType.Task, true); 4946 OutPacket(packet, ThrottleOutPacketType.Task, true);
4961
4962 // fpcnt++;
4963 // fbcnt++;
4964 } 4947 }
4965 objectFamilyBlocks.Clear();
4966 } 4948 }
4967 4949
4968 if(needPhysics.Count > 0) 4950 if(needPhysics != null)
4969 { 4951 {
4970 IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>(); 4952 IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
4971 if(eq != null) 4953 if(eq != null)
4972 { 4954 {
4973 OSDArray array = new OSDArray(); 4955 StringBuilder sb = eq.StartEvent("ObjectPhysicsProperties");
4974 foreach(SceneObjectPart sop in needPhysics) 4956 LLSDxmlEncode.AddArray("ObjectData", sb);
4957 foreach (SceneObjectPart sop in needPhysics)
4975 { 4958 {
4976 OSDMap physinfo = new OSDMap(6); 4959 LLSDxmlEncode.AddMap(sb);
4977 physinfo["LocalID"] = sop.LocalId; 4960 LLSDxmlEncode.AddElem("LocalID",(int)sop.LocalId, sb);
4978 physinfo["Density"] = sop.Density; 4961 LLSDxmlEncode.AddElem("Density", sop.Density, sb);
4979 physinfo["Friction"] = sop.Friction; 4962 LLSDxmlEncode.AddElem("Friction", sop.Friction, sb);
4980 physinfo["GravityMultiplier"] = sop.GravityModifier; 4963 LLSDxmlEncode.AddElem("GravityMultiplier", sop.GravityModifier, sb);
4981 physinfo["Restitution"] = sop.Restitution; 4964 LLSDxmlEncode.AddElem("Restitution", sop.Restitution, sb);
4982 physinfo["PhysicsShapeType"] = (int)sop.PhysicsShapeType; 4965 LLSDxmlEncode.AddElem("PhysicsShapeType", (int)sop.PhysicsShapeType, sb);
4983 array.Add(physinfo); 4966 LLSDxmlEncode.AddEndMap(sb);
4984 } 4967 }
4985 4968 LLSDxmlEncode.AddEndArray(sb);
4986 OSDMap llsdBody = new OSDMap(1); 4969 OSDllsdxml ev = new OSDllsdxml(eq.EndEvent(sb));
4987 llsdBody.Add("ObjectData", array); 4970 eq.Enqueue(ev, AgentId);
4988 4971 }
4989 eq.Enqueue(BuildEvent("ObjectPhysicsProperties", llsdBody),AgentId);
4990 }
4991 needPhysics.Clear();
4992 } 4972 }
4993
4994 // m_log.WarnFormat("[PACKETCOUNTS] queued {0} property packets with {1} blocks",ppcnt,pbcnt);
4995 // m_log.WarnFormat("[PACKETCOUNTS] queued {0} family property packets with {1} blocks",fpcnt,fbcnt);
4996 } 4973 }
4997 4974
4998 private ObjectPropertiesFamilyPacket.ObjectDataBlock CreateObjectPropertiesFamilyBlock(SceneObjectPart sop, PrimUpdateFlags requestFlags) 4975 private ObjectPropertiesFamilyPacket.ObjectDataBlock CreateObjectPropertiesFamilyBlock(SceneObjectPart sop, PrimUpdateFlags requestFlags)
@@ -5309,115 +5286,212 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5309 int sequence_id, bool snap_selection, int request_result, ILandObject lo, 5286 int sequence_id, bool snap_selection, int request_result, ILandObject lo,
5310 float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) 5287 float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags)
5311 { 5288 {
5312// m_log.DebugFormat("[LLCLIENTVIEW]: Sending land properties for {0} to {1}", lo.LandData.GlobalID, Name); 5289 // m_log.DebugFormat("[LLCLIENTVIEW]: Sending land properties for {0} to {1}", lo.LandData.GlobalID, Name);
5290
5291 IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
5292 if (eq == null)
5293 {
5294 m_log.Warn("[LLCLIENTVIEW]: No EQ Interface when sending parcel data.");
5295 return;
5296 }
5313 5297
5314 LandData landData = lo.LandData; 5298 LandData landData = lo.LandData;
5299 IPrimCounts pc = lo.PrimCounts;
5315 5300
5316 ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage(); 5301 ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage();
5317 5302
5318 updateMessage.AABBMax = landData.AABBMax; 5303 StringBuilder sb = eq.StartEvent("ParcelProperties");
5319 updateMessage.AABBMin = landData.AABBMin; 5304
5320 updateMessage.Area = landData.Area; 5305 LLSDxmlEncode.AddArray("ParcelData", sb);
5321 updateMessage.AuctionID = landData.AuctionID; 5306 LLSDxmlEncode.AddMap(sb);
5322 updateMessage.AuthBuyerID = landData.AuthBuyerID; 5307
5323 updateMessage.Bitmap = landData.Bitmap; 5308 LLSDxmlEncode.AddElem("LocalID", landData.LocalID, sb);
5324 updateMessage.Desc = landData.Description; 5309 LLSDxmlEncode.AddElem("AABBMax", landData.AABBMax, sb);
5325 updateMessage.Category = landData.Category; 5310 LLSDxmlEncode.AddElem("AABBMin", landData.AABBMin, sb);
5326 updateMessage.ClaimDate = Util.ToDateTime(landData.ClaimDate); 5311 LLSDxmlEncode.AddElem("Area", landData.Area, sb);
5327 updateMessage.ClaimPrice = landData.ClaimPrice; 5312 LLSDxmlEncode.AddElem("AuctionID", (int)landData.AuctionID, sb);
5328 updateMessage.GroupID = landData.GroupID; 5313 LLSDxmlEncode.AddElem("AuthBuyerID", landData.AuthBuyerID, sb);
5329 updateMessage.IsGroupOwned = landData.IsGroupOwned; 5314 LLSDxmlEncode.AddElem("Bitmap", landData.Bitmap, sb);
5330 updateMessage.LandingType = (LandingType) landData.LandingType; 5315 LLSDxmlEncode.AddElem("Category", (int)landData.Category, sb);
5331 updateMessage.LocalID = landData.LocalID; 5316 LLSDxmlEncode.AddElem("ClaimDate", Util.ToDateTime(landData.ClaimDate), sb);
5332 5317 LLSDxmlEncode.AddElem("ClaimPrice", landData.ClaimPrice, sb);
5318 LLSDxmlEncode.AddElem("Desc", landData.Description, sb);
5319 LLSDxmlEncode.AddElem("ParcelFlags", landData.Flags, sb);
5320 LLSDxmlEncode.AddElem("GroupID", landData.GroupID, sb);
5321 LLSDxmlEncode.AddElem("GroupPrims", pc.Group, sb);
5322 LLSDxmlEncode.AddElem("IsGroupOwned", landData.IsGroupOwned, sb);
5323 LLSDxmlEncode.AddElem("LandingType", (int)landData.LandingType, sb);
5333 if (landData.Area > 0) 5324 if (landData.Area > 0)
5334 { 5325 LLSDxmlEncode.AddElem("MaxPrims", parcelObjectCapacity, sb);
5335 updateMessage.MaxPrims = parcelObjectCapacity;
5336 }
5337 else 5326 else
5338 { 5327 LLSDxmlEncode.AddElem("MaxPrims", (int)0, sb);
5339 updateMessage.MaxPrims = 0; 5328 LLSDxmlEncode.AddElem("MediaID", landData.MediaID, sb);
5340 } 5329 LLSDxmlEncode.AddElem("MediaURL", landData.MediaURL, sb);
5341 5330 LLSDxmlEncode.AddElem("MediaAutoScale", landData.MediaAutoScale != 0, sb);
5342 updateMessage.MediaAutoScale = Convert.ToBoolean(landData.MediaAutoScale); 5331 LLSDxmlEncode.AddElem("MusicURL", landData.MusicURL, sb);
5343 updateMessage.MediaID = landData.MediaID; 5332 LLSDxmlEncode.AddElem("Name", landData.Name, sb);
5344 updateMessage.MediaURL = landData.MediaURL; 5333 LLSDxmlEncode.AddElem("OtherCleanTime", landData.OtherCleanTime, sb);
5345 updateMessage.MusicURL = landData.MusicURL; 5334 LLSDxmlEncode.AddElem("OtherCount", (int)0 , sb); //TODO
5346 updateMessage.Name = landData.Name; 5335 LLSDxmlEncode.AddElem("OtherPrims", pc.Others, sb);
5347 updateMessage.OtherCleanTime = landData.OtherCleanTime; 5336 LLSDxmlEncode.AddElem("OwnerID", landData.OwnerID, sb);
5348 updateMessage.OtherCount = 0; //TODO: Unimplemented 5337 LLSDxmlEncode.AddElem("OwnerPrims", pc.Owner, sb);
5349 updateMessage.OwnerID = landData.OwnerID; 5338 LLSDxmlEncode.AddElem("ParcelPrimBonus", simObjectBonusFactor, sb);
5350 updateMessage.ParcelFlags = (ParcelFlags) landData.Flags; 5339 LLSDxmlEncode.AddElem("PassHours", landData.PassHours, sb);
5351 updateMessage.ParcelPrimBonus = simObjectBonusFactor; 5340 LLSDxmlEncode.AddElem("PassPrice", landData.PassPrice, sb);
5352 updateMessage.PassHours = landData.PassHours; 5341 LLSDxmlEncode.AddElem("PublicCount", (int)0, sb); //TODO
5353 updateMessage.PassPrice = landData.PassPrice; 5342 LLSDxmlEncode.AddElem("Privacy", false, sb); //TODO ??
5354 updateMessage.PublicCount = 0; //TODO: Unimplemented 5343 LLSDxmlEncode.AddElem("RegionDenyAnonymous", (regionFlags & (uint)RegionFlags.DenyAnonymous) != 0, sb);
5355 5344 //LLSDxmlEncode.AddElem("RegionDenyIdentified", (regionFlags & (uint)RegionFlags.DenyIdentified) != 0, sb);
5356 updateMessage.RegionPushOverride = (regionFlags & (uint)RegionFlags.RestrictPushObject) > 0; 5345 LLSDxmlEncode.AddElem("RegionDenyIdentified", false, sb);
5357 updateMessage.RegionDenyAnonymous = (regionFlags & (uint)RegionFlags.DenyAnonymous) > 0; 5346 //LLSDxmlEncode.AddElem("RegionDenyTransacted", (regionFlags & (uint)RegionFlags.DenyTransacted) != 0, sb);
5358 5347 LLSDxmlEncode.AddElem("RegionDenyTransacted", false, sb);
5359 //updateMessage.RegionDenyIdentified = (regionFlags & (uint)RegionFlags.DenyIdentified) > 0; 5348 LLSDxmlEncode.AddElem("RegionPushOverride", (regionFlags & (uint)RegionFlags.RestrictPushObject) != 0, sb);
5360 //updateMessage.RegionDenyTransacted = (regionFlags & (uint)RegionFlags.DenyTransacted) > 0; 5349 LLSDxmlEncode.AddElem("RentPrice", (int) 0, sb);;
5361 5350 LLSDxmlEncode.AddElem("RequestResult", request_result, sb);
5362 updateMessage.RentPrice = 0; 5351 LLSDxmlEncode.AddElem("SalePrice", landData.SalePrice, sb);
5363 updateMessage.RequestResult = (ParcelResult) request_result; 5352 LLSDxmlEncode.AddElem("SelectedPrims", pc.Selected, sb);
5364 updateMessage.SalePrice = landData.SalePrice; 5353 LLSDxmlEncode.AddElem("SelfCount", (int)0, sb); //TODO
5365 updateMessage.SelfCount = 0; //TODO: Unimplemented 5354 LLSDxmlEncode.AddElem("SequenceID", sequence_id, sb);
5366 updateMessage.SequenceID = sequence_id;
5367
5368 if (landData.SimwideArea > 0) 5355 if (landData.SimwideArea > 0)
5369 { 5356 LLSDxmlEncode.AddElem("SimWideMaxPrims", lo.GetSimulatorMaxPrimCount(), sb);
5370 updateMessage.SimWideMaxPrims = lo.GetSimulatorMaxPrimCount();
5371 }
5372 else 5357 else
5373 { 5358 LLSDxmlEncode.AddElem("SimWideMaxPrims", (int)0, sb);
5374 updateMessage.SimWideMaxPrims = 0; 5359 LLSDxmlEncode.AddElem("SimWideTotalPrims", pc.Simulator, sb);
5375 } 5360 LLSDxmlEncode.AddElem("SnapSelection", snap_selection, sb);
5376 5361 LLSDxmlEncode.AddElem("SnapshotID", landData.SnapshotID, sb);
5377 updateMessage.SnapSelection = snap_selection; 5362 LLSDxmlEncode.AddElem("Status", (int)landData.Status, sb);
5378 updateMessage.SnapshotID = landData.SnapshotID; 5363 LLSDxmlEncode.AddElem("TotalPrims", pc.Total, sb);
5379 updateMessage.Status = (ParcelStatus) landData.Status; 5364 LLSDxmlEncode.AddElem("UserLocation", landData.UserLocation, sb);
5380 updateMessage.UserLocation = landData.UserLocation; 5365 LLSDxmlEncode.AddElem("UserLookAt", landData.UserLookAt, sb);
5381 updateMessage.UserLookAt = landData.UserLookAt; 5366 LLSDxmlEncode.AddElem("SeeAVs", landData.SeeAVs, sb);
5367 LLSDxmlEncode.AddElem("AnyAVSounds", landData.AnyAVSounds, sb);
5368 LLSDxmlEncode.AddElem("GroupAVSounds", landData.GroupAVSounds, sb);
5369
5370 LLSDxmlEncode.AddEndMap(sb);
5371 LLSDxmlEncode.AddEndArray(sb);
5372
5373 LLSDxmlEncode.AddArray("MediaData", sb);
5374 LLSDxmlEncode.AddMap(sb);
5375
5376 LLSDxmlEncode.AddElem("MediaDesc", landData.MediaDescription, sb);
5377 LLSDxmlEncode.AddElem("MediaHeight", landData.MediaHeight, sb);
5378 LLSDxmlEncode.AddElem("MediaWidth", landData.MediaWidth, sb);
5379 LLSDxmlEncode.AddElem("MediaLoop", landData.MediaLoop, sb);
5380 LLSDxmlEncode.AddElem("MediaType", landData.MediaType, sb);
5381 LLSDxmlEncode.AddElem("ObscureMedia", landData.ObscureMedia, sb);
5382 LLSDxmlEncode.AddElem("ObscureMusic", landData.ObscureMusic, sb);
5383
5384 LLSDxmlEncode.AddEndMap(sb);
5385 LLSDxmlEncode.AddEndArray(sb);
5386
5387 LLSDxmlEncode.AddArray("AgeVerificationBlock", sb);
5388 LLSDxmlEncode.AddMap(sb);
5389
5390 //LLSDxmlEncode.AddElem("RegionDenyAgeUnverified", (regionFlags & (uint)RegionFlags.DenyAgeUnverified) != 0, sb);
5391 LLSDxmlEncode.AddElem("RegionDenyAgeUnverified", false, sb);
5392
5393 LLSDxmlEncode.AddEndMap(sb);
5394 LLSDxmlEncode.AddEndArray(sb);
5395
5396 OSDllsdxml ev = new OSDllsdxml(eq.EndEvent(sb));
5397 eq.Enqueue(ev, AgentId);
5382 5398
5383 updateMessage.MediaType = landData.MediaType; 5399 /*
5384 updateMessage.MediaDesc = landData.MediaDescription; 5400 updateMessage.AABBMax = landData.AABBMax;
5385 updateMessage.MediaWidth = landData.MediaWidth; 5401 updateMessage.AABBMin = landData.AABBMin;
5386 updateMessage.MediaHeight = landData.MediaHeight; 5402 updateMessage.Area = landData.Area;
5387 updateMessage.MediaLoop = landData.MediaLoop; 5403 updateMessage.AuctionID = landData.AuctionID;
5388 updateMessage.ObscureMusic = landData.ObscureMusic; 5404 updateMessage.AuthBuyerID = landData.AuthBuyerID;
5389 updateMessage.ObscureMedia = landData.ObscureMedia; 5405 updateMessage.Bitmap = landData.Bitmap;
5406 updateMessage.Desc = landData.Description;
5407 updateMessage.Category = landData.Category;
5408 updateMessage.ClaimDate = Util.ToDateTime(landData.ClaimDate);
5409 updateMessage.ClaimPrice = landData.ClaimPrice;
5410 updateMessage.GroupID = landData.GroupID;
5411 updateMessage.IsGroupOwned = landData.IsGroupOwned;
5412 updateMessage.LandingType = (LandingType) landData.LandingType;
5413 updateMessage.LocalID = landData.LocalID;
5414
5415 if (landData.Area > 0)
5416 {
5417 updateMessage.MaxPrims = parcelObjectCapacity;
5418 }
5419 else
5420 {
5421 updateMessage.MaxPrims = 0;
5422 }
5390 5423
5391 updateMessage.SeeAVs = landData.SeeAVs; 5424 updateMessage.MediaAutoScale = Convert.ToBoolean(landData.MediaAutoScale);
5392 updateMessage.AnyAVSounds = landData.AnyAVSounds; 5425 updateMessage.MediaID = landData.MediaID;
5393 updateMessage.GroupAVSounds = landData.GroupAVSounds; 5426 updateMessage.MediaURL = landData.MediaURL;
5427 updateMessage.MusicURL = landData.MusicURL;
5428 updateMessage.Name = landData.Name;
5429 updateMessage.OtherCleanTime = landData.OtherCleanTime;
5430 updateMessage.OtherCount = 0; //TODO: Unimplemented
5431 updateMessage.OwnerID = landData.OwnerID;
5432 updateMessage.ParcelFlags = (ParcelFlags) landData.Flags;
5433 updateMessage.ParcelPrimBonus = simObjectBonusFactor;
5434 updateMessage.PassHours = landData.PassHours;
5435 updateMessage.PassPrice = landData.PassPrice;
5436 updateMessage.PublicCount = 0; //TODO: Unimplemented
5437
5438 updateMessage.RegionPushOverride = (regionFlags & (uint)RegionFlags.RestrictPushObject) > 0;
5439 updateMessage.RegionDenyAnonymous = (regionFlags & (uint)RegionFlags.DenyAnonymous) > 0;
5440
5441 //updateMessage.RegionDenyIdentified = (regionFlags & (uint)RegionFlags.DenyIdentified) > 0;
5442 //updateMessage.RegionDenyTransacted = (regionFlags & (uint)RegionFlags.DenyTransacted) > 0;
5443
5444 updateMessage.RentPrice = 0;
5445 updateMessage.RequestResult = (ParcelResult) request_result;
5446 updateMessage.SalePrice = landData.SalePrice;
5447 updateMessage.SelfCount = 0; //TODO: Unimplemented
5448 updateMessage.SequenceID = sequence_id;
5449
5450 if (landData.SimwideArea > 0)
5451 {
5452 updateMessage.SimWideMaxPrims = lo.GetSimulatorMaxPrimCount();
5453 }
5454 else
5455 {
5456 updateMessage.SimWideMaxPrims = 0;
5457 }
5394 5458
5395 IPrimCounts pc = lo.PrimCounts; 5459 updateMessage.SnapSelection = snap_selection;
5396 updateMessage.OwnerPrims = pc.Owner; 5460 updateMessage.SnapshotID = landData.SnapshotID;
5397 updateMessage.GroupPrims = pc.Group; 5461 updateMessage.Status = (ParcelStatus) landData.Status;
5398 updateMessage.OtherPrims = pc.Others; 5462 updateMessage.UserLocation = landData.UserLocation;
5399 updateMessage.SelectedPrims = pc.Selected; 5463 updateMessage.UserLookAt = landData.UserLookAt;
5400 updateMessage.TotalPrims = pc.Total; 5464
5401 updateMessage.SimWideTotalPrims = pc.Simulator; 5465 updateMessage.MediaType = landData.MediaType;
5402 5466 updateMessage.MediaDesc = landData.MediaDescription;
5403 //m_log.DebugFormat("[YYY]: SimWideMaxPrims={0} OwnerPrims={1} TotalPrims={2} SimWideTotalPrims={3} MaxPrims={4}", 5467 updateMessage.MediaWidth = landData.MediaWidth;
5404 // updateMessage.SimWideMaxPrims, updateMessage.OwnerPrims, updateMessage.TotalPrims, updateMessage.SimWideTotalPrims, updateMessage.MaxPrims); 5468 updateMessage.MediaHeight = landData.MediaHeight;
5405 try 5469 updateMessage.MediaLoop = landData.MediaLoop;
5406 { 5470 updateMessage.ObscureMusic = landData.ObscureMusic;
5407 IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>(); 5471 updateMessage.ObscureMedia = landData.ObscureMedia;
5408 if (eq != null) 5472
5409 { 5473 updateMessage.SeeAVs = landData.SeeAVs;
5410 eq.ParcelProperties(updateMessage, this.AgentId); 5474 updateMessage.AnyAVSounds = landData.AnyAVSounds;
5411 } 5475 updateMessage.GroupAVSounds = landData.GroupAVSounds;
5412 else 5476
5413 { 5477 updateMessage.OwnerPrims = pc.Owner;
5414 m_log.Warn("[LLCLIENTVIEW]: No EQ Interface when sending parcel data."); 5478 updateMessage.GroupPrims = pc.Group;
5415 } 5479 updateMessage.OtherPrims = pc.Others;
5416 } 5480 updateMessage.SelectedPrims = pc.Selected;
5417 catch (Exception ex) 5481 updateMessage.TotalPrims = pc.Total;
5418 { 5482 updateMessage.SimWideTotalPrims = pc.Simulator;
5419 m_log.Error("[LLCLIENTVIEW]: Unable to send parcel data via eventqueue - exception: " + ex.ToString()); 5483
5420 } 5484 //m_log.DebugFormat("[YYY]: SimWideMaxPrims={0} OwnerPrims={1} TotalPrims={2} SimWideTotalPrims={3} MaxPrims={4}",
5485 // updateMessage.SimWideMaxPrims, updateMessage.OwnerPrims, updateMessage.TotalPrims, updateMessage.SimWideTotalPrims, updateMessage.MaxPrims);
5486 try
5487 {
5488 eq.ParcelProperties(updateMessage, this.AgentId);
5489 }
5490 catch (Exception ex)
5491 {
5492 m_log.Error("[LLCLIENTVIEW]: Unable to send parcel data via eventqueue - exception: " + ex.ToString());
5493 }
5494 */
5421 } 5495 }
5422 5496
5423 public void SendLandAccessListData(List<LandAccessEntry> accessList, uint accessFlag, int localLandID) 5497 public void SendLandAccessListData(List<LandAccessEntry> accessList, uint accessFlag, int localLandID)