diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 5905958..e0b24dc 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2498,12 +2498,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2498 | { | 2498 | { |
2499 | m_host.AddScriptLPS(1); | 2499 | m_host.AddScriptLPS(1); |
2500 | 2500 | ||
2501 | Vector3 vel; | 2501 | Vector3 vel = Vector3.Zero; |
2502 | 2502 | ||
2503 | if (m_host.ParentGroup.IsAttachment) | 2503 | if (m_host.ParentGroup.IsAttachment) |
2504 | { | 2504 | { |
2505 | ScenePresence avatar = m_host.ParentGroup.Scene.GetScenePresence(m_host.ParentGroup.AttachedAvatar); | 2505 | ScenePresence avatar = m_host.ParentGroup.Scene.GetScenePresence(m_host.ParentGroup.AttachedAvatar); |
2506 | vel = avatar.Velocity; | 2506 | if (avatar != null) |
2507 | vel = avatar.Velocity; | ||
2507 | } | 2508 | } |
2508 | else | 2509 | else |
2509 | { | 2510 | { |
@@ -10401,7 +10402,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10401 | ShoutError("No permissions to track the camera"); | 10402 | ShoutError("No permissions to track the camera"); |
10402 | return new LSL_Vector(); | 10403 | return new LSL_Vector(); |
10403 | } | 10404 | } |
10404 | m_host.TaskInventory.LockItemsForRead(false); | ||
10405 | 10405 | ||
10406 | // ScenePresence presence = World.GetScenePresence(m_host.OwnerID); | 10406 | // ScenePresence presence = World.GetScenePresence(m_host.OwnerID); |
10407 | ScenePresence presence = World.GetScenePresence(m_item.PermsGranter); | 10407 | ScenePresence presence = World.GetScenePresence(m_item.PermsGranter); |
@@ -10425,7 +10425,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10425 | ShoutError("No permissions to track the camera"); | 10425 | ShoutError("No permissions to track the camera"); |
10426 | return new LSL_Rotation(); | 10426 | return new LSL_Rotation(); |
10427 | } | 10427 | } |
10428 | m_host.TaskInventory.LockItemsForRead(false); | ||
10429 | 10428 | ||
10430 | // ScenePresence presence = World.GetScenePresence(m_host.OwnerID); | 10429 | // ScenePresence presence = World.GetScenePresence(m_host.OwnerID); |
10431 | ScenePresence presence = World.GetScenePresence(m_item.PermsGranter); | 10430 | ScenePresence presence = World.GetScenePresence(m_item.PermsGranter); |