mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 22:05:36 +08:00
* 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!
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -4536,8 +4536,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
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 = 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)
|
||||
|
||||
Reference in New Issue
Block a user