diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/ChildAgentDataUpdate.cs | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs index 0e5eaf2..b9d64b1 100644 --- a/OpenSim/Framework/ChildAgentDataUpdate.cs +++ b/OpenSim/Framework/ChildAgentDataUpdate.cs | |||
@@ -89,6 +89,8 @@ namespace OpenSim.Framework | |||
89 | public Vector3 AtAxis; | 89 | public Vector3 AtAxis; |
90 | public Vector3 LeftAxis; | 90 | public Vector3 LeftAxis; |
91 | public Vector3 UpAxis; | 91 | public Vector3 UpAxis; |
92 | //public int GodLevel; | ||
93 | public OSD GodData = new OSDMap(); | ||
92 | public bool ChangedGrid; | 94 | public bool ChangedGrid; |
93 | 95 | ||
94 | // This probably shouldn't be here | 96 | // This probably shouldn't be here |
@@ -116,6 +118,13 @@ namespace OpenSim.Framework | |||
116 | 118 | ||
117 | args["far"] = OSD.FromReal(Far); | 119 | args["far"] = OSD.FromReal(Far); |
118 | args["changed_grid"] = OSD.FromBoolean(ChangedGrid); | 120 | args["changed_grid"] = OSD.FromBoolean(ChangedGrid); |
121 | //args["god_level"] = OSD.FromString(GodLevel.ToString()); | ||
122 | args["god_data"] = GodData; | ||
123 | OSDMap g = (OSDMap)GodData; | ||
124 | // Set legacy value | ||
125 | // TODO: remove after 0.9 is superseded | ||
126 | if (g.ContainsKey("ViewerUiIsGod")) | ||
127 | args["god_level"] = g["ViewerUiIsGod"].AsBoolean() ? 200 : 0;; | ||
119 | 128 | ||
120 | if ((Throttles != null) && (Throttles.Length > 0)) | 129 | if ((Throttles != null) && (Throttles.Length > 0)) |
121 | args["throttles"] = OSD.FromBinary(Throttles); | 130 | args["throttles"] = OSD.FromBinary(Throttles); |
@@ -174,6 +183,11 @@ namespace OpenSim.Framework | |||
174 | if (args["changed_grid"] != null) | 183 | if (args["changed_grid"] != null) |
175 | ChangedGrid = args["changed_grid"].AsBoolean(); | 184 | ChangedGrid = args["changed_grid"].AsBoolean(); |
176 | 185 | ||
186 | //if (args["god_level"] != null) | ||
187 | // Int32.TryParse(args["god_level"].AsString(), out GodLevel); | ||
188 | if (args["god_data"] != null) | ||
189 | GodData = args["god_data"]; | ||
190 | |||
177 | if (args["far"] != null) | 191 | if (args["far"] != null) |
178 | Far = (float)(args["far"].AsReal()); | 192 | Far = (float)(args["far"].AsReal()); |
179 | 193 | ||
@@ -348,7 +362,8 @@ namespace OpenSim.Framework | |||
348 | public Quaternion BodyRotation; | 362 | public Quaternion BodyRotation; |
349 | public uint ControlFlags; | 363 | public uint ControlFlags; |
350 | public float EnergyLevel; | 364 | public float EnergyLevel; |
351 | public Byte GodLevel; | 365 | public OSD GodData = new OSDMap(); |
366 | //public Byte GodLevel; | ||
352 | public bool AlwaysRun; | 367 | public bool AlwaysRun; |
353 | public UUID PreyAgent; | 368 | public UUID PreyAgent; |
354 | public Byte AgentAccess; | 369 | public Byte AgentAccess; |
@@ -422,7 +437,11 @@ namespace OpenSim.Framework | |||
422 | args["control_flags"] = OSD.FromString(ControlFlags.ToString()); | 437 | args["control_flags"] = OSD.FromString(ControlFlags.ToString()); |
423 | 438 | ||
424 | args["energy_level"] = OSD.FromReal(EnergyLevel); | 439 | args["energy_level"] = OSD.FromReal(EnergyLevel); |
425 | args["god_level"] = OSD.FromString(GodLevel.ToString()); | 440 | //args["god_level"] = OSD.FromString(GodLevel.ToString()); |
441 | args["god_data"] = GodData; | ||
442 | OSDMap g = (OSDMap)GodData; | ||
443 | if (g.ContainsKey("ViewerUiIsGod")) | ||
444 | args["god_level"] = g["ViewerUiIsGod"].AsBoolean() ? 200 : 0;; | ||
426 | args["always_run"] = OSD.FromBoolean(AlwaysRun); | 445 | args["always_run"] = OSD.FromBoolean(AlwaysRun); |
427 | args["prey_agent"] = OSD.FromUUID(PreyAgent); | 446 | args["prey_agent"] = OSD.FromUUID(PreyAgent); |
428 | args["agent_access"] = OSD.FromString(AgentAccess.ToString()); | 447 | args["agent_access"] = OSD.FromString(AgentAccess.ToString()); |
@@ -600,8 +619,11 @@ namespace OpenSim.Framework | |||
600 | if (args["energy_level"] != null) | 619 | if (args["energy_level"] != null) |
601 | EnergyLevel = (float)(args["energy_level"].AsReal()); | 620 | EnergyLevel = (float)(args["energy_level"].AsReal()); |
602 | 621 | ||
603 | if (args["god_level"] != null) | 622 | //if (args["god_level"] != null) |
604 | Byte.TryParse(args["god_level"].AsString(), out GodLevel); | 623 | // Byte.TryParse(args["god_level"].AsString(), out GodLevel); |
624 | |||
625 | if (args["god_data"] != null) | ||
626 | GodData = args["god_data"]; | ||
605 | 627 | ||
606 | if (args["always_run"] != null) | 628 | if (args["always_run"] != null) |
607 | AlwaysRun = args["always_run"].AsBoolean(); | 629 | AlwaysRun = args["always_run"].AsBoolean(); |