From 8baf4dcc786b91a427e60dca9f0d0eeb05ddae19 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 15 Jul 2012 20:55:54 +0200 Subject: Reinstate older set rotation code for avatars since it works in all cases --- .../Shared/Api/Implementation/LSL_Api.cs | 23 +--------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index b20ca6d..5bade25 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -8000,7 +8000,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api //This is a special version of SetPrimParams to deal with avatars which are sat on the linkset. int idx = 0; - SceneObjectPart sitpart = World.GetSceneObjectPart(av.ParentID); // betting this will be used bool positionChanged = false; Vector3 finalPos = Vector3.Zero; @@ -8049,6 +8048,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } break; + case (int)ScriptBaseClass.PRIM_ROT_LOCAL: case (int)ScriptBaseClass.PRIM_ROTATION: { if (remain < 1) @@ -8071,27 +8071,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } break; - case (int)ScriptBaseClass.PRIM_ROT_LOCAL: - { - if (remain < 1) - return; - - if (sitpart == null) - break; - - LSL_Rotation r = rules.GetQuaternionItem(idx++); - Quaternion rot = new Quaternion((float)r.x, (float)r.y, (float)r.z, (float)r.s); // requested offset rotation - if (sitpart != sitpart.ParentGroup.RootPart) - { - Quaternion srot = sitpart.RotationOffset; - rot = Quaternion.Conjugate(srot) * rot; // remove sit part offset rotation - } - av.Rotation = rot; -// av.SendAvatarDataToAllAgents(); - av.SendTerseUpdateToAllClients(); - } - break; - // parse rest doing nothing but number of parameters error check case (int)ScriptBaseClass.PRIM_SIZE: case (int)ScriptBaseClass.PRIM_MATERIAL: -- cgit v1.1