Plumb llSetAnimationOverride
parent
cf1d58d164
commit
f2390f7c72
|
@ -6004,5 +6004,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
Animator.SendAnimPackToClient(p.ControllingClient);
|
Animator.SendAnimPackToClient(p.ControllingClient);
|
||||||
SendAttachmentsToAgentNF(p);
|
SendAttachmentsToAgentNF(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetAnimationOverride(string animState, UUID animID)
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13475,6 +13475,49 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
m_UrlModule.HttpContentType(new UUID(id),type);
|
m_UrlModule.HttpContentType(new UUID(id),type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void llSetAnimationOverride(LSL_String animState, LSL_String anim)
|
||||||
|
{
|
||||||
|
string state = String.Empty;
|
||||||
|
|
||||||
|
foreach (KeyValuePair<string, string> kvp in MovementAnimationsForLSL)
|
||||||
|
{
|
||||||
|
if (kvp.Value == animState)
|
||||||
|
{
|
||||||
|
state = kvp.Key;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (state == String.Empty)
|
||||||
|
{
|
||||||
|
llShout(ScriptBaseClass.DEBUG_CHANNEL, "Invalid animation state " + animState);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_item.PermsGranter == UUID.Zero)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_OVERRIDE_ANIMATIONS) == 0)
|
||||||
|
{
|
||||||
|
llShout(ScriptBaseClass.DEBUG_CHANNEL, "No permission to override animations");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ScenePresence presence = World.GetScenePresence(m_item.PermsGranter);
|
||||||
|
|
||||||
|
if (presence == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
UUID animID = ScriptUtils.GetAssetIdFromItemName(m_host, anim, (int)AssetType.Animation);
|
||||||
|
if (animID == UUID.Zero)
|
||||||
|
{
|
||||||
|
llShout(ScriptBaseClass.DEBUG_CHANNEL, "Animation not found");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
presence.SetAnimationOverride(state, animID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class NotecardCache
|
public class NotecardCache
|
||||||
|
|
|
@ -434,5 +434,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||||
void llSetKeyframedMotion(LSL_List frames, LSL_List options);
|
void llSetKeyframedMotion(LSL_List frames, LSL_List options);
|
||||||
LSL_List GetPrimitiveParamsEx(LSL_Key prim, LSL_List rules);
|
LSL_List GetPrimitiveParamsEx(LSL_Key prim, LSL_List rules);
|
||||||
LSL_List llGetPhysicsMaterial();
|
LSL_List llGetPhysicsMaterial();
|
||||||
|
void llSetAnimationOverride(LSL_String animState, LSL_String anim);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,6 +81,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
public const int PERMISSION_TRACK_CAMERA = 1024;
|
public const int PERMISSION_TRACK_CAMERA = 1024;
|
||||||
public const int PERMISSION_CONTROL_CAMERA = 2048;
|
public const int PERMISSION_CONTROL_CAMERA = 2048;
|
||||||
public const int PERMISSION_TELEPORT = 4096;
|
public const int PERMISSION_TELEPORT = 4096;
|
||||||
|
public const int PERMISSION_OVERRIDE_ANIMATIONS = 0x8000;
|
||||||
|
|
||||||
public const int AGENT_FLYING = 1;
|
public const int AGENT_FLYING = 1;
|
||||||
public const int AGENT_ATTACHMENTS = 2;
|
public const int AGENT_ATTACHMENTS = 2;
|
||||||
|
|
|
@ -2014,5 +2014,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
{
|
{
|
||||||
return m_LSL_Functions.llGetPhysicsMaterial();
|
return m_LSL_Functions.llGetPhysicsMaterial();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void llSetAnimationOverride(LSL_String animState, LSL_String anim)
|
||||||
|
{
|
||||||
|
m_LSL_Functions.llSetAnimationOverride(animState, anim);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue