aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs2
3 files changed, 7 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index a690e3b..81f1f38 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2099,7 +2099,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2099 { 2099 {
2100 if (part.ParentGroup.RootPart.AttachmentPoint != 0) 2100 if (part.ParentGroup.RootPart.AttachmentPoint != 0)
2101 { 2101 {
2102 ScenePresence avatar = World.GetScenePresence(part.AttachedAvatar); 2102 ScenePresence avatar = World.GetScenePresence(part.ParentGroup.AttachedAvatar);
2103 if (avatar != null) 2103 if (avatar != null)
2104 { 2104 {
2105 if ((avatar.AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0) 2105 if ((avatar.AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0)
@@ -2243,7 +2243,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2243 2243
2244 if (m_host.IsAttachment) 2244 if (m_host.IsAttachment)
2245 { 2245 {
2246 ScenePresence avatar = m_host.ParentGroup.Scene.GetScenePresence(m_host.AttachedAvatar); 2246 ScenePresence avatar = m_host.ParentGroup.Scene.GetScenePresence(m_host.ParentGroup.AttachedAvatar);
2247 vel = avatar.Velocity; 2247 vel = avatar.Velocity;
2248 } 2248 }
2249 else 2249 else
@@ -3388,7 +3388,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3388 3388
3389 m_host.AddScriptLPS(1); 3389 m_host.AddScriptLPS(1);
3390 3390
3391 if (m_host.ParentGroup.IsAttachment && (UUID)agent == m_host.ParentGroup.RootPart.AttachedAvatar) 3391 if (m_host.ParentGroup.IsAttachment && (UUID)agent == m_host.ParentGroup.AttachedAvatar)
3392 { 3392 {
3393 // When attached, certain permissions are implicit if requested from owner 3393 // When attached, certain permissions are implicit if requested from owner
3394 int implicitPerms = ScriptBaseClass.PERMISSION_TAKE_CONTROLS | 3394 int implicitPerms = ScriptBaseClass.PERMISSION_TAKE_CONTROLS |
@@ -7460,7 +7460,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7460 Quaternion q; 7460 Quaternion q;
7461 if (m_host.ParentGroup.RootPart.AttachmentPoint != 0) 7461 if (m_host.ParentGroup.RootPart.AttachmentPoint != 0)
7462 { 7462 {
7463 ScenePresence avatar = World.GetScenePresence(m_host.AttachedAvatar); 7463 ScenePresence avatar = World.GetScenePresence(m_host.ParentGroup.AttachedAvatar);
7464 if (avatar != null) 7464 if (avatar != null)
7465 if ((avatar.AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0) 7465 if ((avatar.AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0)
7466 q = avatar.CameraRotation; // Mouselook 7466 q = avatar.CameraRotation; // Mouselook
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
index e53a61a..bf74760 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
@@ -308,7 +308,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
308 // In attachments, the sensor cone always orients with the 308 // In attachments, the sensor cone always orients with the
309 // avatar rotation. This may include a nonzero elevation if 309 // avatar rotation. This may include a nonzero elevation if
310 // in mouselook. 310 // in mouselook.
311 ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.RootPart.AttachedAvatar); 311 ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar);
312 q = avatar.Rotation; 312 q = avatar.Rotation;
313 } 313 }
314 LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); 314 LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W);
@@ -428,7 +428,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
428 // In attachments, the sensor cone always orients with the 428 // In attachments, the sensor cone always orients with the
429 // avatar rotation. This may include a nonzero elevation if 429 // avatar rotation. This may include a nonzero elevation if
430 // in mouselook. 430 // in mouselook.
431 ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.RootPart.AttachedAvatar); 431 ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar);
432 q = avatar.Rotation; 432 q = avatar.Rotation;
433 } 433 }
434 434
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 783791f..ef9b2ac 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -233,7 +233,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
233 m_MaxScriptQueue = maxScriptQueue; 233 m_MaxScriptQueue = maxScriptQueue;
234 m_stateSource = stateSource; 234 m_stateSource = stateSource;
235 m_postOnRez = postOnRez; 235 m_postOnRez = postOnRez;
236 m_AttachedAvatar = part.AttachedAvatar; 236 m_AttachedAvatar = part.ParentGroup.AttachedAvatar;
237 m_RegionID = part.ParentGroup.Scene.RegionInfo.RegionID; 237 m_RegionID = part.ParentGroup.Scene.RegionInfo.RegionID;
238 238
239 if (part != null) 239 if (part != null)