aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
diff options
context:
space:
mode:
authorUbitUmarov2012-06-12 08:05:40 +0100
committerUbitUmarov2012-06-12 08:05:40 +0100
commitf51ef99bd5f9cc1834ec402ca68bc70e4570bc76 (patch)
tree24a3624c368a0688e35f679fb3281a0738a0824b /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
parentfix the try.. finally in SetPrimitiveParams i did mess and add one for the av... (diff)
downloadopensim-SC-f51ef99bd5f9cc1834ec402ca68bc70e4570bc76.zip
opensim-SC-f51ef99bd5f9cc1834ec402ca68bc70e4570bc76.tar.gz
opensim-SC-f51ef99bd5f9cc1834ec402ca68bc70e4570bc76.tar.bz2
opensim-SC-f51ef99bd5f9cc1834ec402ca68bc70e4570bc76.tar.xz
try to replicate SL bug of PRIM_ROTATION also for avas, est a fix to other cases
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs13
1 files changed, 10 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index ec4f62f..31ce2c4 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -7983,9 +7983,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7983 LSL_Rotation r = rules.GetQuaternionItem(idx++); 7983 LSL_Rotation r = rules.GetQuaternionItem(idx++);
7984 Quaternion rot = new Quaternion((float)r.x, (float)r.y, (float)r.z, (float)r.s); // requested world rotation 7984 Quaternion rot = new Quaternion((float)r.x, (float)r.y, (float)r.z, (float)r.s); // requested world rotation
7985 7985
7986 Quaternion srot = sitpart.GetWorldRotation(); 7986// need to replicate SL bug
7987 rot *= Quaternion.Conjugate(srot); // removed sit part world rotation
7988 7987
7988 SceneObjectGroup sitgrp = sitpart.ParentGroup;
7989 if (sitgrp != null && sitgrp.RootPart != sitpart)
7990 {
7991 rot *= sitgrp.RootPart.RotationOffset;
7992 }
7993
7994 Quaternion srot = sitpart.GetWorldRotation();
7995 rot = Quaternion.Conjugate(srot) * rot; // removed sit part world rotation
7989 av.Rotation = rot; 7996 av.Rotation = rot;
7990 av.SendAvatarDataToAllAgents(); 7997 av.SendAvatarDataToAllAgents();
7991 } 7998 }
@@ -8003,7 +8010,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8003 Quaternion rot = new Quaternion((float)r.x, (float)r.y, (float)r.z, (float)r.s); // requested offset rotation 8010 Quaternion rot = new Quaternion((float)r.x, (float)r.y, (float)r.z, (float)r.s); // requested offset rotation
8004 8011
8005 Quaternion srot = sitpart.RotationOffset; 8012 Quaternion srot = sitpart.RotationOffset;
8006 rot *= Quaternion.Conjugate(srot); // remove sit part offset rotation 8013 rot = Quaternion.Conjugate(srot) * rot; // remove sit part offset rotation
8007 8014
8008 av.Rotation = rot; 8015 av.Rotation = rot;
8009 av.SendAvatarDataToAllAgents(); 8016 av.SendAvatarDataToAllAgents();