* Fix for Mantis: 0000229

afrisby
Teravus Ovares 2007-12-21 15:02:57 +00:00
parent 169e176f47
commit ba9e0e5cab
1 changed files with 88 additions and 84 deletions

View File

@ -1926,116 +1926,120 @@ namespace OpenSim.Region.ClientStack
for (int i = 0; i < multipleupdate.ObjectData.Length; i++) for (int i = 0; i < multipleupdate.ObjectData.Length; i++)
{ {
if (tScene.PermissionsMngr.CanEditObjectPosition(simClient.AgentId, tScene.GetSceneObjectPart(multipleupdate.ObjectData[i].ObjectLocalID).UUID)) // Can't act on Null Data
if (multipleupdate.ObjectData[i].Data != null)
{ {
#region position if (tScene.PermissionsMngr.CanEditObjectPosition(simClient.AgentId, tScene.GetSceneObjectPart(multipleupdate.ObjectData[i].ObjectLocalID).UUID))
{
#region position
if (multipleupdate.ObjectData[i].Type == 9) //change position if (multipleupdate.ObjectData[i].Type == 9) //change position
{
if (OnUpdatePrimGroupPosition != null)
{ {
LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); if (OnUpdatePrimGroupPosition != null)
OnUpdatePrimGroupPosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); {
LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
OnUpdatePrimGroupPosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
}
} }
} else if (multipleupdate.ObjectData[i].Type == 1) //single item of group change position
else if (multipleupdate.ObjectData[i].Type == 1) //single item of group change position
{
if (OnUpdatePrimSinglePosition != null)
{ {
LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); if (OnUpdatePrimSinglePosition != null)
// System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z); {
OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
// System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
}
} }
} #endregion position
#endregion position #region rotation
#region rotation
else if (multipleupdate.ObjectData[i].Type == 2) // single item of group rotation from tab else if (multipleupdate.ObjectData[i].Type == 2) // single item of group rotation from tab
{
if (OnUpdatePrimSingleRotation != null)
{ {
LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); if (OnUpdatePrimSingleRotation != null)
//System.Console.WriteLine("new tab rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); {
OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true);
//System.Console.WriteLine("new tab rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
}
} }
} else if (multipleupdate.ObjectData[i].Type == 3) // single item of group rotation from mouse
else if (multipleupdate.ObjectData[i].Type == 3) // single item of group rotation from mouse
{
if (OnUpdatePrimSingleRotation != null)
{ {
LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true); if (OnUpdatePrimSingleRotation != null)
//System.Console.WriteLine("new mouse rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); {
OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true);
//System.Console.WriteLine("new mouse rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
OnUpdatePrimSingleRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
}
} }
} else if (multipleupdate.ObjectData[i].Type == 10) //group rotation from object tab
else if (multipleupdate.ObjectData[i].Type == 10) //group rotation from object tab
{
if (OnUpdatePrimGroupRotation != null)
{ {
LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true); if (OnUpdatePrimGroupRotation != null)
// Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); {
OnUpdatePrimGroupRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this); LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true);
// Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
OnUpdatePrimGroupRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
}
} }
} else if (multipleupdate.ObjectData[i].Type == 11) //group rotation from mouse
else if (multipleupdate.ObjectData[i].Type == 11) //group rotation from mouse
{
if (OnUpdatePrimGroupMouseRotation != null)
{ {
LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); if (OnUpdatePrimGroupMouseRotation != null)
LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true); {
//Console.WriteLine("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z); LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
// Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W); LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true);
OnUpdatePrimGroupMouseRotation(multipleupdate.ObjectData[i].ObjectLocalID, pos, rot, this); //Console.WriteLine("new rotation position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
// Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
OnUpdatePrimGroupMouseRotation(multipleupdate.ObjectData[i].ObjectLocalID, pos, rot, this);
}
} }
} #endregion
#endregion #region scale
#region scale
else if (multipleupdate.ObjectData[i].Type == 13) //group scale from object tab else if (multipleupdate.ObjectData[i].Type == 13) //group scale from object tab
{
if (OnUpdatePrimScale != null)
{ {
LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); if (OnUpdatePrimScale != null)
//Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); {
OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12);
//Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
// Change the position based on scale (for bug number 246) // Change the position based on scale (for bug number 246)
LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
// System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z); // System.Console.WriteLine("new movement position is " + pos.X + " , " + pos.Y + " , " + pos.Z);
OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
}
} }
} else if (multipleupdate.ObjectData[i].Type == 29) //group scale from mouse
else if (multipleupdate.ObjectData[i].Type == 29) //group scale from mouse
{
if (OnUpdatePrimScale != null)
{ {
LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); if (OnUpdatePrimScale != null)
// Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z ); {
OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12);
LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0); // Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z );
OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this); OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
OnUpdatePrimSinglePosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
}
} }
} else if (multipleupdate.ObjectData[i].Type == 5) //single prim scale from object tab
else if (multipleupdate.ObjectData[i].Type == 5) //single prim scale from object tab
{
if (OnUpdatePrimScale != null)
{ {
LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); if (OnUpdatePrimScale != null)
// Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); {
OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12);
// Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
}
} }
} else if (multipleupdate.ObjectData[i].Type == 21) //single prim scale from mouse
else if (multipleupdate.ObjectData[i].Type == 21) //single prim scale from mouse
{
if (OnUpdatePrimScale != null)
{ {
LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12); if (OnUpdatePrimScale != null)
// Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z); {
OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this); LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 12);
// Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z);
OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
}
} }
}
#endregion #endregion
}
} }
} }
return true; return true;