From a9ad16b13acb0865b379e81c86d32eb44d277c56 Mon Sep 17 00:00:00 2001 From: MW Date: Wed, 31 Oct 2007 09:18:24 +0000 Subject: some small changes --- OpenSim/Region/ClientStack/ClientView.API.cs | 4 ++-- OpenSim/Region/ClientStack/ClientView.cs | 2 +- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 13 +++++++------ OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs | 3 ++- 4 files changed, 12 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs index 28d8513..1597cc5 100644 --- a/OpenSim/Region/ClientStack/ClientView.API.cs +++ b/OpenSim/Region/ClientStack/ClientView.API.cs @@ -843,11 +843,11 @@ namespace OpenSim.Region.ClientStack /// /// /// - public void SendWearables(AvatarWearable[] wearables) + public void SendWearables(AvatarWearable[] wearables, int serial) { AgentWearablesUpdatePacket aw = new AgentWearablesUpdatePacket(); aw.AgentData.AgentID = AgentId; - aw.AgentData.SerialNum = 0; + aw.AgentData.SerialNum = (uint)serial; aw.AgentData.SessionID = m_sessionId; aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13]; diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 55f50a4..730c199 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs @@ -203,7 +203,7 @@ namespace OpenSim.Region.ClientStack { if (debug > 0) { - string info; + string info= ""; if (debug < 255 && packet.Type == PacketType.AgentUpdate) return; if (debug < 254 && packet.Type == PacketType.ViewerEffect) diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 56c1401..8d326cf 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -69,6 +69,7 @@ namespace OpenSim.Region.Environment.Scenes private readonly Vector3[] Dir_Vectors = new Vector3[6]; private LLVector3 lastPhysPos = new LLVector3(); + private int m_wearablesSerial = 1; private enum Dir_ControlFlags { @@ -825,7 +826,7 @@ namespace OpenSim.Region.Environment.Scenes /// public void SendOurAppearance(IClientAPI client) { - client.SendWearables(m_wearables); + client.SendWearables(m_wearables, m_wearablesSerial++); //this.SendFullUpdateToAllClients(); //this.SendAppearanceToAllOtherAgents(); @@ -851,10 +852,10 @@ namespace OpenSim.Region.Environment.Scenes { m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence) { - if (scenePresence != this) - { - SendAppearanceToOtherAgent(scenePresence); - } + // if (scenePresence != this) + // { + SendAppearanceToOtherAgent(scenePresence); + // } }); } @@ -1087,7 +1088,7 @@ namespace OpenSim.Region.Environment.Scenes public void SetWearable(int wearableId, AvatarWearable wearable) { m_wearables[wearableId] = wearable; - SendOurAppearance(m_controllingClient); + m_controllingClient.SendWearables(m_wearables, m_wearablesSerial++); } } } diff --git a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs index f7fdbb5..9ed1f35 100644 --- a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs @@ -161,11 +161,12 @@ namespace SimpleApp get { return lastName; } } + public virtual void OutPacket(Packet newPack) { } - public virtual void SendWearables(AvatarWearable[] wearables) + public virtual void SendWearables(AvatarWearable[] wearables, int serial) { } -- cgit v1.1