aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ChildAgentDataUpdate.cs
diff options
context:
space:
mode:
authordiva2009-02-23 00:51:31 +0000
committerdiva2009-02-23 00:51:31 +0000
commit20eb8e54ac511b5e8988cb3c3701c824b41170c4 (patch)
tree4e65467f0cf78f5757306500a8d551e635e5ae58 /OpenSim/Region/Framework/Scenes/ChildAgentDataUpdate.cs
parentMantis#3218. Thank you kindly, TLaukkan (Tommil) for a patch that: (diff)
downloadopensim-SC_OLD-20eb8e54ac511b5e8988cb3c3701c824b41170c4.zip
opensim-SC_OLD-20eb8e54ac511b5e8988cb3c3701c824b41170c4.tar.gz
opensim-SC_OLD-20eb8e54ac511b5e8988cb3c3701c824b41170c4.tar.bz2
opensim-SC_OLD-20eb8e54ac511b5e8988cb3c3701c824b41170c4.tar.xz
A little bit more tweaking with appearance. Now passing both the wearables and the textures referred to in the Texture faces of AvatarAppearance. The textures are still not being acted upon on the other side, but they will.
Note: will make avies coming from older sims casper or grey. Upgrade! Related to mantis #3204.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ChildAgentDataUpdate.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ChildAgentDataUpdate.cs91
1 files changed, 38 insertions, 53 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ChildAgentDataUpdate.cs b/OpenSim/Region/Framework/Scenes/ChildAgentDataUpdate.cs
index 38eceb1..be3069a 100644
--- a/OpenSim/Region/Framework/Scenes/ChildAgentDataUpdate.cs
+++ b/OpenSim/Region/Framework/Scenes/ChildAgentDataUpdate.cs
@@ -207,39 +207,6 @@ namespace OpenSim.Region.Framework.Scenes
207 } 207 }
208 } 208 }
209 209
210 //public class AgentAnimationData
211 //{
212 // public UUID Animation;
213 // public UUID ObjectID;
214
215 // public AgentAnimationData(UUID anim, UUID obj)
216 // {
217 // Animation = anim;
218 // ObjectID = obj;
219 // }
220
221 // public AgentAnimationData(OSDMap args)
222 // {
223 // UnpackUpdateMessage(args);
224 // }
225
226 // public OSDMap PackUpdateMessage()
227 // {
228 // OSDMap anim = new OSDMap();
229 // anim["animation"] = OSD.FromUUID(Animation);
230 // anim["object_id"] = OSD.FromUUID(ObjectID);
231 // return anim;
232 // }
233
234 // public void UnpackUpdateMessage(OSDMap args)
235 // {
236 // if (args["animation"] != null)
237 // Animation = args["animation"].AsUUID();
238 // if (args["object_id"] != null)
239 // ObjectID = args["object_id"].AsUUID();
240 // }
241 //}
242
243 public class AgentData : IAgentData 210 public class AgentData : IAgentData
244 { 211 {
245 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 212 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -276,16 +243,17 @@ namespace OpenSim.Region.Framework.Scenes
276 public bool AlwaysRun; 243 public bool AlwaysRun;
277 public UUID PreyAgent; 244 public UUID PreyAgent;
278 public Byte AgentAccess; 245 public Byte AgentAccess;
279 public UUID[] AgentTextures;
280 public UUID ActiveGroupID; 246 public UUID ActiveGroupID;
281 247
282 public AgentGroupData[] Groups; 248 public AgentGroupData[] Groups;
283 public Animation[] Anims; 249 public Animation[] Anims;
284 250
285 public UUID GranterID; 251 public UUID GranterID;
286 public Dictionary<string, string> NVPairs;
287 252
253 // Appearance
254 public UUID[] AgentTextures;
288 public byte[] VisualParams; 255 public byte[] VisualParams;
256 public UUID[] Wearables;
289 257
290 public string CallbackURI; 258 public string CallbackURI;
291 259
@@ -325,14 +293,6 @@ namespace OpenSim.Region.Framework.Scenes
325 args["prey_agent"] = OSD.FromUUID(PreyAgent); 293 args["prey_agent"] = OSD.FromUUID(PreyAgent);
326 args["agent_access"] = OSD.FromString(AgentAccess.ToString()); 294 args["agent_access"] = OSD.FromString(AgentAccess.ToString());
327 295
328 if ((AgentTextures != null) && (AgentTextures.Length > 0))
329 {
330 OSDArray textures = new OSDArray(AgentTextures.Length);
331 foreach (UUID uuid in AgentTextures)
332 textures.Add(OSD.FromUUID(uuid));
333 args["agent_textures"] = textures;
334 }
335
336 args["active_group_id"] = OSD.FromUUID(ActiveGroupID); 296 args["active_group_id"] = OSD.FromUUID(ActiveGroupID);
337 297
338 if ((Groups != null) && (Groups.Length > 0)) 298 if ((Groups != null) && (Groups.Length > 0))
@@ -351,10 +311,26 @@ namespace OpenSim.Region.Framework.Scenes
351 args["animations"] = anims; 311 args["animations"] = anims;
352 } 312 }
353 313
314 if ((AgentTextures != null) && (AgentTextures.Length > 0))
315 {
316 OSDArray textures = new OSDArray(AgentTextures.Length);
317 foreach (UUID uuid in AgentTextures)
318 textures.Add(OSD.FromUUID(uuid));
319 args["agent_textures"] = textures;
320 }
321
354 if ((VisualParams != null) && (VisualParams.Length > 0)) 322 if ((VisualParams != null) && (VisualParams.Length > 0))
355 args["visual_params"] = OSD.FromBinary(VisualParams); 323 args["visual_params"] = OSD.FromBinary(VisualParams);
356 324
357 // Last few fields are still missing: granter and NVPais 325 // We might not pass this in all cases...
326 if ((Wearables != null) && (Wearables.Length > 0))
327 {
328 OSDArray wears = new OSDArray(Wearables.Length);
329 foreach (UUID uuid in Wearables)
330 wears.Add(OSD.FromUUID(uuid));
331 args["wearables"] = wears;
332 }
333
358 334
359 if ((CallbackURI != null) && (!CallbackURI.Equals(""))) 335 if ((CallbackURI != null) && (!CallbackURI.Equals("")))
360 args["callback_uri"] = OSD.FromString(CallbackURI); 336 args["callback_uri"] = OSD.FromString(CallbackURI);
@@ -441,15 +417,6 @@ namespace OpenSim.Region.Framework.Scenes
441 if (args["agent_access"] != null) 417 if (args["agent_access"] != null)
442 Byte.TryParse(args["agent_access"].AsString(), out AgentAccess); 418 Byte.TryParse(args["agent_access"].AsString(), out AgentAccess);
443 419
444 if ((args["agent_textures"] != null) && (args["agent_textures"]).Type == OSDType.Array)
445 {
446 OSDArray textures = (OSDArray)(args["agent_textures"]);
447 AgentTextures = new UUID[textures.Count];
448 int i = 0;
449 foreach (OSD o in textures)
450 AgentTextures[i++] = o.AsUUID();
451 }
452
453 if (args["active_group_id"] != null) 420 if (args["active_group_id"] != null)
454 ActiveGroupID = args["active_group_id"].AsUUID(); 421 ActiveGroupID = args["active_group_id"].AsUUID();
455 422
@@ -481,9 +448,27 @@ namespace OpenSim.Region.Framework.Scenes
481 } 448 }
482 } 449 }
483 450
451 if ((args["agent_textures"] != null) && (args["agent_textures"]).Type == OSDType.Array)
452 {
453 OSDArray textures = (OSDArray)(args["agent_textures"]);
454 AgentTextures = new UUID[textures.Count];
455 int i = 0;
456 foreach (OSD o in textures)
457 AgentTextures[i++] = o.AsUUID();
458 }
459
484 if (args["visual_params"] != null) 460 if (args["visual_params"] != null)
485 VisualParams = args["visual_params"].AsBinary(); 461 VisualParams = args["visual_params"].AsBinary();
486 462
463 if ((args["wearables"] != null) && (args["wearables"]).Type == OSDType.Array)
464 {
465 OSDArray wears = (OSDArray)(args["wearables"]);
466 Wearables = new UUID[wears.Count];
467 int i = 0;
468 foreach (OSD o in wears)
469 Wearables[i++] = o.AsUUID();
470 }
471
487 if (args["callback_uri"] != null) 472 if (args["callback_uri"] != null)
488 CallbackURI = args["callback_uri"].AsString(); 473 CallbackURI = args["callback_uri"].AsString();
489 } 474 }