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/ObjectCaps/ObjectAdd.cs10
-rw-r--r--OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs1
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs116
3 files changed, 64 insertions, 63 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs
index 189fa36..69fcb7d 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/ObjectAdd.cs
@@ -121,6 +121,9 @@ namespace OpenSim.Region.ClientStack.Linden
121 121
122 122
123 OSD r = OSDParser.DeserializeLLSDXml((string)request["requestbody"]); 123 OSD r = OSDParser.DeserializeLLSDXml((string)request["requestbody"]);
124 if (r.Type != OSDType.Map) // not a proper req
125 return responsedata;
126
124 //UUID session_id = UUID.Zero; 127 //UUID session_id = UUID.Zero;
125 bool bypass_raycast = false; 128 bool bypass_raycast = false;
126 uint everyone_mask = 0; 129 uint everyone_mask = 0;
@@ -157,9 +160,6 @@ namespace OpenSim.Region.ClientStack.Linden
157 int state = 0; 160 int state = 0;
158 int lastattach = 0; 161 int lastattach = 0;
159 162
160 if (r.Type != OSDType.Map) // not a proper req
161 return responsedata;
162
163 OSDMap rm = (OSDMap)r; 163 OSDMap rm = (OSDMap)r;
164 164
165 if (rm.ContainsKey("ObjectData")) //v2 165 if (rm.ContainsKey("ObjectData")) //v2
@@ -307,8 +307,6 @@ namespace OpenSim.Region.ClientStack.Linden
307 } 307 }
308 } 308 }
309 309
310
311
312 Vector3 pos = m_scene.GetNewRezLocation(ray_start, ray_end, ray_target_id, rotation, (bypass_raycast) ? (byte)1 : (byte)0, (ray_end_is_intersection) ? (byte)1 : (byte)0, true, scale, false); 310 Vector3 pos = m_scene.GetNewRezLocation(ray_start, ray_end, ray_target_id, rotation, (bypass_raycast) ? (byte)1 : (byte)0, (ray_end_is_intersection) ? (byte)1 : (byte)0, true, scale, false);
313 311
314 PrimitiveBaseShape pbs = PrimitiveBaseShape.CreateBox(); 312 PrimitiveBaseShape pbs = PrimitiveBaseShape.CreateBox();
@@ -359,6 +357,8 @@ namespace OpenSim.Region.ClientStack.Linden
359 rootpart.NextOwnerMask = next_owner_mask; 357 rootpart.NextOwnerMask = next_owner_mask;
360 rootpart.Material = (byte)material; 358 rootpart.Material = (byte)material;
361 359
360 obj.AggregatePerms();
361
362 m_scene.PhysicsScene.AddPhysicsActorTaint(rootpart.PhysActor); 362 m_scene.PhysicsScene.AddPhysicsActorTaint(rootpart.PhysActor);
363 363
364 responsedata["int_response_code"] = 200; //501; //410; //404; 364 responsedata["int_response_code"] = 200; //501; //410; //404;
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
index 6874662..116c51f 100644
--- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
+++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs
@@ -335,6 +335,7 @@ namespace OpenSim.Region.ClientStack.Linden
335 grp.AbsolutePosition = obj.Position; 335 grp.AbsolutePosition = obj.Position;
336 prim.RotationOffset = obj.Rotation; 336 prim.RotationOffset = obj.Rotation;
337 337
338
338 // Required for linking 339 // Required for linking
339 grp.RootPart.ClearUpdateSchedule(); 340 grp.RootPart.ClearUpdateSchedule();
340 341
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 8ba1ba3..410ac00 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -5731,28 +5731,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5731 } 5731 }
5732 5732
5733// protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(SceneObjectPart data, UUID recipientID) 5733// protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(SceneObjectPart data, UUID recipientID)
5734 protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(SceneObjectPart data, ScenePresence sp) 5734 protected ObjectUpdatePacket.ObjectDataBlock CreatePrimUpdateBlock(SceneObjectPart part, ScenePresence sp)
5735 { 5735 {
5736 byte[] objectData = new byte[60]; 5736 byte[] objectData = new byte[60];
5737 data.RelativePosition.ToBytes(objectData, 0); 5737 part.RelativePosition.ToBytes(objectData, 0);
5738 data.Velocity.ToBytes(objectData, 12); 5738 part.Velocity.ToBytes(objectData, 12);
5739 data.Acceleration.ToBytes(objectData, 24); 5739 part.Acceleration.ToBytes(objectData, 24);
5740 5740
5741 Quaternion rotation = data.RotationOffset; 5741 Quaternion rotation = part.RotationOffset;
5742 rotation.Normalize(); 5742 rotation.Normalize();
5743 rotation.ToBytes(objectData, 36); 5743 rotation.ToBytes(objectData, 36);
5744 data.AngularVelocity.ToBytes(objectData, 48); 5744 part.AngularVelocity.ToBytes(objectData, 48);
5745 5745
5746 ObjectUpdatePacket.ObjectDataBlock update = new ObjectUpdatePacket.ObjectDataBlock(); 5746 ObjectUpdatePacket.ObjectDataBlock update = new ObjectUpdatePacket.ObjectDataBlock();
5747 update.ClickAction = (byte)data.ClickAction; 5747 update.ClickAction = (byte)part.ClickAction;
5748 update.CRC = 0; 5748 update.CRC = 0;
5749 update.ExtraParams = data.Shape.ExtraParams ?? Utils.EmptyBytes; 5749 update.ExtraParams = part.Shape.ExtraParams ?? Utils.EmptyBytes;
5750 update.FullID = data.UUID; 5750 update.FullID = part.UUID;
5751 update.ID = data.LocalId; 5751 update.ID = part.LocalId;
5752 //update.JointAxisOrAnchor = Vector3.Zero; // These are deprecated 5752 //update.JointAxisOrAnchor = Vector3.Zero; // These are deprecated
5753 //update.JointPivot = Vector3.Zero; 5753 //update.JointPivot = Vector3.Zero;
5754 //update.JointType = 0; 5754 //update.JointType = 0;
5755 update.Material = data.Material; 5755 update.Material = part.Material;
5756 update.MediaURL = Utils.EmptyBytes; // FIXME: Support this in OpenSim 5756 update.MediaURL = Utils.EmptyBytes; // FIXME: Support this in OpenSim
5757/* 5757/*
5758 if (data.ParentGroup.IsAttachment) 5758 if (data.ParentGroup.IsAttachment)
@@ -5781,68 +5781,68 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5781 } 5781 }
5782*/ 5782*/
5783 5783
5784 if (data.ParentGroup.IsAttachment) 5784 if (part.ParentGroup.IsAttachment)
5785 { 5785 {
5786 if (data.IsRoot) 5786 if (part.IsRoot)
5787 { 5787 {
5788 update.NameValue = Util.StringToBytes256("AttachItemID STRING RW SV " + data.ParentGroup.FromItemID); 5788 update.NameValue = Util.StringToBytes256("AttachItemID STRING RW SV " + part.ParentGroup.FromItemID);
5789 } 5789 }
5790 else 5790 else
5791 update.NameValue = Utils.EmptyBytes; 5791 update.NameValue = Utils.EmptyBytes;
5792 5792
5793 int st = (int)data.ParentGroup.AttachmentPoint; 5793 int st = (int)part.ParentGroup.AttachmentPoint;
5794 update.State = (byte)(((st & 0xf0) >> 4) + ((st & 0x0f) << 4)); ; 5794 update.State = (byte)(((st & 0xf0) >> 4) + ((st & 0x0f) << 4)); ;
5795 } 5795 }
5796 else 5796 else
5797 { 5797 {
5798 update.NameValue = Utils.EmptyBytes; 5798 update.NameValue = Utils.EmptyBytes;
5799 update.State = data.Shape.State; // not sure about this 5799 update.State = part.Shape.State; // not sure about this
5800 } 5800 }
5801 5801
5802 5802
5803 update.ObjectData = objectData; 5803 update.ObjectData = objectData;
5804 update.ParentID = data.ParentID; 5804 update.ParentID = part.ParentID;
5805 update.PathBegin = data.Shape.PathBegin; 5805 update.PathBegin = part.Shape.PathBegin;
5806 update.PathCurve = data.Shape.PathCurve; 5806 update.PathCurve = part.Shape.PathCurve;
5807 update.PathEnd = data.Shape.PathEnd; 5807 update.PathEnd = part.Shape.PathEnd;
5808 update.PathRadiusOffset = data.Shape.PathRadiusOffset; 5808 update.PathRadiusOffset = part.Shape.PathRadiusOffset;
5809 update.PathRevolutions = data.Shape.PathRevolutions; 5809 update.PathRevolutions = part.Shape.PathRevolutions;
5810 update.PathScaleX = data.Shape.PathScaleX; 5810 update.PathScaleX = part.Shape.PathScaleX;
5811 update.PathScaleY = data.Shape.PathScaleY; 5811 update.PathScaleY = part.Shape.PathScaleY;
5812 update.PathShearX = data.Shape.PathShearX; 5812 update.PathShearX = part.Shape.PathShearX;
5813 update.PathShearY = data.Shape.PathShearY; 5813 update.PathShearY = part.Shape.PathShearY;
5814 update.PathSkew = data.Shape.PathSkew; 5814 update.PathSkew = part.Shape.PathSkew;
5815 update.PathTaperX = data.Shape.PathTaperX; 5815 update.PathTaperX = part.Shape.PathTaperX;
5816 update.PathTaperY = data.Shape.PathTaperY; 5816 update.PathTaperY = part.Shape.PathTaperY;
5817 update.PathTwist = data.Shape.PathTwist; 5817 update.PathTwist = part.Shape.PathTwist;
5818 update.PathTwistBegin = data.Shape.PathTwistBegin; 5818 update.PathTwistBegin = part.Shape.PathTwistBegin;
5819 update.PCode = data.Shape.PCode; 5819 update.PCode = part.Shape.PCode;
5820 update.ProfileBegin = data.Shape.ProfileBegin; 5820 update.ProfileBegin = part.Shape.ProfileBegin;
5821 update.ProfileCurve = data.Shape.ProfileCurve; 5821 update.ProfileCurve = part.Shape.ProfileCurve;
5822 update.ProfileEnd = data.Shape.ProfileEnd; 5822 update.ProfileEnd = part.Shape.ProfileEnd;
5823 update.ProfileHollow = data.Shape.ProfileHollow; 5823 update.ProfileHollow = part.Shape.ProfileHollow;
5824 update.PSBlock = data.ParticleSystem ?? Utils.EmptyBytes; 5824 update.PSBlock = part.ParticleSystem ?? Utils.EmptyBytes;
5825 update.TextColor = data.GetTextColor().GetBytes(false); 5825 update.TextColor = part.GetTextColor().GetBytes(false);
5826 update.TextureAnim = data.TextureAnimation ?? Utils.EmptyBytes; 5826 update.TextureAnim = part.TextureAnimation ?? Utils.EmptyBytes;
5827 update.TextureEntry = data.Shape.TextureEntry ?? Utils.EmptyBytes; 5827 update.TextureEntry = part.Shape.TextureEntry ?? Utils.EmptyBytes;
5828 update.Scale = data.Shape.Scale; 5828 update.Scale = part.Shape.Scale;
5829 update.Text = Util.StringToBytes256(data.Text); 5829 update.Text = Util.StringToBytes256(part.Text);
5830 update.MediaURL = Util.StringToBytes256(data.MediaUrl); 5830 update.MediaURL = Util.StringToBytes256(part.MediaUrl);
5831 5831
5832 #region PrimFlags 5832 #region PrimFlags
5833 5833
5834 PrimFlags flags = (PrimFlags)m_scene.Permissions.GenerateClientFlags(sp, data.UUID); 5834 PrimFlags flags = (PrimFlags)m_scene.Permissions.GenerateClientFlags(part, sp);
5835 5835
5836 // Don't send the CreateSelected flag to everyone 5836 // Don't send the CreateSelected flag to everyone
5837 flags &= ~PrimFlags.CreateSelected; 5837 flags &= ~PrimFlags.CreateSelected;
5838 5838
5839 if (sp.UUID == data.OwnerID) 5839 if (sp.UUID == part.OwnerID)
5840 { 5840 {
5841 if (data.CreateSelected) 5841 if (part.CreateSelected)
5842 { 5842 {
5843 // Only send this flag once, then unset it 5843 // Only send this flag once, then unset it
5844 flags |= PrimFlags.CreateSelected; 5844 flags |= PrimFlags.CreateSelected;
5845 data.CreateSelected = false; 5845 part.CreateSelected = false;
5846 } 5846 }
5847 } 5847 }
5848 5848
@@ -5854,21 +5854,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5854 5854
5855 #endregion PrimFlags 5855 #endregion PrimFlags
5856 5856
5857 if (data.Sound != UUID.Zero) 5857 if (part.Sound != UUID.Zero)
5858 { 5858 {
5859 update.Sound = data.Sound; 5859 update.Sound = part.Sound;
5860 update.OwnerID = data.OwnerID; 5860 update.OwnerID = part.OwnerID;
5861 update.Gain = (float)data.SoundGain; 5861 update.Gain = (float)part.SoundGain;
5862 update.Radius = (float)data.SoundRadius; 5862 update.Radius = (float)part.SoundRadius;
5863 update.Flags = data.SoundFlags; 5863 update.Flags = part.SoundFlags;
5864 } 5864 }
5865 5865
5866 switch ((PCode)data.Shape.PCode) 5866 switch ((PCode)part.Shape.PCode)
5867 { 5867 {
5868 case PCode.Grass: 5868 case PCode.Grass:
5869 case PCode.Tree: 5869 case PCode.Tree:
5870 case PCode.NewTree: 5870 case PCode.NewTree:
5871 update.Data = new byte[] { data.Shape.State }; 5871 update.Data = new byte[] { part.Shape.State };
5872 break; 5872 break;
5873 default: 5873 default:
5874 update.Data = Utils.EmptyBytes; 5874 update.Data = Utils.EmptyBytes;
@@ -7758,10 +7758,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
7758 7758
7759 ObjectDuplicate handlerObjectDuplicate = null; 7759 ObjectDuplicate handlerObjectDuplicate = null;
7760 7760
7761 for (int i = 0; i < dupe.ObjectData.Length; i++) 7761 handlerObjectDuplicate = OnObjectDuplicate;
7762 if (handlerObjectDuplicate != null)
7762 { 7763 {
7763 handlerObjectDuplicate = OnObjectDuplicate; 7764 for (int i = 0; i < dupe.ObjectData.Length; i++)
7764 if (handlerObjectDuplicate != null)
7765 { 7765 {
7766 UUID rezGroupID = dupe.AgentData.GroupID; 7766 UUID rezGroupID = dupe.AgentData.GroupID;
7767 if(!IsGroupMember(rezGroupID)) 7767 if(!IsGroupMember(rezGroupID))