mirror of
https://github.com/opensim/opensim.git
synced 2026-05-15 19:35:41 +08:00
Today's work on Building support/tools. Think I am slowly getting there.
This commit is contained in:
@@ -64,6 +64,7 @@ namespace OpenSim.Region.ClientStack
|
||||
public event UpdatePrimTexture OnUpdatePrimTexture;
|
||||
public event UpdateVector OnUpdatePrimPosition;
|
||||
public event UpdatePrimRotation OnUpdatePrimRotation;
|
||||
public event UpdatePrimGroupRotation OnUpdatePrimGroupRotation;
|
||||
public event UpdateVector OnUpdatePrimScale;
|
||||
public event StatusChange OnChildAgentStatus;
|
||||
public event GenericCall2 OnStopMovement;
|
||||
@@ -644,7 +645,7 @@ namespace OpenSim.Region.ClientStack
|
||||
byte[] pb = pos.GetBytes();
|
||||
Array.Copy(pb, 0, outPacket.ObjectData[0].ObjectData, 0, pb.Length);
|
||||
byte[] rot = rotation.GetBytes();
|
||||
Array.Copy(rot, 0, outPacket.ObjectData[0].ObjectData, 48, rot.Length);
|
||||
Array.Copy(rot, 0, outPacket.ObjectData[0].ObjectData, 36, rot.Length);
|
||||
OutPacket(outPacket);
|
||||
}
|
||||
|
||||
|
||||
@@ -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