From a42569d89675430087d32332e168429d4185311c Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sun, 16 Aug 2009 15:06:06 +0900 Subject: Thanks dmiles for a patch that adds PacketType.RequestMultipleObjects Packet Handler - ref mantis #4010 --- .../Framework/Scenes/Scene.PacketHandlers.cs | 23 ++++++++++++++++++++++ OpenSim/Region/Framework/Scenes/Scene.cs | 1 + 2 files changed, 24 insertions(+) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index 113918d..1a7f8f8 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs @@ -109,6 +109,29 @@ namespace OpenSim.Region.Framework.Scenes } /// + /// Invoked when the client requests a prim. + /// + /// + /// + public void RequestPrim(uint primLocalID, IClientAPI remoteClient) + { + PacketType i = PacketType.ObjectUpdate; + List EntityList = GetEntities(); + + foreach (EntityBase ent in EntityList) + { + if (ent is SceneObjectGroup) + { + if (((SceneObjectGroup)ent).LocalId == primLocalID) + { + ((SceneObjectGroup)ent).SendFullUpdateToClient(remoteClient); + return; + } + } + } + } + + /// /// Invoked when the client selects a prim. /// /// diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 18d7bad..a2275f8 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2076,6 +2076,7 @@ namespace OpenSim.Region.Framework.Scenes client.OnUpdatePrimTexture += m_sceneGraph.UpdatePrimTexture; client.OnTeleportLocationRequest += RequestTeleportLocation; client.OnTeleportLandmarkRequest += RequestTeleportLandmark; + client.OnObjectRequest += RequestPrim; client.OnObjectSelect += SelectPrim; client.OnObjectDeselect += DeselectPrim; client.OnGrabUpdate += m_sceneGraph.MoveObject; -- cgit v1.1