aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs19
1 files changed, 11 insertions, 8 deletions
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
2136 2136
2137 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION) != 0) 2137 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION) != 0)
2138 { 2138 {
2139 // Do NOT try to parse LLUUID, animations cannot be triggered by ID
2140 LLUUID animID=InventoryKey(anim, (int)AssetType.Animation);
2141 if (animID == LLUUID.Zero)
2142 return;
2143
2144 if (World.m_innerScene.ScenePresences.ContainsKey(m_host.TaskInventory[invItemID].PermsGranter)) 2139 if (World.m_innerScene.ScenePresences.ContainsKey(m_host.TaskInventory[invItemID].PermsGranter))
2145 { 2140 {
2146 ScenePresence presence = World.m_innerScene.ScenePresences[m_host.TaskInventory[invItemID].PermsGranter]; 2141 ScenePresence presence = World.m_innerScene.ScenePresences[m_host.TaskInventory[invItemID].PermsGranter];
2147 presence.AddAnimation(animID); 2142 // Do NOT try to parse LLUUID, animations cannot be triggered by ID
2143 LLUUID animID=InventoryKey(anim, (int)AssetType.Animation);
2144 if (animID == LLUUID.Zero)
2145 presence.AddAnimation(anim);
2146 else
2147 presence.AddAnimation(animID);
2148 } 2148 }
2149 } 2149 }
2150 } 2150 }
@@ -2170,12 +2170,15 @@ namespace OpenSim.Region.ScriptEngine.Common
2170 } 2170 }
2171 2171
2172 if (animID == LLUUID.Zero) 2172 if (animID == LLUUID.Zero)
2173 return; 2173 return;
2174 2174
2175 if (World.m_innerScene.ScenePresences.ContainsKey(m_host.TaskInventory[invItemID].PermsGranter)) 2175 if (World.m_innerScene.ScenePresences.ContainsKey(m_host.TaskInventory[invItemID].PermsGranter))
2176 { 2176 {
2177 ScenePresence presence = World.m_innerScene.ScenePresences[m_host.TaskInventory[invItemID].PermsGranter]; 2177 ScenePresence presence = World.m_innerScene.ScenePresences[m_host.TaskInventory[invItemID].PermsGranter];
2178 presence.RemoveAnimation(animID); 2178 if (animID == LLUUID.Zero)
2179 presence.RemoveAnimation(anim);
2180 else
2181 presence.RemoveAnimation(animID);
2179 } 2182 }
2180 } 2183 }
2181 } 2184 }