diff options
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 41 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 47 |
2 files changed, 83 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 6f5372a..0fe2bdb 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -297,6 +297,41 @@ namespace OpenSim.Region.Environment.Scenes | |||
297 | set { m_allowMovement = value; } | 297 | set { m_allowMovement = value; } |
298 | } | 298 | } |
299 | 299 | ||
300 | public bool SetAlwaysRun | ||
301 | { | ||
302 | get | ||
303 | { | ||
304 | if (PhysicsActor != null) | ||
305 | { | ||
306 | return PhysicsActor.SetAlwaysRun; | ||
307 | } | ||
308 | else | ||
309 | { | ||
310 | return m_setAlwaysRun; | ||
311 | } | ||
312 | } | ||
313 | set | ||
314 | { | ||
315 | m_setAlwaysRun = value; | ||
316 | if (PhysicsActor != null) | ||
317 | { | ||
318 | PhysicsActor.SetAlwaysRun = value; | ||
319 | } | ||
320 | } | ||
321 | } | ||
322 | |||
323 | public byte State | ||
324 | { | ||
325 | get { return m_state; } | ||
326 | set { m_state = value; } | ||
327 | } | ||
328 | |||
329 | public uint AgentControlFlags | ||
330 | { | ||
331 | get { return m_AgentControlFlags; } | ||
332 | set { m_AgentControlFlags = value; } | ||
333 | } | ||
334 | |||
300 | /// <summary> | 335 | /// <summary> |
301 | /// This works out to be the ClientView object associated with this avatar, or it's client connection manager | 336 | /// This works out to be the ClientView object associated with this avatar, or it's client connection manager |
302 | /// </summary> | 337 | /// </summary> |
@@ -942,9 +977,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
942 | // In the future, these values might need to go global. | 977 | // In the future, these values might need to go global. |
943 | // Here's where you get them. | 978 | // Here's where you get them. |
944 | 979 | ||
945 | // m_AgentControlFlags = flags; | 980 | m_AgentControlFlags = flags; |
946 | // m_headrotation = agentData.AgentData.HeadRotation; | 981 | m_headrotation = agentData.HeadRotation; |
947 | // m_state = agentData.AgentData.State; | 982 | m_state = agentData.State; |
948 | 983 | ||
949 | if (m_allowMovement) | 984 | if (m_allowMovement) |
950 | { | 985 | { |
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) |