diff options
author | Teravus Ovares | 2008-05-11 21:27:12 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-05-11 21:27:12 +0000 |
commit | a01b415d6c3fa2ee650b23b7d78432a2eac5a2a7 (patch) | |
tree | 8594200f74b76d91c2d2fc2c3f57e06e0ee565ea /OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |
parent | * Fixed null reference exception when rezzing an object from inventory with a... (diff) | |
download | opensim-SC-a01b415d6c3fa2ee650b23b7d78432a2eac5a2a7.zip opensim-SC-a01b415d6c3fa2ee650b23b7d78432a2eac5a2a7.tar.gz opensim-SC-a01b415d6c3fa2ee650b23b7d78432a2eac5a2a7.tar.bz2 opensim-SC-a01b415d6c3fa2ee650b23b7d78432a2eac5a2a7.tar.xz |
0001199: [PATCH] Add support for default animations
From Melanie... Thanks Melanie!
.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 19 |
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 | } |