Reinstate older set rotation code for avatars since it works in all cases

avinationmerge
Melanie 2012-07-15 20:55:54 +02:00
parent a2d19b9703
commit 8baf4dcc78
1 changed files with 1 additions and 22 deletions

View File

@ -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. //This is a special version of SetPrimParams to deal with avatars which are sat on the linkset.
int idx = 0; int idx = 0;
SceneObjectPart sitpart = World.GetSceneObjectPart(av.ParentID); // betting this will be used
bool positionChanged = false; bool positionChanged = false;
Vector3 finalPos = Vector3.Zero; Vector3 finalPos = Vector3.Zero;
@ -8049,6 +8048,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
break; break;
case (int)ScriptBaseClass.PRIM_ROT_LOCAL:
case (int)ScriptBaseClass.PRIM_ROTATION: case (int)ScriptBaseClass.PRIM_ROTATION:
{ {
if (remain < 1) if (remain < 1)
@ -8071,27 +8071,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
} }
break; 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 // parse rest doing nothing but number of parameters error check
case (int)ScriptBaseClass.PRIM_SIZE: case (int)ScriptBaseClass.PRIM_SIZE:
case (int)ScriptBaseClass.PRIM_MATERIAL: case (int)ScriptBaseClass.PRIM_MATERIAL: