aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/AgentCircuitData.cs
diff options
context:
space:
mode:
authorMic Bowman2010-11-23 16:08:10 -0800
committerJustin Clark-Casey (justincc)2010-11-27 01:14:36 +0000
commit541a7660e06206c9a9eb2426dee0449afb554921 (patch)
tree16a99d09acd76e0c53b37300de069e0a4c6a8163 /OpenSim/Framework/AgentCircuitData.cs
parentAnother attempt at fixing failing test for creator info. (diff)
downloadopensim-SC_OLD-541a7660e06206c9a9eb2426dee0449afb554921.zip
opensim-SC_OLD-541a7660e06206c9a9eb2426dee0449afb554921.tar.gz
opensim-SC_OLD-541a7660e06206c9a9eb2426dee0449afb554921.tar.bz2
opensim-SC_OLD-541a7660e06206c9a9eb2426dee0449afb554921.tar.xz
Refactor appearance and avatar data sending code. Paritioning the routines into "one-to-many" and "many-to-one" makes it possible to call the right function on presence creation (both child and root) and when a child agent is promoted to root. This brings the total number of appearance sends down to one or two on login.
Cleaned up the avatar update calls in the groups code. Cleaned up some commented and debugging code, and a few formating fixes.
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/AgentCircuitData.cs35
1 files changed, 15 insertions, 20 deletions
diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs
index cc9fcea..1600bdc 100644
--- a/OpenSim/Framework/AgentCircuitData.cs
+++ b/OpenSim/Framework/AgentCircuitData.cs
@@ -302,31 +302,26 @@ namespace OpenSim.Framework
302 if (args["start_pos"] != null) 302 if (args["start_pos"] != null)
303 Vector3.TryParse(args["start_pos"].AsString(), out startpos); 303 Vector3.TryParse(args["start_pos"].AsString(), out startpos);
304 304
305// DEBUG ON 305 m_log.InfoFormat("[AGENTCIRCUITDATA] agentid={0}, child={1}, startpos={2}",AgentID,child,startpos.ToString());
306 m_log.WarnFormat("[AGENTCIRCUITDATA] agentid={0}, child={1}, startpos={2}",AgentID,child,startpos.ToString());
307// DEBUG OFF
308 306
309 try { 307 try {
310 // Unpack various appearance elements 308 // Unpack various appearance elements
311 Appearance = new AvatarAppearance(AgentID); 309 Appearance = new AvatarAppearance(AgentID);
312 310
313 // Eventually this code should be deprecated, use full appearance 311 // Eventually this code should be deprecated, use full appearance
314 // packing in packed_appearance 312 // packing in packed_appearance
315 if (args["appearance_serial"] != null) 313 if (args["appearance_serial"] != null)
316 Appearance.Serial = args["appearance_serial"].AsInteger(); 314 Appearance.Serial = args["appearance_serial"].AsInteger();
317 315
318 if (args.ContainsKey("packed_appearance") && (args["packed_appearance"].Type == OSDType.Map)) 316 if (args.ContainsKey("packed_appearance") && (args["packed_appearance"].Type == OSDType.Map))
319 { 317 {
320 Appearance.Unpack((OSDMap)args["packed_appearance"]); 318 Appearance.Unpack((OSDMap)args["packed_appearance"]);
321// DEBUG ON 319 m_log.InfoFormat("[AGENTCIRCUITDATA] unpacked appearance");
322 m_log.WarnFormat("[AGENTCIRCUITDATA] unpacked appearance"); 320 }
323// DEBUG OFF 321 else
322 m_log.Warn("[AGENTCIRCUITDATA] failed to find a valid packed_appearance");
324 } 323 }
325// DEBUG ON 324 catch (Exception e)
326 else
327 m_log.Warn("[AGENTCIRCUITDATA] failed to find a valid packed_appearance");
328// DEBUG OFF
329 } catch (Exception e)
330 { 325 {
331 m_log.ErrorFormat("[AGENTCIRCUITDATA] failed to unpack appearance; {0}",e.Message); 326 m_log.ErrorFormat("[AGENTCIRCUITDATA] failed to unpack appearance; {0}",e.Message);
332 } 327 }