diff options
author | Adam Johnson | 2009-08-16 15:06:06 +0900 |
---|---|---|
committer | Adam Johnson | 2009-08-16 15:06:06 +0900 |
commit | a42569d89675430087d32332e168429d4185311c (patch) | |
tree | ce80fd881347e31cd47ba9725a0899fb752af326 /OpenSim/Region | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC_OLD-a42569d89675430087d32332e168429d4185311c.zip opensim-SC_OLD-a42569d89675430087d32332e168429d4185311c.tar.gz opensim-SC_OLD-a42569d89675430087d32332e168429d4185311c.tar.bz2 opensim-SC_OLD-a42569d89675430087d32332e168429d4185311c.tar.xz |
Thanks dmiles for a patch that adds PacketType.RequestMultipleObjects Packet Handler - ref mantis #4010
Diffstat (limited to 'OpenSim/Region')
6 files changed, 52 insertions, 0 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 7633b7b..12c2d86 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -197,6 +197,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
197 | private ObjectExtraParams handlerUpdateExtraParams; //OnUpdateExtraParams; | 197 | private ObjectExtraParams handlerUpdateExtraParams; //OnUpdateExtraParams; |
198 | private ObjectDuplicate handlerObjectDuplicate; | 198 | private ObjectDuplicate handlerObjectDuplicate; |
199 | private ObjectDuplicateOnRay handlerObjectDuplicateOnRay; | 199 | private ObjectDuplicateOnRay handlerObjectDuplicateOnRay; |
200 | private ObjectRequest handlerObjectRequest; | ||
200 | private ObjectSelect handlerObjectSelect; | 201 | private ObjectSelect handlerObjectSelect; |
201 | private ObjectDeselect handlerObjectDeselect; | 202 | private ObjectDeselect handlerObjectDeselect; |
202 | private ObjectIncludeInSearch handlerObjectIncludeInSearch; | 203 | private ObjectIncludeInSearch handlerObjectIncludeInSearch; |
@@ -1083,6 +1084,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1083 | public event GodKickUser OnGodKickUser; | 1084 | public event GodKickUser OnGodKickUser; |
1084 | public event ObjectExtraParams OnUpdateExtraParams; | 1085 | public event ObjectExtraParams OnUpdateExtraParams; |
1085 | public event UpdateShape OnUpdatePrimShape; | 1086 | public event UpdateShape OnUpdatePrimShape; |
1087 | public event ObjectRequest OnObjectRequest; | ||
1086 | public event ObjectSelect OnObjectSelect; | 1088 | public event ObjectSelect OnObjectSelect; |
1087 | public event ObjectDeselect OnObjectDeselect; | 1089 | public event ObjectDeselect OnObjectDeselect; |
1088 | public event GenericCall7 OnObjectDescription; | 1090 | public event GenericCall7 OnObjectDescription; |
@@ -5937,6 +5939,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5937 | 5939 | ||
5938 | break; | 5940 | break; |
5939 | 5941 | ||
5942 | case PacketType.RequestMultipleObjects: | ||
5943 | RequestMultipleObjectsPacket incomingRequest = (RequestMultipleObjectsPacket)Pack; | ||
5944 | |||
5945 | #region Packet Session and User Check | ||
5946 | if (m_checkPackets) | ||
5947 | { | ||
5948 | if (incomingRequest.AgentData.SessionID != SessionId || | ||
5949 | incomingRequest.AgentData.AgentID != AgentId) | ||
5950 | break; | ||
5951 | } | ||
5952 | #endregion | ||
5953 | |||
5954 | handlerObjectRequest = null; | ||
5955 | |||
5956 | for (int i = 0; i < incomingRequest.ObjectData.Length; i++) | ||
5957 | { | ||
5958 | handlerObjectRequest = OnObjectRequest; | ||
5959 | if (handlerObjectRequest != null) | ||
5960 | { | ||
5961 | handlerObjectRequest(incomingRequest.ObjectData[i].ID, this); | ||
5962 | } | ||
5963 | } | ||
5964 | break; | ||
5940 | case PacketType.ObjectSelect: | 5965 | case PacketType.ObjectSelect: |
5941 | ObjectSelectPacket incomingselect = (ObjectSelectPacket)Pack; | 5966 | ObjectSelectPacket incomingselect = (ObjectSelectPacket)Pack; |
5942 | 5967 | ||
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 62779e7..e9c35e9 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | |||
@@ -107,6 +107,7 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
107 | public event UpdateShape OnUpdatePrimShape; | 107 | public event UpdateShape OnUpdatePrimShape; |
108 | public event ObjectExtraParams OnUpdateExtraParams; | 108 | public event ObjectExtraParams OnUpdateExtraParams; |
109 | public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; | 109 | public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; |
110 | public event ObjectRequest OnObjectRequest; | ||
110 | public event ObjectSelect OnObjectSelect; | 111 | public event ObjectSelect OnObjectSelect; |
111 | public event GenericCall7 OnObjectDescription; | 112 | public event GenericCall7 OnObjectDescription; |
112 | public event GenericCall7 OnObjectName; | 113 | public event GenericCall7 OnObjectName; |
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 | |||
109 | } | 109 | } |
110 | 110 | ||
111 | /// <summary> | 111 | /// <summary> |
112 | /// Invoked when the client requests a prim. | ||
113 | /// </summary> | ||
114 | /// <param name="primLocalID"></param> | ||
115 | /// <param name="remoteClient"></param> | ||
116 | public void RequestPrim(uint primLocalID, IClientAPI remoteClient) | ||
117 | { | ||
118 | PacketType i = PacketType.ObjectUpdate; | ||
119 | List<EntityBase> EntityList = GetEntities(); | ||
120 | |||
121 | foreach (EntityBase ent in EntityList) | ||
122 | { | ||
123 | if (ent is SceneObjectGroup) | ||
124 | { | ||
125 | if (((SceneObjectGroup)ent).LocalId == primLocalID) | ||
126 | { | ||
127 | ((SceneObjectGroup)ent).SendFullUpdateToClient(remoteClient); | ||
128 | return; | ||
129 | } | ||
130 | } | ||
131 | } | ||
132 | } | ||
133 | |||
134 | /// <summary> | ||
112 | /// Invoked when the client selects a prim. | 135 | /// Invoked when the client selects a prim. |
113 | /// </summary> | 136 | /// </summary> |
114 | /// <param name="primLocalID"></param> | 137 | /// <param name="primLocalID"></param> |
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 | |||
2076 | client.OnUpdatePrimTexture += m_sceneGraph.UpdatePrimTexture; | 2076 | client.OnUpdatePrimTexture += m_sceneGraph.UpdatePrimTexture; |
2077 | client.OnTeleportLocationRequest += RequestTeleportLocation; | 2077 | client.OnTeleportLocationRequest += RequestTeleportLocation; |
2078 | client.OnTeleportLandmarkRequest += RequestTeleportLandmark; | 2078 | client.OnTeleportLandmarkRequest += RequestTeleportLandmark; |
2079 | client.OnObjectRequest += RequestPrim; | ||
2079 | client.OnObjectSelect += SelectPrim; | 2080 | client.OnObjectSelect += SelectPrim; |
2080 | client.OnObjectDeselect += DeselectPrim; | 2081 | client.OnObjectDeselect += DeselectPrim; |
2081 | client.OnGrabUpdate += m_sceneGraph.MoveObject; | 2082 | client.OnGrabUpdate += m_sceneGraph.MoveObject; |
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 08fc61f..a3be181 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs | |||
@@ -686,6 +686,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
686 | public event SpinStop OnSpinStop; | 686 | public event SpinStop OnSpinStop; |
687 | public event UpdateShape OnUpdatePrimShape; | 687 | public event UpdateShape OnUpdatePrimShape; |
688 | public event ObjectExtraParams OnUpdateExtraParams; | 688 | public event ObjectExtraParams OnUpdateExtraParams; |
689 | public event ObjectRequest OnObjectRequest; | ||
689 | public event ObjectSelect OnObjectSelect; | 690 | public event ObjectSelect OnObjectSelect; |
690 | public event ObjectDeselect OnObjectDeselect; | 691 | public event ObjectDeselect OnObjectDeselect; |
691 | public event GenericCall7 OnObjectDescription; | 692 | public event GenericCall7 OnObjectDescription; |
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs index 4a8ba8c..f0bdf3b 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs | |||
@@ -213,6 +213,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC | |||
213 | public event UpdateShape OnUpdatePrimShape; | 213 | public event UpdateShape OnUpdatePrimShape; |
214 | public event ObjectExtraParams OnUpdateExtraParams; | 214 | public event ObjectExtraParams OnUpdateExtraParams; |
215 | public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; | 215 | public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; |
216 | public event ObjectRequest OnObjectRequest; | ||
216 | public event ObjectSelect OnObjectSelect; | 217 | public event ObjectSelect OnObjectSelect; |
217 | public event GenericCall7 OnObjectDescription; | 218 | public event GenericCall7 OnObjectDescription; |
218 | public event GenericCall7 OnObjectName; | 219 | public event GenericCall7 OnObjectName; |