aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorMelanie2010-04-21 19:51:17 +0100
committerMelanie2010-04-21 19:51:17 +0100
commitaf778f09d568ec3c95f6815450f6ab2c073bd830 (patch)
tree60371db96c16836984e44a15791cdf5f005e03ef /OpenSim/Region/ScriptEngine
parentAvoid duplicate script resumes. Move resume calls to more logical places (diff)
parentMake the detection cone in attachments face in the direction of the avatar, (diff)
downloadopensim-SC_OLD-af778f09d568ec3c95f6815450f6ab2c073bd830.zip
opensim-SC_OLD-af778f09d568ec3c95f6815450f6ab2c073bd830.tar.gz
opensim-SC_OLD-af778f09d568ec3c95f6815450f6ab2c073bd830.tar.bz2
opensim-SC_OLD-af778f09d568ec3c95f6815450f6ab2c073bd830.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
index 2296379..4d7ead6 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
@@ -302,6 +302,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
302 float dz; 302 float dz;
303 303
304 Quaternion q = SensePoint.RotationOffset; 304 Quaternion q = SensePoint.RotationOffset;
305 if (SensePoint.ParentGroup.RootPart.IsAttachment)
306 {
307 // In attachments, the sensor cone always orients with the
308 // avatar rotation. This may include a nonzero elevation if
309 // in mouselook.
310
311 ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.RootPart.AttachedAvatar);
312 q = avatar.Rotation;
313 }
305 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);
306 LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r); 315 LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r);
307 double mag_fwd = LSL_Types.Vector3.Mag(forward_dir); 316 double mag_fwd = LSL_Types.Vector3.Mag(forward_dir);