From ad7df5b500d36ef903b764e96e34e2ce9f397eb6 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 16 Sep 2008 17:57:34 +0000 Subject: * 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! --- OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Common') 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 public LSL_Types.Vector3 llGetAgentSize(string id) { m_host.AddScriptLPS(1); - NotImplemented("llGetAgentSize"); - return new LSL_Types.Vector3(); + ScenePresence avatar = World.GetScenePresence(id); + LSL_Types.Vector3 agentSize; + if (avatar == null) + { + agentSize = BuiltIn_Commands_BaseClass.ZERO_VECTOR; + } + else + { + PhysicsVector size = avatar.PhysicsActor.Size; + agentSize = new LSL_Types.Vector3(size.X, size.Y, size.Z); + } + return agentSize; } public LSL_Types.LSLInteger llSameGroup(string agent) -- cgit v1.1