diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 7888a63..536bdd2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -496,10 +496,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
496 | { | 496 | { |
497 | CheckThreatLevel(ThreatLevel.VeryHigh, "osAvatarPlayAnimation"); | 497 | CheckThreatLevel(ThreatLevel.VeryHigh, "osAvatarPlayAnimation"); |
498 | 498 | ||
499 | UUID avatarID = (UUID)avatar; | ||
500 | |||
499 | m_host.AddScriptLPS(1); | 501 | m_host.AddScriptLPS(1); |
500 | if (World.Entities.ContainsKey(avatar) && World.Entities[avatar] is ScenePresence) | 502 | if (World.Entities.ContainsKey((UUID)avatar) && World.Entities[avatarID] is ScenePresence) |
501 | { | 503 | { |
502 | ScenePresence target = (ScenePresence)World.Entities[avatar]; | 504 | ScenePresence target = (ScenePresence)World.Entities[avatarID]; |
503 | target.AddAnimation(animation); | 505 | target.AddAnimation(animation); |
504 | } | 506 | } |
505 | } | 507 | } |
@@ -508,10 +510,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
508 | { | 510 | { |
509 | CheckThreatLevel(ThreatLevel.VeryHigh, "osAvatarStopAnimation"); | 511 | CheckThreatLevel(ThreatLevel.VeryHigh, "osAvatarStopAnimation"); |
510 | 512 | ||
513 | UUID avatarID = (UUID)avatar; | ||
514 | |||
511 | m_host.AddScriptLPS(1); | 515 | m_host.AddScriptLPS(1); |
512 | if (World.Entities.ContainsKey(avatar) && World.Entities[avatar] is ScenePresence) | 516 | if (World.Entities.ContainsKey(avatarID) && World.Entities[avatarID] is ScenePresence) |
513 | { | 517 | { |
514 | ScenePresence target = (ScenePresence)World.Entities[avatar]; | 518 | ScenePresence target = (ScenePresence)World.Entities[avatarID]; |
515 | target.RemoveAnimation(animation); | 519 | target.RemoveAnimation(animation); |
516 | } | 520 | } |
517 | } | 521 | } |