diff options
author | Justin Clarke Casey | 2008-10-15 14:41:12 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-10-15 14:41:12 +0000 |
commit | 8ba8b0300ad8cb98714597bac8c83bf7f77b7f64 (patch) | |
tree | 81d83c056fc68360a6b56df35c134ffb31ccc29e /OpenSim/Framework | |
parent | Thanks to T. Sado and nlin for a patch that partially implements llGetAgentIn... (diff) | |
download | opensim-SC_OLD-8ba8b0300ad8cb98714597bac8c83bf7f77b7f64.zip opensim-SC_OLD-8ba8b0300ad8cb98714597bac8c83bf7f77b7f64.tar.gz opensim-SC_OLD-8ba8b0300ad8cb98714597bac8c83bf7f77b7f64.tar.bz2 opensim-SC_OLD-8ba8b0300ad8cb98714597bac8c83bf7f77b7f64.tar.xz |
* Create a new ViewerEffectPacket for each viewer rather than reusing the packet structure
* This would have been a source of out_of_order messages for different sequences, which still appear to be happening
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/ClientManager.cs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/OpenSim/Framework/ClientManager.cs b/OpenSim/Framework/ClientManager.cs index e99001b..68c4dea 100644 --- a/OpenSim/Framework/ClientManager.cs +++ b/OpenSim/Framework/ClientManager.cs | |||
@@ -178,10 +178,9 @@ namespace OpenSim.Framework | |||
178 | } | 178 | } |
179 | 179 | ||
180 | public void ViewerEffectHandler(IClientAPI sender, List<ViewerEffectEventHandlerArg> args) | 180 | public void ViewerEffectHandler(IClientAPI sender, List<ViewerEffectEventHandlerArg> args) |
181 | { | 181 | { |
182 | ViewerEffectPacket packet = (ViewerEffectPacket)PacketPool.Instance.GetPacket(PacketType.ViewerEffect); | ||
183 | // TODO: don't create new blocks if recycling an old packet | 182 | // TODO: don't create new blocks if recycling an old packet |
184 | List<ViewerEffectPacket.EffectBlock> effectBlock = new List<ViewerEffectPacket.EffectBlock>(); | 183 | List<ViewerEffectPacket.EffectBlock> effectBlock = new List<ViewerEffectPacket.EffectBlock>(); |
185 | for (int i = 0; i < args.Count; i++) | 184 | for (int i = 0; i < args.Count; i++) |
186 | { | 185 | { |
187 | ViewerEffectPacket.EffectBlock effect = new ViewerEffectPacket.EffectBlock(); | 186 | ViewerEffectPacket.EffectBlock effect = new ViewerEffectPacket.EffectBlock(); |
@@ -193,7 +192,7 @@ namespace OpenSim.Framework | |||
193 | effect.TypeData = args[i].TypeData; | 192 | effect.TypeData = args[i].TypeData; |
194 | effectBlock.Add(effect); | 193 | effectBlock.Add(effect); |
195 | } | 194 | } |
196 | packet.Effect = effectBlock.ToArray(); | 195 | ViewerEffectPacket.EffectBlock[] effectBlockArray = effectBlock.ToArray(); |
197 | 196 | ||
198 | IClientAPI[] LocalClients; | 197 | IClientAPI[] LocalClients; |
199 | lock (m_clients) | 198 | lock (m_clients) |
@@ -206,6 +205,9 @@ namespace OpenSim.Framework | |||
206 | { | 205 | { |
207 | if (LocalClients[i].AgentId != sender.AgentId) | 206 | if (LocalClients[i].AgentId != sender.AgentId) |
208 | { | 207 | { |
208 | ViewerEffectPacket packet = (ViewerEffectPacket)PacketPool.Instance.GetPacket(PacketType.ViewerEffect); | ||
209 | packet.Effect = effectBlockArray; | ||
210 | |||
209 | packet.AgentData.AgentID = LocalClients[i].AgentId; | 211 | packet.AgentData.AgentID = LocalClients[i].AgentId; |
210 | packet.AgentData.SessionID = LocalClients[i].SessionId; | 212 | packet.AgentData.SessionID = LocalClients[i].SessionId; |
211 | packet.Header.Reliable = false; | 213 | packet.Header.Reliable = false; |