aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs5
1 files changed, 2 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs
index cfe32d0..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,9 +404,8 @@ 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 ForEachClient( 410 ForEachClient(
412 delegate(IClientAPI client) 411 delegate(IClientAPI client)