diff options
Diffstat (limited to 'OpenSim/Framework/ChildAgentDataUpdate.cs')
-rw-r--r-- | OpenSim/Framework/ChildAgentDataUpdate.cs | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs index 825ab81..a1ac84c 100644 --- a/OpenSim/Framework/ChildAgentDataUpdate.cs +++ b/OpenSim/Framework/ChildAgentDataUpdate.cs | |||
@@ -41,14 +41,14 @@ namespace OpenSim.Framework | |||
41 | public Guid AgentID; | 41 | public Guid AgentID; |
42 | public bool alwaysrun; | 42 | public bool alwaysrun; |
43 | public float AVHeight; | 43 | public float AVHeight; |
44 | public sLLVector3 cameraPosition; | 44 | public Vector3 cameraPosition; |
45 | public float drawdistance; | 45 | public float drawdistance; |
46 | public float godlevel; | 46 | public float godlevel; |
47 | public uint GroupAccess; | 47 | public uint GroupAccess; |
48 | public sLLVector3 Position; | 48 | public Vector3 Position; |
49 | public ulong regionHandle; | 49 | public ulong regionHandle; |
50 | public byte[] throttles; | 50 | public byte[] throttles; |
51 | public sLLVector3 Velocity; | 51 | public Vector3 Velocity; |
52 | 52 | ||
53 | public ChildAgentDataUpdate() | 53 | public ChildAgentDataUpdate() |
54 | { | 54 | { |
@@ -177,14 +177,13 @@ namespace OpenSim.Framework | |||
177 | Size = new Vector3(); | 177 | Size = new Vector3(); |
178 | Size.Z = cAgent.AVHeight; | 178 | Size.Z = cAgent.AVHeight; |
179 | 179 | ||
180 | Center = new Vector3(cAgent.cameraPosition.x, cAgent.cameraPosition.y, cAgent.cameraPosition.z); | 180 | Center = cAgent.cameraPosition; |
181 | Far = cAgent.drawdistance; | 181 | Far = cAgent.drawdistance; |
182 | Position = new Vector3(cAgent.Position.x, cAgent.Position.y, cAgent.Position.z); | 182 | Position = cAgent.Position; |
183 | RegionHandle = cAgent.regionHandle; | 183 | RegionHandle = cAgent.regionHandle; |
184 | Throttles = cAgent.throttles; | 184 | Throttles = cAgent.throttles; |
185 | Velocity = new Vector3(cAgent.Velocity.x, cAgent.Velocity.y, cAgent.Velocity.z); | 185 | Velocity = cAgent.Velocity; |
186 | } | 186 | } |
187 | |||
188 | } | 187 | } |
189 | 188 | ||
190 | public class AgentGroupData | 189 | public class AgentGroupData |
@@ -274,7 +273,7 @@ namespace OpenSim.Framework | |||
274 | get { return m_id; } | 273 | get { return m_id; } |
275 | set { m_id = value; } | 274 | set { m_id = value; } |
276 | } | 275 | } |
277 | public ulong RegionHandle; | 276 | public UUID RegionID; |
278 | public uint CircuitCode; | 277 | public uint CircuitCode; |
279 | public UUID SessionID; | 278 | public UUID SessionID; |
280 | 279 | ||
@@ -321,7 +320,7 @@ namespace OpenSim.Framework | |||
321 | OSDMap args = new OSDMap(); | 320 | OSDMap args = new OSDMap(); |
322 | args["message_type"] = OSD.FromString("AgentData"); | 321 | args["message_type"] = OSD.FromString("AgentData"); |
323 | 322 | ||
324 | args["region_handle"] = OSD.FromString(RegionHandle.ToString()); | 323 | args["region_id"] = OSD.FromString(RegionID.ToString()); |
325 | args["circuit_code"] = OSD.FromString(CircuitCode.ToString()); | 324 | args["circuit_code"] = OSD.FromString(CircuitCode.ToString()); |
326 | args["agent_uuid"] = OSD.FromUUID(AgentID); | 325 | args["agent_uuid"] = OSD.FromUUID(AgentID); |
327 | args["session_uuid"] = OSD.FromUUID(SessionID); | 326 | args["session_uuid"] = OSD.FromUUID(SessionID); |
@@ -334,6 +333,7 @@ namespace OpenSim.Framework | |||
334 | args["left_axis"] = OSD.FromString(LeftAxis.ToString()); | 333 | args["left_axis"] = OSD.FromString(LeftAxis.ToString()); |
335 | args["up_axis"] = OSD.FromString(UpAxis.ToString()); | 334 | args["up_axis"] = OSD.FromString(UpAxis.ToString()); |
336 | 335 | ||
336 | |||
337 | args["changed_grid"] = OSD.FromBoolean(ChangedGrid); | 337 | args["changed_grid"] = OSD.FromBoolean(ChangedGrid); |
338 | args["far"] = OSD.FromReal(Far); | 338 | args["far"] = OSD.FromReal(Far); |
339 | args["aspect"] = OSD.FromReal(Aspect); | 339 | args["aspect"] = OSD.FromReal(Aspect); |
@@ -353,7 +353,7 @@ namespace OpenSim.Framework | |||
353 | args["agent_access"] = OSD.FromString(AgentAccess.ToString()); | 353 | args["agent_access"] = OSD.FromString(AgentAccess.ToString()); |
354 | 354 | ||
355 | args["active_group_id"] = OSD.FromUUID(ActiveGroupID); | 355 | args["active_group_id"] = OSD.FromUUID(ActiveGroupID); |
356 | 356 | ||
357 | if ((Groups != null) && (Groups.Length > 0)) | 357 | if ((Groups != null) && (Groups.Length > 0)) |
358 | { | 358 | { |
359 | OSDArray groups = new OSDArray(Groups.Length); | 359 | OSDArray groups = new OSDArray(Groups.Length); |
@@ -378,6 +378,7 @@ namespace OpenSim.Framework | |||
378 | // args["agent_textures"] = textures; | 378 | // args["agent_textures"] = textures; |
379 | //} | 379 | //} |
380 | 380 | ||
381 | |||
381 | if ((AgentTextures != null) && (AgentTextures.Length > 0)) | 382 | if ((AgentTextures != null) && (AgentTextures.Length > 0)) |
382 | args["texture_entry"] = OSD.FromBinary(AgentTextures); | 383 | args["texture_entry"] = OSD.FromBinary(AgentTextures); |
383 | 384 | ||
@@ -393,6 +394,7 @@ namespace OpenSim.Framework | |||
393 | args["wearables"] = wears; | 394 | args["wearables"] = wears; |
394 | } | 395 | } |
395 | 396 | ||
397 | |||
396 | if ((Attachments != null) && (Attachments.Length > 0)) | 398 | if ((Attachments != null) && (Attachments.Length > 0)) |
397 | { | 399 | { |
398 | OSDArray attachs = new OSDArray(Attachments.Length); | 400 | OSDArray attachs = new OSDArray(Attachments.Length); |
@@ -401,9 +403,11 @@ namespace OpenSim.Framework | |||
401 | args["attachments"] = attachs; | 403 | args["attachments"] = attachs; |
402 | } | 404 | } |
403 | 405 | ||
406 | |||
404 | if ((CallbackURI != null) && (!CallbackURI.Equals(""))) | 407 | if ((CallbackURI != null) && (!CallbackURI.Equals(""))) |
405 | args["callback_uri"] = OSD.FromString(CallbackURI); | 408 | args["callback_uri"] = OSD.FromString(CallbackURI); |
406 | 409 | ||
410 | |||
407 | return args; | 411 | return args; |
408 | } | 412 | } |
409 | 413 | ||
@@ -414,8 +418,8 @@ namespace OpenSim.Framework | |||
414 | /// <param name="hash"></param> | 418 | /// <param name="hash"></param> |
415 | public virtual void Unpack(OSDMap args) | 419 | public virtual void Unpack(OSDMap args) |
416 | { | 420 | { |
417 | if (args.ContainsKey("region_handle")) | 421 | if (args.ContainsKey("region_id")) |
418 | UInt64.TryParse(args["region_handle"].AsString(), out RegionHandle); | 422 | UUID.TryParse(args["region_id"].AsString(), out RegionID); |
419 | 423 | ||
420 | if (args["circuit_code"] != null) | 424 | if (args["circuit_code"] != null) |
421 | UInt32.TryParse((string)args["circuit_code"].AsString(), out CircuitCode); | 425 | UInt32.TryParse((string)args["circuit_code"].AsString(), out CircuitCode); |
@@ -572,7 +576,7 @@ namespace OpenSim.Framework | |||
572 | { | 576 | { |
573 | System.Console.WriteLine("------------ AgentData ------------"); | 577 | System.Console.WriteLine("------------ AgentData ------------"); |
574 | System.Console.WriteLine("UUID: " + AgentID); | 578 | System.Console.WriteLine("UUID: " + AgentID); |
575 | System.Console.WriteLine("Region: " + RegionHandle); | 579 | System.Console.WriteLine("Region: " + RegionID); |
576 | System.Console.WriteLine("Position: " + Position); | 580 | System.Console.WriteLine("Position: " + Position); |
577 | } | 581 | } |
578 | } | 582 | } |