Add perms check
parent
aa84ad369c
commit
347c5b3070
|
@ -49,6 +49,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
public class MovementAnimationOverrides
|
public class MovementAnimationOverrides
|
||||||
{
|
{
|
||||||
|
private static readonly ILog m_log =
|
||||||
|
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
private Dictionary<string, UUID> m_overrides = new Dictionary<string, UUID>();
|
private Dictionary<string, UUID> m_overrides = new Dictionary<string, UUID>();
|
||||||
public void SetOverride(string state, UUID animID)
|
public void SetOverride(string state, UUID animID)
|
||||||
{
|
{
|
||||||
|
@ -58,6 +61,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_log.DebugFormat("Setting override for {0} to {1}", state, animID);
|
||||||
|
|
||||||
lock (m_overrides)
|
lock (m_overrides)
|
||||||
m_overrides[state] = animID;
|
m_overrides[state] = animID;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13497,7 +13497,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_item.PermsGranter == UUID.Zero)
|
if (m_item.PermsGranter == UUID.Zero)
|
||||||
|
{
|
||||||
|
llShout(ScriptBaseClass.DEBUG_CHANNEL, "No permission to override animations");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_OVERRIDE_ANIMATIONS) == 0)
|
if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_OVERRIDE_ANIMATIONS) == 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue