diff options
author | Justin Clark-Casey (justincc) | 2012-04-27 19:40:19 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-04-27 19:40:19 +0100 |
commit | e39e4f6bfb9d28317c2547094f5fe79969f4ede9 (patch) | |
tree | 1b9bed69eac966ea2d4e7e017693be5449abdcb2 /OpenSim/Region/ScriptEngine/Shared | |
parent | Fixing wrong position of llSensor, SensePoint wasnt following the rotation of... (diff) | |
download | opensim-SC_OLD-e39e4f6bfb9d28317c2547094f5fe79969f4ede9.zip opensim-SC_OLD-e39e4f6bfb9d28317c2547094f5fe79969f4ede9.tar.gz opensim-SC_OLD-e39e4f6bfb9d28317c2547094f5fe79969f4ede9.tar.bz2 opensim-SC_OLD-e39e4f6bfb9d28317c2547094f5fe79969f4ede9.tar.xz |
minor: style adjustments in SensorRepeat, mainly related to patch from stoehr
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index 57f741c..3844753 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -222,7 +222,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
222 | // Is the sensor type is AGENT and not SCRIPTED then include agents | 222 | // Is the sensor type is AGENT and not SCRIPTED then include agents |
223 | if ((ts.type & (AGENT | AGENT_BY_USERNAME | NPC)) != 0 && (ts.type & SCRIPTED) == 0) | 223 | if ((ts.type & (AGENT | AGENT_BY_USERNAME | NPC)) != 0 && (ts.type & SCRIPTED) == 0) |
224 | { | 224 | { |
225 | sensedEntities.AddRange(doAgentSensor(ts)); | 225 | sensedEntities.AddRange(doAgentSensor(ts)); |
226 | } | 226 | } |
227 | 227 | ||
228 | // If SCRIPTED or PASSIVE or ACTIVE check objects | 228 | // If SCRIPTED or PASSIVE or ACTIVE check objects |
@@ -333,8 +333,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
333 | // Position of a sensor in a child prim attached to an avatar | 333 | // Position of a sensor in a child prim attached to an avatar |
334 | // will be still wrong. | 334 | // will be still wrong. |
335 | ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar); | 335 | ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar); |
336 | q = avatar.Rotation*q; | 336 | q = avatar.Rotation * q; |
337 | } | 337 | } |
338 | |||
338 | LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); | 339 | LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); |
339 | LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r); | 340 | LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r); |
340 | double mag_fwd = LSL_Types.Vector3.Mag(forward_dir); | 341 | double mag_fwd = LSL_Types.Vector3.Mag(forward_dir); |
@@ -462,7 +463,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
462 | // Position of a sensor in a child prim attached to an avatar | 463 | // Position of a sensor in a child prim attached to an avatar |
463 | // will be still wrong. | 464 | // will be still wrong. |
464 | ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar); | 465 | ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar); |
465 | q = avatar.Rotation*q; | 466 | q = avatar.Rotation * q; |
466 | } | 467 | } |
467 | 468 | ||
468 | LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); | 469 | LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); |