* Attached patch implements LSL llGetAgentSize() for DotNetEngine and XEngine.
* Thanks Y. Nitta!
0.6.0-stable
Justin Clarke Casey 2008-09-16 17:57:34 +00:00
parent c6dfc99f22
commit ad7df5b500
3 changed files with 25 additions and 5 deletions

View File

@ -75,8 +75,8 @@ LSL Devs
Testers Testers
* Ai Austin * Ai Austin
* Ckrinke
* CharlieO (LSL) * CharlieO (LSL)
* Ckrinke
* openlifegrid.com * openlifegrid.com

View File

@ -4691,8 +4691,18 @@ namespace OpenSim.Region.ScriptEngine.Common
public LSL_Types.Vector3 llGetAgentSize(string id) public LSL_Types.Vector3 llGetAgentSize(string id)
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
NotImplemented("llGetAgentSize"); ScenePresence avatar = World.GetScenePresence(id);
return new LSL_Types.Vector3(); 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) public LSL_Types.LSLInteger llSameGroup(string agent)

View File

@ -4536,8 +4536,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_Types.Vector3 llGetAgentSize(string id) public LSL_Types.Vector3 llGetAgentSize(string id)
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
NotImplemented("llGetAgentSize"); ScenePresence avatar = World.GetScenePresence(id);
return new LSL_Types.Vector3(); LSL_Types.Vector3 agentSize;
if (avatar == null)
{
agentSize = ScriptBaseClass.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) public LSL_Types.LSLInteger llSameGroup(string agent)