mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 14:16:07 +08:00
Implement STATUS_BLOCK_GRAB_OBJECT in llSetStatus()/llGetStatus() and correct effect of STATUS_BLOCK_GRAB
As per http://wiki.secondlife.com/wiki/LlSetStatus Setting STATUS_BLOCK_GRAB_OBJECT prevents or allows move of a physical linkset by grab on any prim. Setting STATUS_BLOCK_GRAB prevents or allows move of a physical linkset by grab on a particular prim. Previously, setting STATUS_BLOCK_GRAB would prevent drag via all prims of the linkset.
This commit is contained in:
@@ -1377,12 +1377,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
|
||||
if ((status & ScriptBaseClass.STATUS_BLOCK_GRAB) == ScriptBaseClass.STATUS_BLOCK_GRAB)
|
||||
{
|
||||
if (value != 0)
|
||||
m_host.SetBlockGrab(true);
|
||||
else
|
||||
m_host.SetBlockGrab(false);
|
||||
}
|
||||
m_host.BlockGrab = value != 0;
|
||||
|
||||
if ((status & ScriptBaseClass.STATUS_BLOCK_GRAB_OBJECT) == ScriptBaseClass.STATUS_BLOCK_GRAB_OBJECT)
|
||||
m_host.ParentGroup.BlockGrabOverride = value != 0;
|
||||
|
||||
if ((status & ScriptBaseClass.STATUS_DIE_AT_EDGE) == ScriptBaseClass.STATUS_DIE_AT_EDGE)
|
||||
{
|
||||
@@ -1443,10 +1441,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
return 0;
|
||||
|
||||
case ScriptBaseClass.STATUS_BLOCK_GRAB:
|
||||
if (m_host.GetBlockGrab())
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
return m_host.BlockGrab ? 1 : 0;
|
||||
|
||||
case ScriptBaseClass.STATUS_BLOCK_GRAB_OBJECT:
|
||||
return m_host.ParentGroup.BlockGrabOverride ? 1 : 0;
|
||||
|
||||
case ScriptBaseClass.STATUS_DIE_AT_EDGE:
|
||||
if (m_host.GetDieAtEdge())
|
||||
|
||||
@@ -48,6 +48,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
public const int STATUS_DIE_AT_EDGE = 128;
|
||||
public const int STATUS_RETURN_AT_EDGE = 256;
|
||||
public const int STATUS_CAST_SHADOWS = 512;
|
||||
public const int STATUS_BLOCK_GRAB_OBJECT = 1024;
|
||||
|
||||
public const int AGENT = 1;
|
||||
public const int AGENT_BY_LEGACY_NAME = 1;
|
||||
|
||||
Reference in New Issue
Block a user