diff options
author | John Hurliman | 2010-04-22 18:56:06 -0700 |
---|---|---|
committer | John Hurliman | 2010-04-22 18:56:06 -0700 |
commit | 8692ac53f56c8db9942021709e7415b2b2add0c6 (patch) | |
tree | 5681611d23f8f89b38d2c19ef032d412fd3fe3d2 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation | |
parent | * Better error logging for failed SimianGrid web service calls (diff) | |
parent | Insert a ROLLBACK command on migration step failure. This ensures that (diff) | |
download | opensim-SC-8692ac53f56c8db9942021709e7415b2b2add0c6.zip opensim-SC-8692ac53f56c8db9942021709e7415b2b2add0c6.tar.gz opensim-SC-8692ac53f56c8db9942021709e7415b2b2add0c6.tar.bz2 opensim-SC-8692ac53f56c8db9942021709e7415b2b2add0c6.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | 9 |
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); |