From dfeb424afd61bada3fc2aad2a4dbb66d27cb17a1 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Tue, 1 Nov 2011 23:23:45 +0000 Subject: [PATCH] Add "appearance send" command to allow manual sending of appearance. --- .../Region/Framework/Scenes/ScenePresence.cs | 6 +++--- .../Avatar/Appearance/AppearanceInfoModule.cs | 19 ++++++++++++++++++- OpenSim/Tools/pCampBot/PhysicsBot.cs | 4 ++-- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 3d7ea834bc..7ff5812169 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2560,7 +2560,7 @@ namespace OpenSim.Region.Framework.Scenes // only send update from root agents to other clients; children are only "listening posts" if (IsChildAgent) { - m_log.Warn("[SCENE PRESENCE] attempt to send avatar data from a child agent"); + m_log.Warn("[SCENE PRESENCE]: Attempt to send avatar data from a child agent"); return; } @@ -2618,10 +2618,10 @@ namespace OpenSim.Region.Framework.Scenes // only send update from root agents to other clients; children are only "listening posts" if (IsChildAgent) { - m_log.Warn("[SCENE PRESENCE] attempt to send avatar data from a child agent"); + m_log.Warn("[SCENE PRESENCE]: Attempt to send avatar data from a child agent"); return; } - + int count = 0; m_scene.ForEachScenePresence(delegate(ScenePresence scenePresence) { diff --git a/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs b/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs index 77e7acf15e..18d976873d 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs @@ -98,7 +98,24 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance "Show appearance information for each avatar in the simulator.", "At the moment this actually just checks that we have all the required baked textures. If not, then appearance is 'corrupt' and other avatars will continue to see a cloud.", ShowAppearanceInfo); - } + + scene.AddCommand( + this, "appearance send", + "appearance send", + "Send appearance data for each avatar in the simulator to viewers.", + SendAppearance); + } + + private void SendAppearance(string module, string[] cmd) + { + lock (m_scenes) + { + foreach (Scene scene in m_scenes.Values) + { + scene.ForEachRootScenePresence(sp => scene.AvatarFactory.SendAppearance(sp.UUID)); + } + } + } protected void ShowAppearanceInfo(string module, string[] cmd) { diff --git a/OpenSim/Tools/pCampBot/PhysicsBot.cs b/OpenSim/Tools/pCampBot/PhysicsBot.cs index 5d4af3144c..d241e1ec2f 100644 --- a/OpenSim/Tools/pCampBot/PhysicsBot.cs +++ b/OpenSim/Tools/pCampBot/PhysicsBot.cs @@ -95,11 +95,11 @@ namespace pCampBot } // TODO: unused: Vector3 pos = client.Self.SimPosition; - Vector3 newpos = new Vector3(somthing.Next(255), somthing.Next(255), somthing.Next(255)); + Vector3 newpos = new Vector3(somthing.Next(1, 254), somthing.Next(1, 254), somthing.Next(1, 254)); client.Self.Movement.TurnToward(newpos); client.Self.Movement.AtPos = true; - Thread.Sleep(somthing.Next(3000,13000)); + Thread.Sleep(somthing.Next(3000, 13000)); client.Self.Movement.AtPos = false; client.Self.Jump(true);