From 47a5d71b7e7e8a354bd5640055cf4efdb881b954 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Tue, 11 Nov 2008 19:08:59 +0000
Subject: Prevent pieces from other people's HUDs from displaying at the center
of every user's HUD
---
OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 9 +++++++--
OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs | 4 ++--
OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 3 ++-
OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | 5 +++--
4 files changed, 14 insertions(+), 7 deletions(-)
(limited to 'OpenSim/Region')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 06280ca..f25f3eb 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -2332,8 +2332,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
///
///
///
- public void AttachObject(uint localID, Quaternion rotation, byte attachPoint)
+ public void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID)
{
+ if (attachPoint > 30 && ownerID != AgentId) // Someone else's HUD
+ return;
ObjectAttachPacket attach = (ObjectAttachPacket)PacketPool.Instance.GetPacket(PacketType.ObjectAttach);
Console.WriteLine("Attach object!");
@@ -2458,8 +2460,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
///
///
public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position,
- Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity, byte state, UUID AssetId)
+ Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity, byte state, UUID AssetId, UUID ownerID, int attachPoint)
{
+ if (attachPoint > 30 && ownerID != AgentId) // Someone else's HUD
+ return;
+
if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0)
rotation = Quaternion.Identity;
ImprovedTerseObjectUpdatePacket terse = (ImprovedTerseObjectUpdatePacket)PacketPool.Instance.GetPacket(PacketType.ImprovedTerseObjectUpdate);
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
index 7b077ec..2792bf8 100644
--- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
@@ -560,7 +560,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
{
}
- public virtual void AttachObject(uint localID, Quaternion rotation, byte attachPoint)
+ public virtual void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID)
{
}
@@ -587,7 +587,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
}
public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID,
Vector3 position, Quaternion rotation, Vector3 velocity,
- Vector3 rotationalvelocity, byte state, UUID AssetId)
+ Vector3 rotationalvelocity, byte state, UUID AssetId, UUID ownerID, int attachPoint)
{
}
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 05b23aa..c5f20da 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -3362,7 +3362,8 @@ if (m_shape != null) {
(ushort)(m_parentGroup.GetTimeDilation() *
(float)ushort.MaxValue), LocalId, lPos,
RotationOffset, Velocity,
- RotationalVelocity, state, FromAssetID);
+ RotationalVelocity, state, FromAssetID,
+ OwnerID, (int)AttachmentPoint);
}
}
}
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index 66fb6d8..44ad400 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -473,7 +473,7 @@ namespace OpenSim.Region.Examples.SimpleModule
{
}
- public virtual void AttachObject(uint localID, Quaternion rotation, byte attachPoint)
+ public virtual void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID)
{
}
@@ -500,7 +500,8 @@ namespace OpenSim.Region.Examples.SimpleModule
}
public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID,
Vector3 position, Quaternion rotation, Vector3 velocity,
- Vector3 rotationalvelocity, byte state, UUID AssetId)
+ Vector3 rotationalvelocity, byte state, UUID AssetId,
+ UUID ownerID, int attachPoint)
{
}
--
cgit v1.1