diff options
Diffstat (limited to 'OpenSim/Framework/ClientManager.cs')
-rw-r--r-- | OpenSim/Framework/ClientManager.cs | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/OpenSim/Framework/ClientManager.cs b/OpenSim/Framework/ClientManager.cs index 35c9319..4f21ab6 100644 --- a/OpenSim/Framework/ClientManager.cs +++ b/OpenSim/Framework/ClientManager.cs | |||
@@ -171,11 +171,22 @@ namespace OpenSim.Framework | |||
171 | return circuits; | 171 | return circuits; |
172 | } | 172 | } |
173 | 173 | ||
174 | public void ViewerEffectHandler(IClientAPI sender, ViewerEffectPacket.EffectBlock[] effectBlock) | 174 | public void ViewerEffectHandler(IClientAPI sender, List<ViewerEffectEventHandlerArg> args) |
175 | { | 175 | { |
176 | ViewerEffectPacket packet = (ViewerEffectPacket) PacketPool.Instance.GetPacket(PacketType.ViewerEffect); | 176 | ViewerEffectPacket packet = (ViewerEffectPacket)PacketPool.Instance.GetPacket(PacketType.ViewerEffect); |
177 | // TODO: don't create new blocks if recycling an old packet | 177 | // TODO: don't create new blocks if recycling an old packet |
178 | packet.Effect = effectBlock; | 178 | List<ViewerEffectPacket.EffectBlock> effectBlock = new List<ViewerEffectPacket.EffectBlock>(); |
179 | for (int i = 0; i < args.Count; i++) | ||
180 | { | ||
181 | ViewerEffectPacket.EffectBlock effect = new ViewerEffectPacket.EffectBlock(); | ||
182 | effect.AgentID = args[i].AgentID; | ||
183 | effect.Color = args[i].Color; | ||
184 | effect.Duration = args[i].Duration; | ||
185 | effect.ID = args[i].ID; | ||
186 | effect.Type = args[i].Type; | ||
187 | effectBlock.Add(effect); | ||
188 | } | ||
189 | packet.Effect = effectBlock.ToArray(); | ||
179 | 190 | ||
180 | // Wasteful, I know | 191 | // Wasteful, I know |
181 | IClientAPI[] LocalClients = new IClientAPI[0]; | 192 | IClientAPI[] LocalClients = new IClientAPI[0]; |
@@ -205,4 +216,4 @@ namespace OpenSim.Framework | |||
205 | } | 216 | } |
206 | } | 217 | } |
207 | } | 218 | } |
208 | } \ No newline at end of file | 219 | } |