aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Avatar/Appearance
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-12-06 16:42:28 +0000
committerJustin Clark-Casey (justincc)2011-12-06 16:42:44 +0000
commit4be85eeaa53029381c9f6e0fec7ab18ab59eef06 (patch)
tree03a231cc3631a195f358496acd3a379262615e3d /OpenSim/Region/OptionalModules/Avatar/Appearance
parentProvide feedback as to which avatars are resending appearance informion on "a... (diff)
downloadopensim-SC_OLD-4be85eeaa53029381c9f6e0fec7ab18ab59eef06.zip
opensim-SC_OLD-4be85eeaa53029381c9f6e0fec7ab18ab59eef06.tar.gz
opensim-SC_OLD-4be85eeaa53029381c9f6e0fec7ab18ab59eef06.tar.bz2
opensim-SC_OLD-4be85eeaa53029381c9f6e0fec7ab18ab59eef06.tar.xz
Make it possible to manually send appearance information via the "appearance send" command for a chosen avatar as well as all
Diffstat (limited to 'OpenSim/Region/OptionalModules/Avatar/Appearance')
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs53
1 files changed, 42 insertions, 11 deletions
diff --git a/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs b/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs
index 59ad008..c6ee36b 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs
@@ -97,36 +97,67 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
97 "appearance show", 97 "appearance show",
98 "Show appearance information for each avatar in the simulator.", 98 "Show appearance information for each avatar in the simulator.",
99 "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.", 99 "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.",
100 ShowAppearanceInfo); 100 HandleShowAppearanceCommand);
101 101
102 scene.AddCommand( 102 scene.AddCommand(
103 this, "appearance send", 103 this, "appearance send",
104 "appearance send", 104 "appearance send [<first-name> <last-name>]",
105 "Send appearance data for each avatar in the simulator to viewers.", 105 "Send appearance data for each avatar in the simulator to other viewers."
106 SendAppearance); 106 + "\nOptionally, you can specify that only a particular avatar's information is sent.",
107 HandleSendAppearanceCommand);
107 } 108 }
108 109
109 private void SendAppearance(string module, string[] cmd) 110 private void HandleSendAppearanceCommand(string module, string[] cmd)
110 { 111 {
112 if (cmd.Length != 2 && cmd.Length < 4)
113 {
114 MainConsole.Instance.OutputFormat("Usage: appearance send [<first-name> <last-name>]");
115 return;
116 }
117
118 bool targetNameSupplied = false;
119 string optionalTargetFirstName = null;
120 string optionalTargetLastName = null;
121
122 if (cmd.Length >= 4)
123 {
124 targetNameSupplied = true;
125 optionalTargetFirstName = cmd[2];
126 optionalTargetLastName = cmd[3];
127 }
128
111 lock (m_scenes) 129 lock (m_scenes)
112 { 130 {
113 foreach (Scene scene in m_scenes.Values) 131 foreach (Scene scene in m_scenes.Values)
114 { 132 {
115 scene.ForEachRootScenePresence( 133 if (targetNameSupplied)
116 sp => 134 {
135 ScenePresence sp = scene.GetScenePresence(optionalTargetFirstName, optionalTargetLastName);
136 if (sp != null && !sp.IsChildAgent)
117 { 137 {
118 MainConsole.Instance.OutputFormat( 138 MainConsole.Instance.OutputFormat(
119 "Sending appearance information for {0} to all other avatars in {1}", 139 "Sending appearance information for {0} to all other avatars in {1}",
120 sp.Name, scene.RegionInfo.RegionName); 140 sp.Name, scene.RegionInfo.RegionName);
121
122 scene.AvatarFactory.SendAppearance(sp.UUID);
123 } 141 }
124 ); 142 }
143 else
144 {
145 scene.ForEachRootScenePresence(
146 sp =>
147 {
148 MainConsole.Instance.OutputFormat(
149 "Sending appearance information for {0} to all other avatars in {1}",
150 sp.Name, scene.RegionInfo.RegionName);
151
152 scene.AvatarFactory.SendAppearance(sp.UUID);
153 }
154 );
155 }
125 } 156 }
126 } 157 }
127 } 158 }
128 159
129 protected void ShowAppearanceInfo(string module, string[] cmd) 160 protected void HandleShowAppearanceCommand(string module, string[] cmd)
130 { 161 {
131 lock (m_scenes) 162 lock (m_scenes)
132 { 163 {