diff options
author | John Hurliman | 2009-10-13 12:50:59 -0700 |
---|---|---|
committer | John Hurliman | 2009-10-13 12:50:59 -0700 |
commit | c893761319f7e61d13b2d2301180d0f227fde1a9 (patch) | |
tree | da652a4c57810aee11f50458d09736bb820a4048 /OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |
parent | Avoid checking m_clients collection twice when a UseCircuitCode packet is rec... (diff) | |
download | opensim-SC-c893761319f7e61d13b2d2301180d0f227fde1a9.zip opensim-SC-c893761319f7e61d13b2d2301180d0f227fde1a9.tar.gz opensim-SC-c893761319f7e61d13b2d2301180d0f227fde1a9.tar.bz2 opensim-SC-c893761319f7e61d13b2d2301180d0f227fde1a9.tar.xz |
* Unregister event handlers in LLUDPServer when a client logs out and disconnects
* Move ViewerEffect handling to Scene.PacketHandlers
* Removing the unused CloseAllAgents function
* Trimming ClientManager down. This class needs to be reworked to keep LLUDP circuit codes from intruding into the abstract OpenSim core code
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | 26 |
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..dbbf679 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.ForEachClient( | ||
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 |