diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 21 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 2 |
2 files changed, 11 insertions, 12 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 87298e3..7009548 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2094,7 +2094,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2094 | if (m_host.ParentID == 0) | 2094 | if (m_host.ParentID == 0) |
2095 | { | 2095 | { |
2096 | // special case: If we are root, rotate complete SOG to new rotation | 2096 | // special case: If we are root, rotate complete SOG to new rotation |
2097 | SetRot(m_host, Rot2Quaternion(rot)); | 2097 | SetRot(m_host, rot); |
2098 | } | 2098 | } |
2099 | else | 2099 | else |
2100 | { | 2100 | { |
@@ -2102,7 +2102,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2102 | SceneObjectPart rootPart = m_host.ParentGroup.RootPart; | 2102 | SceneObjectPart rootPart = m_host.ParentGroup.RootPart; |
2103 | if (rootPart != null) // better safe than sorry | 2103 | if (rootPart != null) // better safe than sorry |
2104 | { | 2104 | { |
2105 | SetRot(m_host, rootPart.RotationOffset * Rot2Quaternion(rot)); | 2105 | SetRot(m_host, rootPart.RotationOffset * (Quaternion)rot); |
2106 | } | 2106 | } |
2107 | } | 2107 | } |
2108 | 2108 | ||
@@ -2112,7 +2112,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2112 | public void llSetLocalRot(LSL_Rotation rot) | 2112 | public void llSetLocalRot(LSL_Rotation rot) |
2113 | { | 2113 | { |
2114 | m_host.AddScriptLPS(1); | 2114 | m_host.AddScriptLPS(1); |
2115 | SetRot(m_host, Rot2Quaternion(rot)); | 2115 | SetRot(m_host, rot); |
2116 | ScriptSleep(200); | 2116 | ScriptSleep(200); |
2117 | } | 2117 | } |
2118 | 2118 | ||
@@ -2828,7 +2828,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2828 | // need the magnitude later | 2828 | // need the magnitude later |
2829 | // float velmag = (float)Util.GetMagnitude(llvel); | 2829 | // float velmag = (float)Util.GetMagnitude(llvel); |
2830 | 2830 | ||
2831 | SceneObjectGroup new_group = World.RezObject(m_host, item, pos, Rot2Quaternion(rot), vel, param); | 2831 | SceneObjectGroup new_group = World.RezObject(m_host, item, pos, rot, vel, param); |
2832 | 2832 | ||
2833 | // If either of these are null, then there was an unknown error. | 2833 | // If either of these are null, then there was an unknown error. |
2834 | if (new_group == null) | 2834 | if (new_group == null) |
@@ -2897,7 +2897,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2897 | } | 2897 | } |
2898 | else | 2898 | else |
2899 | { | 2899 | { |
2900 | m_host.StartLookAt(Rot2Quaternion(rot), (float)strength, (float)damping); | 2900 | m_host.StartLookAt(rot, (float)strength, (float)damping); |
2901 | } | 2901 | } |
2902 | } | 2902 | } |
2903 | 2903 | ||
@@ -3292,7 +3292,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3292 | } | 3292 | } |
3293 | else | 3293 | else |
3294 | { | 3294 | { |
3295 | m_host.RotLookAt(Rot2Quaternion(target), (float)strength, (float)damping); | 3295 | m_host.RotLookAt(target, (float)strength, (float)damping); |
3296 | } | 3296 | } |
3297 | } | 3297 | } |
3298 | 3298 | ||
@@ -6506,7 +6506,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6506 | 6506 | ||
6507 | if (!m_host.ParentGroup.IsDeleted) | 6507 | if (!m_host.ParentGroup.IsDeleted) |
6508 | { | 6508 | { |
6509 | m_host.ParentGroup.RootPart.SetVehicleRotationParam(param, Rot2Quaternion(rot)); | 6509 | m_host.ParentGroup.RootPart.SetVehicleRotationParam(param, rot); |
6510 | } | 6510 | } |
6511 | } | 6511 | } |
6512 | 6512 | ||
@@ -7316,13 +7316,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7316 | if (part.ParentID == 0) | 7316 | if (part.ParentID == 0) |
7317 | { | 7317 | { |
7318 | // special case: If we are root, rotate complete SOG to new rotation | 7318 | // special case: If we are root, rotate complete SOG to new rotation |
7319 | SetRot(part, Rot2Quaternion(q)); | 7319 | SetRot(part, q); |
7320 | } | 7320 | } |
7321 | else | 7321 | else |
7322 | { | 7322 | { |
7323 | // we are a child. The rotation values will be set to the one of root modified by rot, as in SL. Don't ask. | 7323 | // we are a child. The rotation values will be set to the one of root modified by rot, as in SL. Don't ask. |
7324 | SceneObjectPart rootPart = part.ParentGroup.RootPart; | 7324 | SceneObjectPart rootPart = part.ParentGroup.RootPart; |
7325 | SetRot(part, rootPart.RotationOffset * Rot2Quaternion(q)); | 7325 | SetRot(part, rootPart.RotationOffset * (Quaternion)q); |
7326 | } | 7326 | } |
7327 | 7327 | ||
7328 | break; | 7328 | break; |
@@ -7634,8 +7634,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7634 | case (int)ScriptBaseClass.PRIM_ROT_LOCAL: | 7634 | case (int)ScriptBaseClass.PRIM_ROT_LOCAL: |
7635 | if (remain < 1) | 7635 | if (remain < 1) |
7636 | return null; | 7636 | return null; |
7637 | LSL_Rotation lr = rules.GetQuaternionItem(idx++); | 7637 | SetRot(part, rules.GetQuaternionItem(idx++)); |
7638 | SetRot(part, Rot2Quaternion(lr)); | ||
7639 | break; | 7638 | break; |
7640 | case (int)ScriptBaseClass.PRIM_OMEGA: | 7639 | case (int)ScriptBaseClass.PRIM_OMEGA: |
7641 | if (remain < 3) | 7640 | if (remain < 3) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index eff1598..8936cb2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -2533,7 +2533,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2533 | ScenePresence sp = World.GetScenePresence(npcId); | 2533 | ScenePresence sp = World.GetScenePresence(npcId); |
2534 | 2534 | ||
2535 | if (sp != null) | 2535 | if (sp != null) |
2536 | sp.Rotation = LSL_Api.Rot2Quaternion(rotation); | 2536 | sp.Rotation = rotation; |
2537 | } | 2537 | } |
2538 | } | 2538 | } |
2539 | 2539 | ||