diff options
author | John Hurliman | 2009-10-27 00:26:56 -0700 |
---|---|---|
committer | John Hurliman | 2009-10-27 00:26:56 -0700 |
commit | c75d4156487b35aac47aa6818144862a99bb841c (patch) | |
tree | f00f7b485cb3a39477fa77dbd162c40ede533190 /OpenSim/Region/Framework | |
parent | Adding missing CSJ2K reference to OpenSim.Region.Physics.Meshing (diff) | |
download | opensim-SC_OLD-c75d4156487b35aac47aa6818144862a99bb841c.zip opensim-SC_OLD-c75d4156487b35aac47aa6818144862a99bb841c.tar.gz opensim-SC_OLD-c75d4156487b35aac47aa6818144862a99bb841c.tar.bz2 opensim-SC_OLD-c75d4156487b35aac47aa6818144862a99bb841c.tar.xz |
* Converts ClientManager.ForEach() (and as a result, Scene.ForEachClient()) to use a non-blocking parallel method when operating in async mode
* Minor code readability cleanup
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | 5 |
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) |