aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/ClientManager.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/OpenSim/Framework/ClientManager.cs b/OpenSim/Framework/ClientManager.cs
index e99001b..68c4dea 100644
--- a/OpenSim/Framework/ClientManager.cs
+++ b/OpenSim/Framework/ClientManager.cs
@@ -178,10 +178,9 @@ namespace OpenSim.Framework
178 } 178 }
179 179
180 public void ViewerEffectHandler(IClientAPI sender, List<ViewerEffectEventHandlerArg> args) 180 public void ViewerEffectHandler(IClientAPI sender, List<ViewerEffectEventHandlerArg> args)
181 { 181 {
182 ViewerEffectPacket packet = (ViewerEffectPacket)PacketPool.Instance.GetPacket(PacketType.ViewerEffect);
183 // TODO: don't create new blocks if recycling an old packet 182 // TODO: don't create new blocks if recycling an old packet
184 List<ViewerEffectPacket.EffectBlock> effectBlock = new List<ViewerEffectPacket.EffectBlock>(); 183 List<ViewerEffectPacket.EffectBlock> effectBlock = new List<ViewerEffectPacket.EffectBlock>();
185 for (int i = 0; i < args.Count; i++) 184 for (int i = 0; i < args.Count; i++)
186 { 185 {
187 ViewerEffectPacket.EffectBlock effect = new ViewerEffectPacket.EffectBlock(); 186 ViewerEffectPacket.EffectBlock effect = new ViewerEffectPacket.EffectBlock();
@@ -193,7 +192,7 @@ namespace OpenSim.Framework
193 effect.TypeData = args[i].TypeData; 192 effect.TypeData = args[i].TypeData;
194 effectBlock.Add(effect); 193 effectBlock.Add(effect);
195 } 194 }
196 packet.Effect = effectBlock.ToArray(); 195 ViewerEffectPacket.EffectBlock[] effectBlockArray = effectBlock.ToArray();
197 196
198 IClientAPI[] LocalClients; 197 IClientAPI[] LocalClients;
199 lock (m_clients) 198 lock (m_clients)
@@ -206,6 +205,9 @@ namespace OpenSim.Framework
206 { 205 {
207 if (LocalClients[i].AgentId != sender.AgentId) 206 if (LocalClients[i].AgentId != sender.AgentId)
208 { 207 {
208 ViewerEffectPacket packet = (ViewerEffectPacket)PacketPool.Instance.GetPacket(PacketType.ViewerEffect);
209 packet.Effect = effectBlockArray;
210
209 packet.AgentData.AgentID = LocalClients[i].AgentId; 211 packet.AgentData.AgentID = LocalClients[i].AgentId;
210 packet.AgentData.SessionID = LocalClients[i].SessionId; 212 packet.AgentData.SessionID = LocalClients[i].SessionId;
211 packet.Header.Reliable = false; 213 packet.Header.Reliable = false;