diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index ac89f7b..1a91f0c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | |||
@@ -394,7 +394,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
394 | void ProcessViewerEffect(IClientAPI remoteClient, List<ViewerEffectEventHandlerArg> args) | 394 | void ProcessViewerEffect(IClientAPI remoteClient, List<ViewerEffectEventHandlerArg> args) |
395 | { | 395 | { |
396 | // TODO: don't create new blocks if recycling an old packet | 396 | // TODO: don't create new blocks if recycling an old packet |
397 | List<ViewerEffectPacket.EffectBlock> effectBlock = new List<ViewerEffectPacket.EffectBlock>(); | 397 | ViewerEffectPacket.EffectBlock[] effectBlockArray = new ViewerEffectPacket.EffectBlock[args.Count]; |
398 | for (int i = 0; i < args.Count; i++) | 398 | for (int i = 0; i < args.Count; i++) |
399 | { | 399 | { |
400 | ViewerEffectPacket.EffectBlock effect = new ViewerEffectPacket.EffectBlock(); | 400 | ViewerEffectPacket.EffectBlock effect = new ViewerEffectPacket.EffectBlock(); |
@@ -404,11 +404,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
404 | effect.ID = args[i].ID; | 404 | effect.ID = args[i].ID; |
405 | effect.Type = args[i].Type; | 405 | effect.Type = args[i].Type; |
406 | effect.TypeData = args[i].TypeData; | 406 | effect.TypeData = args[i].TypeData; |
407 | effectBlock.Add(effect); | 407 | effectBlockArray[i] = effect; |
408 | } | 408 | } |
409 | ViewerEffectPacket.EffectBlock[] effectBlockArray = effectBlock.ToArray(); | ||
410 | 409 | ||
411 | ClientManager.ForEach( | 410 | ForEachClient( |
412 | delegate(IClientAPI client) | 411 | delegate(IClientAPI client) |
413 | { | 412 | { |
414 | if (client.AgentId != remoteClient.AgentId) | 413 | if (client.AgentId != remoteClient.AgentId) |