From 87e85489f3aa1a2f5d827cfc4941cf5fbfc45b07 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Wed, 15 Oct 2008 16:52:48 +0000 Subject: [PATCH] * refactor: move viewer effect packet into LLClientView --- OpenSim/Framework/ClientManager.cs | 9 +-------- OpenSim/Framework/IClientAPI.cs | 1 + OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 12 ++++++++++++ .../Environment/Modules/World/NPC/NPCAvatar.cs | 4 ++++ .../Region/Examples/SimpleModule/MyNpcCharacter.cs | 4 ++++ 5 files changed, 22 insertions(+), 8 deletions(-) diff --git a/OpenSim/Framework/ClientManager.cs b/OpenSim/Framework/ClientManager.cs index 68c4deaaa2..4ac9b3ccb3 100644 --- a/OpenSim/Framework/ClientManager.cs +++ b/OpenSim/Framework/ClientManager.cs @@ -205,14 +205,7 @@ namespace OpenSim.Framework { if (LocalClients[i].AgentId != sender.AgentId) { - ViewerEffectPacket packet = (ViewerEffectPacket)PacketPool.Instance.GetPacket(PacketType.ViewerEffect); - packet.Effect = effectBlockArray; - - packet.AgentData.AgentID = LocalClients[i].AgentId; - packet.AgentData.SessionID = LocalClients[i].SessionId; - packet.Header.Reliable = false; - packet.Header.Zerocoded = true; - LocalClients[i].OutPacket(packet, ThrottleOutPacketType.Task); + LocalClients[i].SendViewerEffect(effectBlockArray); } } } diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index d5d4c3414b..89fc0af9dc 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -755,6 +755,7 @@ namespace OpenSim.Framework bool AddMoney(int debit); void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition); + void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks); void SendViewerTime(int phase); UUID GetDefaultAnimation(string name); diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index b826a1289a..251ba78d5b 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -2192,6 +2192,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP OutPacket(viewertime, ThrottleOutPacketType.Task); */ } + + public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks) + { + ViewerEffectPacket packet = (ViewerEffectPacket)PacketPool.Instance.GetPacket(PacketType.ViewerEffect); + packet.Effect = effectBlocks; + + packet.AgentData.AgentID = AgentId; + packet.AgentData.SessionID = SessionId; + packet.Header.Reliable = false; + packet.Header.Zerocoded = true; + OutPacket(packet, ThrottleOutPacketType.Task); + } public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs index 21359744c3..86f328852b 100644 --- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs @@ -744,6 +744,10 @@ namespace OpenSim.Region.Environment.Modules.World.NPC { } + public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks) + { + } + public void SendViewerTime(int phase) { } diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index b17436c9d5..663e768d23 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs @@ -739,6 +739,10 @@ namespace OpenSim.Region.Examples.SimpleModule public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong time, uint dlen, uint ylen, float phase) { } + + public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks) + { + } public void SendViewerTime(int phase) {