aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/ChildAgentDataUpdate.cs25
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs13
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs7
3 files changed, 39 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ChildAgentDataUpdate.cs b/OpenSim/Region/Framework/Scenes/ChildAgentDataUpdate.cs
index 17d3bb9..7e6e52a 100644
--- a/OpenSim/Region/Framework/Scenes/ChildAgentDataUpdate.cs
+++ b/OpenSim/Region/Framework/Scenes/ChildAgentDataUpdate.cs
@@ -40,8 +40,8 @@ namespace OpenSim.Region.Framework.Scenes
40 { 40 {
41 UUID AgentID { get; set; } 41 UUID AgentID { get; set; }
42 42
43 OSDMap PackUpdateMessage(); 43 OSDMap Pack();
44 void UnpackUpdateMessage(OSDMap map); 44 void Unpack(OSDMap map);
45 } 45 }
46 46
47 /// <summary> 47 /// <summary>
@@ -74,7 +74,7 @@ namespace OpenSim.Region.Framework.Scenes
74 public byte[] Throttles; 74 public byte[] Throttles;
75 75
76 76
77 public OSDMap PackUpdateMessage() 77 public OSDMap Pack()
78 { 78 {
79 OSDMap args = new OSDMap(); 79 OSDMap args = new OSDMap();
80 args["message_type"] = OSD.FromString("AgentPosition"); 80 args["message_type"] = OSD.FromString("AgentPosition");
@@ -101,7 +101,7 @@ namespace OpenSim.Region.Framework.Scenes
101 return args; 101 return args;
102 } 102 }
103 103
104 public void UnpackUpdateMessage(OSDMap args) 104 public void Unpack(OSDMap args)
105 { 105 {
106 if (args.ContainsKey("region_handle")) 106 if (args.ContainsKey("region_handle"))
107 UInt64.TryParse(args["region_handle"].AsString(), out RegionHandle); 107 UInt64.TryParse(args["region_handle"].AsString(), out RegionHandle);
@@ -257,7 +257,7 @@ namespace OpenSim.Region.Framework.Scenes
257 257
258 public string CallbackURI; 258 public string CallbackURI;
259 259
260 public OSDMap PackUpdateMessage() 260 public virtual OSDMap Pack()
261 { 261 {
262 OSDMap args = new OSDMap(); 262 OSDMap args = new OSDMap();
263 args["message_type"] = OSD.FromString("AgentData"); 263 args["message_type"] = OSD.FromString("AgentData");
@@ -346,7 +346,7 @@ namespace OpenSim.Region.Framework.Scenes
346 /// Avoiding reflection makes it painful to write, but that's the price! 346 /// Avoiding reflection makes it painful to write, but that's the price!
347 /// </summary> 347 /// </summary>
348 /// <param name="hash"></param> 348 /// <param name="hash"></param>
349 public void UnpackUpdateMessage(OSDMap args) 349 public virtual void Unpack(OSDMap args)
350 { 350 {
351 if (args.ContainsKey("region_handle")) 351 if (args.ContainsKey("region_handle"))
352 UInt64.TryParse(args["region_handle"].AsString(), out RegionHandle); 352 UInt64.TryParse(args["region_handle"].AsString(), out RegionHandle);
@@ -497,4 +497,17 @@ namespace OpenSim.Region.Framework.Scenes
497 } 497 }
498 } 498 }
499 499
500 public class CompleteAgentData : AgentData
501 {
502 public override OSDMap Pack()
503 {
504 return base.Pack();
505 }
506
507 public override void Unpack(OSDMap map)
508 {
509 base.Unpack(map);
510 }
511 }
512
500} 513}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 9bec481..a60f7d8 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2549,6 +2549,19 @@ namespace OpenSim.Region.Framework.Scenes
2549 2549
2550 } 2550 }
2551 2551
2552 public virtual bool IncomingRetrieveRootAgent(UUID id, out IAgentData agent)
2553 {
2554 agent = null;
2555 ScenePresence sp = GetScenePresence(id);
2556 if ((sp != null) && (!sp.IsChildAgent))
2557 {
2558 sp.IsChildAgent = true;
2559 return sp.CopyAgent(out agent);
2560 }
2561
2562 return false;
2563 }
2564
2552 public virtual bool IncomingReleaseAgent(UUID id) 2565 public virtual bool IncomingReleaseAgent(UUID id)
2553 { 2566 {
2554 return m_sceneGridService.ReleaseAgent(id); 2567 return m_sceneGridService.ReleaseAgent(id);
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 3ef3f6c..d6607b3 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -2879,6 +2879,13 @@ namespace OpenSim.Region.Framework.Scenes
2879 2879
2880 } 2880 }
2881 2881
2882 public bool CopyAgent(out IAgentData agent)
2883 {
2884 agent = new CompleteAgentData();
2885 CopyTo((AgentData)agent);
2886 return true;
2887 }
2888
2882 #endregion Child Agent Updates 2889 #endregion Child Agent Updates
2883 2890
2884 /// <summary> 2891 /// <summary>