aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs219
1 files changed, 54 insertions, 165 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index fa619c7..481bb91 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -2816,29 +2816,22 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2816 2816
2817 public void SendPartPhysicsProprieties(ISceneEntity entity) 2817 public void SendPartPhysicsProprieties(ISceneEntity entity)
2818 { 2818 {
2819 IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
2820 if (eq == null)
2821 return;
2822
2819 SceneObjectPart part = (SceneObjectPart)entity; 2823 SceneObjectPart part = (SceneObjectPart)entity;
2820 if (part != null && AgentId != UUID.Zero) 2824 if (part == null)
2821 { 2825 return;
2822 try 2826
2823 { 2827 uint localid = part.LocalId;
2824 IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>(); 2828 byte physshapetype = part.PhysicsShapeType;
2825 if (eq != null) 2829 float density = part.Density;
2826 { 2830 float friction = part.Friction;
2827 uint localid = part.LocalId; 2831 float bounce = part.Restitution;
2828 byte physshapetype = part.PhysicsShapeType; 2832 float gravmod = part.GravityModifier;
2829 float density = part.Density; 2833
2830 float friction = part.Friction; 2834 eq.partPhysicsProperties(localid, physshapetype, density, friction, bounce, gravmod,AgentId);
2831 float bounce = part.Restitution;
2832 float gravmod = part.GravityModifier;
2833
2834 eq.partPhysicsProperties(localid, physshapetype, density, friction, bounce, gravmod,AgentId);
2835 }
2836 }
2837 catch (Exception ex)
2838 {
2839 m_log.Error("Unable to send part Physics Proprieties - exception: " + ex.ToString());
2840 }
2841 }
2842 } 2835 }
2843 2836
2844 2837
@@ -3406,37 +3399,39 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3406 3399
3407 public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data) 3400 public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data)
3408 { 3401 {
3409 OSDMap llsd = new OSDMap(3); 3402 IEventQueue eq = Scene.RequestModuleInterface<IEventQueue>();
3410 OSDArray AgentData = new OSDArray(1); 3403 if (eq == null)
3411 OSDMap AgentDataMap = new OSDMap(1); 3404 return;
3412 AgentDataMap.Add("AgentID", OSD.FromUUID(this.AgentId)); 3405
3413 AgentDataMap.Add("AvatarID", OSD.FromUUID(avatarID)); 3406 // message template has a GroupData field AcceptNotices ignored by viewers
3414 AgentData.Add(AgentDataMap); 3407 // and a array NewGroupData also ignored
3415 llsd.Add("AgentData", AgentData); 3408 StringBuilder sb = eq.StartEvent("AvatarGroupsReply");
3416 OSDArray GroupData = new OSDArray(data.Length); 3409
3417// OSDArray NewGroupData = new OSDArray(data.Length); 3410 LLSDxmlEncode.AddArrayAndMap("AgentData", sb);
3418 foreach (GroupMembershipData m in data) 3411 LLSDxmlEncode.AddElem("AgentID", AgentId, sb);
3419 { 3412 LLSDxmlEncode.AddElem("AvatarID", avatarID, sb);
3420 OSDMap GroupDataMap = new OSDMap(6); 3413 LLSDxmlEncode.AddEndMapAndArray(sb);
3421 OSDMap NewGroupDataMap = new OSDMap(1); 3414
3422 GroupDataMap.Add("GroupPowers", OSD.FromULong(m.GroupPowers)); 3415 if(data.Length == 0)
3423 GroupDataMap.Add("AcceptNotices", OSD.FromBoolean(m.AcceptNotices)); 3416 LLSDxmlEncode.AddEmptyArray("GroupData", sb);
3424 GroupDataMap.Add("GroupTitle", OSD.FromString(m.GroupTitle)); 3417 else
3425 GroupDataMap.Add("GroupID", OSD.FromUUID(m.GroupID)); 3418 {
3426 GroupDataMap.Add("GroupName", OSD.FromString(m.GroupName)); 3419 LLSDxmlEncode.AddArray("GroupData", sb);
3427 GroupDataMap.Add("GroupInsigniaID", OSD.FromUUID(m.GroupPicture)); 3420 foreach (GroupMembershipData m in data)
3428// NewGroupDataMap.Add("ListInProfile", OSD.FromBoolean(m.ListInProfile)); 3421 {
3429 GroupData.Add(GroupDataMap); 3422 LLSDxmlEncode.AddMap(sb);
3430// NewGroupData.Add(NewGroupDataMap); 3423 LLSDxmlEncode.AddElem("GroupPowers", m.GroupPowers, sb);
3431 } 3424 LLSDxmlEncode.AddElem("GroupTitle", m.GroupTitle, sb);
3432 llsd.Add("GroupData", GroupData); 3425 LLSDxmlEncode.AddElem("GroupID",m.GroupID, sb);
3433 // llsd.Add("NewGroupData", NewGroupData); 3426 LLSDxmlEncode.AddElem("GroupName", m.GroupName, sb);
3434 3427 LLSDxmlEncode.AddElem("GroupInsigniaID", m.GroupPicture, sb);
3435 IEventQueue eq = this.Scene.RequestModuleInterface<IEventQueue>(); 3428 LLSDxmlEncode.AddEndMap(sb);
3436 if (eq != null) 3429 }
3437 { 3430 LLSDxmlEncode.AddEndArray(sb);
3438 eq.Enqueue(BuildEvent("AvatarGroupsReply", llsd), this.AgentId); 3431 }
3439 } 3432
3433 OSD ev = new OSDllsdxml(eq.EndEvent(sb));
3434 eq.Enqueue(ev, AgentId);
3440 } 3435 }
3441 3436
3442 public void SendAgentGroupDataUpdate(UUID avatarID, GroupMembershipData[] data) 3437 public void SendAgentGroupDataUpdate(UUID avatarID, GroupMembershipData[] data)
@@ -5277,7 +5272,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5277 ParcelOverlayPacket packet = (ParcelOverlayPacket)PacketPool.Instance.GetPacket(PacketType.ParcelOverlay); 5272 ParcelOverlayPacket packet = (ParcelOverlayPacket)PacketPool.Instance.GetPacket(PacketType.ParcelOverlay);
5278 packet.ParcelData.Data = data; 5273 packet.ParcelData.Data = data;
5279 packet.ParcelData.SequenceID = sequence_id; 5274 packet.ParcelData.SequenceID = sequence_id;
5280 packet.Header.Zerocoded = true;
5281// OutPacket(packet, ThrottleOutPacketType.Task); 5275// OutPacket(packet, ThrottleOutPacketType.Task);
5282 OutPacket(packet, ThrottleOutPacketType.Land); 5276 OutPacket(packet, ThrottleOutPacketType.Land);
5283 } 5277 }
@@ -5298,12 +5292,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5298 LandData landData = lo.LandData; 5292 LandData landData = lo.LandData;
5299 IPrimCounts pc = lo.PrimCounts; 5293 IPrimCounts pc = lo.PrimCounts;
5300 5294
5301 ParcelPropertiesMessage updateMessage = new ParcelPropertiesMessage();
5302
5303 StringBuilder sb = eq.StartEvent("ParcelProperties"); 5295 StringBuilder sb = eq.StartEvent("ParcelProperties");
5304 5296
5305 LLSDxmlEncode.AddArray("ParcelData", sb); 5297 LLSDxmlEncode.AddArrayAndMap("ParcelData", sb);
5306 LLSDxmlEncode.AddMap(sb);
5307 5298
5308 LLSDxmlEncode.AddElem("LocalID", landData.LocalID, sb); 5299 LLSDxmlEncode.AddElem("LocalID", landData.LocalID, sb);
5309 LLSDxmlEncode.AddElem("AABBMax", landData.AABBMax, sb); 5300 LLSDxmlEncode.AddElem("AABBMax", landData.AABBMax, sb);
@@ -5339,7 +5330,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5339 LLSDxmlEncode.AddElem("PassHours", landData.PassHours, sb); 5330 LLSDxmlEncode.AddElem("PassHours", landData.PassHours, sb);
5340 LLSDxmlEncode.AddElem("PassPrice", landData.PassPrice, sb); 5331 LLSDxmlEncode.AddElem("PassPrice", landData.PassPrice, sb);
5341 LLSDxmlEncode.AddElem("PublicCount", (int)0, sb); //TODO 5332 LLSDxmlEncode.AddElem("PublicCount", (int)0, sb); //TODO
5342 LLSDxmlEncode.AddElem("Privacy", false, sb); //TODO ??
5343 LLSDxmlEncode.AddElem("RegionDenyAnonymous", (regionFlags & (uint)RegionFlags.DenyAnonymous) != 0, sb); 5333 LLSDxmlEncode.AddElem("RegionDenyAnonymous", (regionFlags & (uint)RegionFlags.DenyAnonymous) != 0, sb);
5344 //LLSDxmlEncode.AddElem("RegionDenyIdentified", (regionFlags & (uint)RegionFlags.DenyIdentified) != 0, sb); 5334 //LLSDxmlEncode.AddElem("RegionDenyIdentified", (regionFlags & (uint)RegionFlags.DenyIdentified) != 0, sb);
5345 LLSDxmlEncode.AddElem("RegionDenyIdentified", false, sb); 5335 LLSDxmlEncode.AddElem("RegionDenyIdentified", false, sb);
@@ -5367,11 +5357,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5367 LLSDxmlEncode.AddElem("AnyAVSounds", landData.AnyAVSounds, sb); 5357 LLSDxmlEncode.AddElem("AnyAVSounds", landData.AnyAVSounds, sb);
5368 LLSDxmlEncode.AddElem("GroupAVSounds", landData.GroupAVSounds, sb); 5358 LLSDxmlEncode.AddElem("GroupAVSounds", landData.GroupAVSounds, sb);
5369 5359
5370 LLSDxmlEncode.AddEndMap(sb); 5360 LLSDxmlEncode.AddEndMapAndArray(sb);
5371 LLSDxmlEncode.AddEndArray(sb);
5372 5361
5373 LLSDxmlEncode.AddArray("MediaData", sb); 5362 LLSDxmlEncode.AddArrayAndMap("MediaData", sb);
5374 LLSDxmlEncode.AddMap(sb);
5375 5363
5376 LLSDxmlEncode.AddElem("MediaDesc", landData.MediaDescription, sb); 5364 LLSDxmlEncode.AddElem("MediaDesc", landData.MediaDescription, sb);
5377 LLSDxmlEncode.AddElem("MediaHeight", landData.MediaHeight, sb); 5365 LLSDxmlEncode.AddElem("MediaHeight", landData.MediaHeight, sb);
@@ -5381,117 +5369,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5381 LLSDxmlEncode.AddElem("ObscureMedia", landData.ObscureMedia, sb); 5369 LLSDxmlEncode.AddElem("ObscureMedia", landData.ObscureMedia, sb);
5382 LLSDxmlEncode.AddElem("ObscureMusic", landData.ObscureMusic, sb); 5370 LLSDxmlEncode.AddElem("ObscureMusic", landData.ObscureMusic, sb);
5383 5371
5384 LLSDxmlEncode.AddEndMap(sb); 5372 LLSDxmlEncode.AddEndMapAndArray(sb);
5385 LLSDxmlEncode.AddEndArray(sb);
5386 5373
5387 LLSDxmlEncode.AddArray("AgeVerificationBlock", sb); 5374 LLSDxmlEncode.AddArrayAndMap("AgeVerificationBlock", sb);
5388 LLSDxmlEncode.AddMap(sb);
5389 5375
5390 //LLSDxmlEncode.AddElem("RegionDenyAgeUnverified", (regionFlags & (uint)RegionFlags.DenyAgeUnverified) != 0, sb); 5376 //LLSDxmlEncode.AddElem("RegionDenyAgeUnverified", (regionFlags & (uint)RegionFlags.DenyAgeUnverified) != 0, sb);
5391 LLSDxmlEncode.AddElem("RegionDenyAgeUnverified", false, sb); 5377 LLSDxmlEncode.AddElem("RegionDenyAgeUnverified", false, sb);
5392 5378
5393 LLSDxmlEncode.AddEndMap(sb); 5379 LLSDxmlEncode.AddEndMapAndArray(sb);
5394 LLSDxmlEncode.AddEndArray(sb);
5395 5380
5396 OSDllsdxml ev = new OSDllsdxml(eq.EndEvent(sb)); 5381 OSDllsdxml ev = new OSDllsdxml(eq.EndEvent(sb));
5397 eq.Enqueue(ev, AgentId); 5382 eq.Enqueue(ev, AgentId);
5398 5383
5399 /*
5400 updateMessage.AABBMax = landData.AABBMax;
5401 updateMessage.AABBMin = landData.AABBMin;
5402 updateMessage.Area = landData.Area;
5403 updateMessage.AuctionID = landData.AuctionID;
5404 updateMessage.AuthBuyerID = landData.AuthBuyerID;
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 }
5423
5424 updateMessage.MediaAutoScale = Convert.ToBoolean(landData.MediaAutoScale);
5425 updateMessage.MediaID = landData.MediaID;
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 }
5458
5459 updateMessage.SnapSelection = snap_selection;
5460 updateMessage.SnapshotID = landData.SnapshotID;
5461 updateMessage.Status = (ParcelStatus) landData.Status;
5462 updateMessage.UserLocation = landData.UserLocation;
5463 updateMessage.UserLookAt = landData.UserLookAt;
5464
5465 updateMessage.MediaType = landData.MediaType;
5466 updateMessage.MediaDesc = landData.MediaDescription;
5467 updateMessage.MediaWidth = landData.MediaWidth;
5468 updateMessage.MediaHeight = landData.MediaHeight;
5469 updateMessage.MediaLoop = landData.MediaLoop;
5470 updateMessage.ObscureMusic = landData.ObscureMusic;
5471 updateMessage.ObscureMedia = landData.ObscureMedia;
5472
5473 updateMessage.SeeAVs = landData.SeeAVs;
5474 updateMessage.AnyAVSounds = landData.AnyAVSounds;
5475 updateMessage.GroupAVSounds = landData.GroupAVSounds;
5476
5477 updateMessage.OwnerPrims = pc.Owner;
5478 updateMessage.GroupPrims = pc.Group;
5479 updateMessage.OtherPrims = pc.Others;
5480 updateMessage.SelectedPrims = pc.Selected;
5481 updateMessage.TotalPrims = pc.Total;
5482 updateMessage.SimWideTotalPrims = pc.Simulator;
5483
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 */
5495 } 5384 }
5496 5385
5497 public void SendLandAccessListData(List<LandAccessEntry> accessList, uint accessFlag, int localLandID) 5386 public void SendLandAccessListData(List<LandAccessEntry> accessList, uint accessFlag, int localLandID)