aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index 4ae4dc3..ac89f7b 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
@@ -390,6 +390,32 @@ namespace OpenSim.Region.Framework.Scenes
390 EventManager.TriggerScriptReset(part.LocalId, itemID); 390 EventManager.TriggerScriptReset(part.LocalId, itemID);
391 } 391 }
392 } 392 }
393
394 void ProcessViewerEffect(IClientAPI remoteClient, List<ViewerEffectEventHandlerArg> args)
395 {
396 // TODO: don't create new blocks if recycling an old packet
397 List<ViewerEffectPacket.EffectBlock> effectBlock = new List<ViewerEffectPacket.EffectBlock>();
398 for (int i = 0; i < args.Count; i++)
399 {
400 ViewerEffectPacket.EffectBlock effect = new ViewerEffectPacket.EffectBlock();
401 effect.AgentID = args[i].AgentID;
402 effect.Color = args[i].Color;
403 effect.Duration = args[i].Duration;
404 effect.ID = args[i].ID;
405 effect.Type = args[i].Type;
406 effect.TypeData = args[i].TypeData;
407 effectBlock.Add(effect);
408 }
409 ViewerEffectPacket.EffectBlock[] effectBlockArray = effectBlock.ToArray();
410
411 ClientManager.ForEach(
412 delegate(IClientAPI client)
413 {
414 if (client.AgentId != remoteClient.AgentId)
415 client.SendViewerEffect(effectBlockArray);
416 }
417 );
418 }
393 419
394 /// <summary> 420 /// <summary>
395 /// Handle a fetch inventory request from the client 421 /// Handle a fetch inventory request from the client