aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs47
1 files changed, 45 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 826324f..7d3badb 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4455,8 +4455,51 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4455 public LSL_Integer llGetAgentInfo(string id) 4455 public LSL_Integer llGetAgentInfo(string id)
4456 { 4456 {
4457 m_host.AddScriptLPS(1); 4457 m_host.AddScriptLPS(1);
4458 NotImplemented("llGetAgentInfo"); 4458
4459 return 0; 4459 // This is partial implementation.
4460
4461 UUID key = new UUID();
4462 if (!UUID.TryParse(id, out key))
4463 {
4464 return 0;
4465 }
4466
4467 int flags = 0;
4468
4469 ScenePresence agent = World.GetScenePresence(key);
4470 if (agent == null)
4471 {
4472 return 0;
4473 }
4474
4475 if (agent.SetAlwaysRun)
4476 {
4477 flags |= ScriptBaseClass.AGENT_ALWAYS_RUN;
4478 }
4479
4480 if ((agent.AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_FLY) != 0)
4481 {
4482 flags |= ScriptBaseClass.AGENT_FLYING;
4483 }
4484
4485 if ((agent.AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_AWAY) != 0)
4486 {
4487 flags |= ScriptBaseClass.AGENT_AWAY;
4488 }
4489
4490 if ((agent.AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0)
4491 {
4492 flags |= ScriptBaseClass.AGENT_MOUSELOOK;
4493 }
4494
4495 if ((agent.State & (byte)AgentManager.AgentState.Typing) != (byte)0)
4496 {
4497 flags |= ScriptBaseClass.AGENT_TYPING;
4498 }
4499
4500 //NotImplemented("llGetAgentInfo");
4501
4502 return flags;
4460 } 4503 }
4461 4504
4462 public LSL_String llGetAgentLanguage(string id) 4505 public LSL_String llGetAgentLanguage(string id)