diff options
author | Justin Clarke Casey | 2008-09-16 17:57:34 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-09-16 17:57:34 +0000 |
commit | ad7df5b500d36ef903b764e96e34e2ce9f397eb6 (patch) | |
tree | f7ce125bfc6eb00c50ab9ccce0b69e038d58000d /OpenSim | |
parent | * Apply http://opensimulator.org/mantis/view.php?id=2203 (diff) | |
download | opensim-SC-ad7df5b500d36ef903b764e96e34e2ce9f397eb6.zip opensim-SC-ad7df5b500d36ef903b764e96e34e2ce9f397eb6.tar.gz opensim-SC-ad7df5b500d36ef903b764e96e34e2ce9f397eb6.tar.bz2 opensim-SC-ad7df5b500d36ef903b764e96e34e2ce9f397eb6.tar.xz |
* Apply http://opensimulator.org/mantis/view.php?id=2204 (with a small tweak)
* Attached patch implements LSL llGetAgentSize() for DotNetEngine and XEngine.
* Thanks Y. Nitta!
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 14 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 14 |
2 files changed, 24 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index a74f304..74935b2 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -4691,8 +4691,18 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
4691 | public LSL_Types.Vector3 llGetAgentSize(string id) | 4691 | public LSL_Types.Vector3 llGetAgentSize(string id) |
4692 | { | 4692 | { |
4693 | m_host.AddScriptLPS(1); | 4693 | m_host.AddScriptLPS(1); |
4694 | NotImplemented("llGetAgentSize"); | 4694 | ScenePresence avatar = World.GetScenePresence(id); |
4695 | return new LSL_Types.Vector3(); | 4695 | LSL_Types.Vector3 agentSize; |
4696 | if (avatar == null) | ||
4697 | { | ||
4698 | agentSize = BuiltIn_Commands_BaseClass.ZERO_VECTOR; | ||
4699 | } | ||
4700 | else | ||
4701 | { | ||
4702 | PhysicsVector size = avatar.PhysicsActor.Size; | ||
4703 | agentSize = new LSL_Types.Vector3(size.X, size.Y, size.Z); | ||
4704 | } | ||
4705 | return agentSize; | ||
4696 | } | 4706 | } |
4697 | 4707 | ||
4698 | public LSL_Types.LSLInteger llSameGroup(string agent) | 4708 | public LSL_Types.LSLInteger llSameGroup(string agent) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 249b4dd..9864394 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4536,8 +4536,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4536 | public LSL_Types.Vector3 llGetAgentSize(string id) | 4536 | public LSL_Types.Vector3 llGetAgentSize(string id) |
4537 | { | 4537 | { |
4538 | m_host.AddScriptLPS(1); | 4538 | m_host.AddScriptLPS(1); |
4539 | NotImplemented("llGetAgentSize"); | 4539 | ScenePresence avatar = World.GetScenePresence(id); |
4540 | return new LSL_Types.Vector3(); | 4540 | LSL_Types.Vector3 agentSize; |
4541 | if (avatar == null) | ||
4542 | { | ||
4543 | agentSize = ScriptBaseClass.ZERO_VECTOR; | ||
4544 | } | ||
4545 | else | ||
4546 | { | ||
4547 | PhysicsVector size = avatar.PhysicsActor.Size; | ||
4548 | agentSize = new LSL_Types.Vector3(size.X, size.Y, size.Z); | ||
4549 | } | ||
4550 | return agentSize; | ||
4541 | } | 4551 | } |
4542 | 4552 | ||
4543 | public LSL_Types.LSLInteger llSameGroup(string agent) | 4553 | public LSL_Types.LSLInteger llSameGroup(string agent) |