mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
* Fix/implement LSL group-related functions llDetectedGroup, llSameGroup * Thanks nlin
This commit is contained in:
@@ -4553,8 +4553,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
public LSL_Types.LSLInteger llSameGroup(string agent)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
NotImplemented("llSameGroup");
|
||||
return 0;
|
||||
UUID agentId = new UUID();
|
||||
if (!UUID.TryParse(agent, out agentId))
|
||||
return new LSL_Types.LSLInteger(0);
|
||||
ScenePresence presence = World.GetScenePresence(agentId);
|
||||
if (presence == null)
|
||||
return new LSL_Types.LSLInteger(0);
|
||||
IClientAPI client = presence.ControllingClient;
|
||||
if (m_host.GroupID == client.ActiveGroupId)
|
||||
return new LSL_Types.LSLInteger(1);
|
||||
else
|
||||
return new LSL_Types.LSLInteger(0);
|
||||
}
|
||||
|
||||
public void llUnSit(string id)
|
||||
|
||||
Reference in New Issue
Block a user