diff options
author | Justin Clark-Casey (justincc) | 2011-08-27 00:15:21 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-08-27 00:15:21 +0100 |
commit | 33a894f3d2cc95a7a512b86f39f3c6a6afabb015 (patch) | |
tree | 064edbd623ea0bd7bb85c29dc28d2348feb8454b /OpenSim/Region/ClientStack/Linden | |
parent | refactor: simplify SOP.AttachedAvatar into SOG.AttachedAvatar (diff) | |
download | opensim-SC_OLD-33a894f3d2cc95a7a512b86f39f3c6a6afabb015.zip opensim-SC_OLD-33a894f3d2cc95a7a512b86f39f3c6a6afabb015.tar.gz opensim-SC_OLD-33a894f3d2cc95a7a512b86f39f3c6a6afabb015.tar.bz2 opensim-SC_OLD-33a894f3d2cc95a7a512b86f39f3c6a6afabb015.tar.xz |
refactor: move SOP.IsAttachment and AttachmentPoint up into SOG to avoid pointless duplication of identical values
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs index 8189518..c07fc73 100644 --- a/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs +++ b/OpenSim/Region/ClientStack/Linden/Caps/ObjectCaps/UploadObjectAssetModule.cs | |||
@@ -330,7 +330,7 @@ namespace OpenSim.Region.ClientStack.Linden | |||
330 | grp.AbsolutePosition = obj.Position; | 330 | grp.AbsolutePosition = obj.Position; |
331 | prim.RotationOffset = obj.Rotation; | 331 | prim.RotationOffset = obj.Rotation; |
332 | 332 | ||
333 | grp.RootPart.IsAttachment = false; | 333 | grp.IsAttachment = false; |
334 | // Required for linking | 334 | // Required for linking |
335 | grp.RootPart.UpdateFlag = 0; | 335 | grp.RootPart.UpdateFlag = 0; |
336 | 336 | ||
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index f71871e..dc9a6ed 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -4756,7 +4756,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4756 | { | 4756 | { |
4757 | SceneObjectPart part = (SceneObjectPart)entity; | 4757 | SceneObjectPart part = (SceneObjectPart)entity; |
4758 | 4758 | ||
4759 | attachPoint = part.AttachmentPoint; | 4759 | if (part.ParentGroup != null) |
4760 | attachPoint = part.ParentGroup.AttachmentPoint; | ||
4761 | else | ||
4762 | attachPoint = 0; | ||
4763 | |||
4760 | collisionPlane = Vector4.Zero; | 4764 | collisionPlane = Vector4.Zero; |
4761 | position = part.RelativePosition; | 4765 | position = part.RelativePosition; |
4762 | velocity = part.Velocity; | 4766 | velocity = part.Velocity; |
@@ -4913,10 +4917,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
4913 | //update.JointType = 0; | 4917 | //update.JointType = 0; |
4914 | update.Material = data.Material; | 4918 | update.Material = data.Material; |
4915 | update.MediaURL = Utils.EmptyBytes; // FIXME: Support this in OpenSim | 4919 | update.MediaURL = Utils.EmptyBytes; // FIXME: Support this in OpenSim |
4916 | if (data.IsAttachment) | 4920 | if (data.ParentGroup != null && data.ParentGroup.IsAttachment) |
4917 | { | 4921 | { |
4918 | update.NameValue = Util.StringToBytes256("AttachItemID STRING RW SV " + data.FromItemID); | 4922 | update.NameValue = Util.StringToBytes256("AttachItemID STRING RW SV " + data.FromItemID); |
4919 | update.State = (byte)((data.AttachmentPoint % 16) * 16 + (data.AttachmentPoint / 16)); | 4923 | update.State = (byte)((data.ParentGroup.AttachmentPoint % 16) * 16 + (data.ParentGroup.AttachmentPoint / 16)); |
4920 | } | 4924 | } |
4921 | else | 4925 | else |
4922 | { | 4926 | { |