From a01b415d6c3fa2ee650b23b7d78432a2eac5a2a7 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 11 May 2008 21:27:12 +0000 Subject: 0001199: [PATCH] Add support for default animations From Melanie... Thanks Melanie! . --- .../ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 87c0450..bac8f2a 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -2136,15 +2136,15 @@ namespace OpenSim.Region.ScriptEngine.Common if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION) != 0) { - // Do NOT try to parse LLUUID, animations cannot be triggered by ID - LLUUID animID=InventoryKey(anim, (int)AssetType.Animation); - if (animID == LLUUID.Zero) - return; - if (World.m_innerScene.ScenePresences.ContainsKey(m_host.TaskInventory[invItemID].PermsGranter)) { ScenePresence presence = World.m_innerScene.ScenePresences[m_host.TaskInventory[invItemID].PermsGranter]; - presence.AddAnimation(animID); + // Do NOT try to parse LLUUID, animations cannot be triggered by ID + LLUUID animID=InventoryKey(anim, (int)AssetType.Animation); + if (animID == LLUUID.Zero) + presence.AddAnimation(anim); + else + presence.AddAnimation(animID); } } } @@ -2170,12 +2170,15 @@ namespace OpenSim.Region.ScriptEngine.Common } if (animID == LLUUID.Zero) - return; + return; if (World.m_innerScene.ScenePresences.ContainsKey(m_host.TaskInventory[invItemID].PermsGranter)) { ScenePresence presence = World.m_innerScene.ScenePresences[m_host.TaskInventory[invItemID].PermsGranter]; - presence.RemoveAnimation(animID); + if (animID == LLUUID.Zero) + presence.RemoveAnimation(anim); + else + presence.RemoveAnimation(animID); } } } -- cgit v1.1