mirror of
https://github.com/opensim/opensim.git
synced 2026-05-31 06:45:53 +08:00
Today's work on Building support/tools. Think I am slowly getting there.
This commit is contained in:
@@ -101,8 +101,10 @@ namespace OpenSim.Region.ClientStack
|
||||
protected bool MultipleObjUpdate(ClientView simClient, Packet packet)
|
||||
{
|
||||
MultipleObjectUpdatePacket multipleupdate = (MultipleObjectUpdatePacket)packet;
|
||||
// Console.WriteLine("new multi update packet " + multipleupdate.ToString());
|
||||
for (int i = 0; i < multipleupdate.ObjectData.Length; i++)
|
||||
{
|
||||
#region position
|
||||
if (multipleupdate.ObjectData[i].Type == 9) //change position
|
||||
{
|
||||
if (OnUpdatePrimPosition != null)
|
||||
@@ -110,24 +112,95 @@ namespace OpenSim.Region.ClientStack
|
||||
LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
|
||||
OnUpdatePrimPosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
|
||||
}
|
||||
//should update stored position of the prim
|
||||
|
||||
}
|
||||
else if (multipleupdate.ObjectData[i].Type == 10)//rotation
|
||||
else if (multipleupdate.ObjectData[i].Type == 1) //single item of group change position
|
||||
{
|
||||
if (OnUpdatePrimPosition != null)
|
||||
{
|
||||
// libsecondlife.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
|
||||
//OnUpdatePrimPosition(multipleupdate.ObjectData[i].ObjectLocalID, pos, this);
|
||||
}
|
||||
}
|
||||
#endregion position
|
||||
#region rotation
|
||||
else if (multipleupdate.ObjectData[i].Type == 2)// single item of group rotation from tab
|
||||
{
|
||||
if (OnUpdatePrimRotation != null)
|
||||
{
|
||||
LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true);
|
||||
// Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
|
||||
OnUpdatePrimRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
|
||||
}
|
||||
}
|
||||
else if (multipleupdate.ObjectData[i].Type == 13)//scale
|
||||
else if (multipleupdate.ObjectData[i].Type == 3)// single item of group rotation from mouse
|
||||
{
|
||||
if (OnUpdatePrimRotation != null)
|
||||
{
|
||||
libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true);
|
||||
// Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
|
||||
OnUpdatePrimRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
|
||||
}
|
||||
}
|
||||
else if (multipleupdate.ObjectData[i].Type == 10)//group rotation from object tab
|
||||
{
|
||||
if (OnUpdatePrimRotation != null)
|
||||
{
|
||||
libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 0, true);
|
||||
// Console.WriteLine("new rotation is " + rot.X + " , " + rot.Y + " , " + rot.Z + " , " + rot.W);
|
||||
OnUpdatePrimRotation(multipleupdate.ObjectData[i].ObjectLocalID, rot, this);
|
||||
}
|
||||
}
|
||||
else if (multipleupdate.ObjectData[i].Type == 11)//group rotation from mouse
|
||||
{
|
||||
if (OnUpdatePrimGroupRotation != null)
|
||||
{
|
||||
libsecondlife.LLVector3 pos = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
|
||||
libsecondlife.LLQuaternion rot = new LLQuaternion(multipleupdate.ObjectData[i].Data, 12, true);
|
||||
//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);
|
||||
OnUpdatePrimGroupRotation(multipleupdate.ObjectData[i].ObjectLocalID, pos, rot, this);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region scale
|
||||
else if (multipleupdate.ObjectData[i].Type == 13)//group scale from object tab
|
||||
{
|
||||
if (OnUpdatePrimScale != null)
|
||||
{
|
||||
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 == 29)//group scale from mouse
|
||||
{
|
||||
if (OnUpdatePrimScale != null)
|
||||
{
|
||||
libsecondlife.LLVector3 scale = new LLVector3(multipleupdate.ObjectData[i].Data, 0);
|
||||
// Console.WriteLine("new scale is " + scale.X + " , " + scale.Y + " , " + scale.Z );
|
||||
// OnUpdatePrimScale(multipleupdate.ObjectData[i].ObjectLocalID, scale, this);
|
||||
}
|
||||
}
|
||||
else if (multipleupdate.ObjectData[i].Type == 5)//single scale from object tab
|
||||
{
|
||||
if (OnUpdatePrimScale != null)
|
||||
{
|
||||
libsecondlife.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 scale from mouse
|
||||
{
|
||||
if (OnUpdatePrimScale != null)
|
||||
{
|
||||
libsecondlife.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
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user