Applied patch from mantis #749, Grass now stays to set type when moved. thanks Grumly57.

0.6.0-stable
MW 2008-03-12 15:53:04 +00:00
parent 2fea38a5f2
commit fc551ef127
4 changed files with 12 additions and 10 deletions

View File

@ -608,7 +608,7 @@ namespace OpenSim.Framework
uint parentID, byte[] particleSystem, LLQuaternion rotation, byte clickAction); uint parentID, byte[] particleSystem, LLQuaternion rotation, byte clickAction);
void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
LLQuaternion rotation); LLQuaternion rotation, byte state);
void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity); LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity);

View File

@ -1898,7 +1898,7 @@ namespace OpenSim.Region.ClientStack
/// <param name="position"></param> /// <param name="position"></param>
/// <param name="rotation"></param> /// <param name="rotation"></param>
public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position, public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, LLVector3 position,
LLQuaternion rotation) LLQuaternion rotation, byte state)
{ {
LLVector3 velocity = new LLVector3(0f, 0f, 0f); LLVector3 velocity = new LLVector3(0f, 0f, 0f);
LLVector3 rotationalvelocity = new LLVector3(0f, 0f, 0f); LLVector3 rotationalvelocity = new LLVector3(0f, 0f, 0f);
@ -1907,7 +1907,7 @@ namespace OpenSim.Region.ClientStack
terse.RegionData.RegionHandle = regionHandle; terse.RegionData.RegionHandle = regionHandle;
terse.RegionData.TimeDilation = timeDilation; terse.RegionData.TimeDilation = timeDilation;
terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1];
terse.ObjectData[0] = CreatePrimImprovedBlock(localID, position, rotation, velocity, rotationalvelocity); terse.ObjectData[0] = CreatePrimImprovedBlock(localID, position, rotation, velocity, rotationalvelocity, state);
terse.Header.Reliable = false; terse.Header.Reliable = false;
OutPacket(terse, ThrottleOutPacketType.Task); OutPacket(terse, ThrottleOutPacketType.Task);
} }
@ -1920,7 +1920,7 @@ namespace OpenSim.Region.ClientStack
terse.RegionData.RegionHandle = regionHandle; terse.RegionData.RegionHandle = regionHandle;
terse.RegionData.TimeDilation = timeDilation; terse.RegionData.TimeDilation = timeDilation;
terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1]; terse.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[1];
terse.ObjectData[0] = CreatePrimImprovedBlock(localID, position, rotation, velocity, rotationalvelocity); terse.ObjectData[0] = CreatePrimImprovedBlock(localID, position, rotation, velocity, rotationalvelocity, 0);
terse.Header.Reliable = false; terse.Header.Reliable = false;
OutPacket(terse, ThrottleOutPacketType.Task); OutPacket(terse, ThrottleOutPacketType.Task);
} }
@ -2027,7 +2027,8 @@ namespace OpenSim.Region.ClientStack
LLVector3 position, LLVector3 position,
LLQuaternion rotation, LLQuaternion rotation,
LLVector3 velocity, LLVector3 velocity,
LLVector3 rotationalvelocity) LLVector3 rotationalvelocity,
byte state)
{ {
uint ID = localID; uint ID = localID;
byte[] bytes = new byte[60]; byte[] bytes = new byte[60];
@ -2039,7 +2040,7 @@ namespace OpenSim.Region.ClientStack
bytes[i++] = (byte)((ID >> 8) % 256); bytes[i++] = (byte)((ID >> 8) % 256);
bytes[i++] = (byte)((ID >> 16) % 256); bytes[i++] = (byte)((ID >> 16) % 256);
bytes[i++] = (byte)((ID >> 24) % 256); bytes[i++] = (byte)((ID >> 24) % 256);
bytes[i++] = 0; bytes[i++] = state;
bytes[i++] = 0; bytes[i++] = 0;
byte[] pb = position.GetBytes(); byte[] pb = position.GetBytes();
@ -2125,7 +2126,8 @@ namespace OpenSim.Region.ClientStack
SetDefaultPrimPacketValues(objupdate); SetDefaultPrimPacketValues(objupdate);
objupdate.UpdateFlags = flags; objupdate.UpdateFlags = flags;
SetPrimPacketShapeData(objupdate, primShape); SetPrimPacketShapeData(objupdate, primShape);
if ((primShape.PCode == 111) || (primShape.PCode == 255)) // if ((primShape.PCode == 111) || (primShape.PCode == 255))
if ((primShape.PCode == (byte)PCode.NewTree) || (primShape.PCode == (byte)PCode.Tree) || (primShape.PCode == (byte)PCode.Grass))
{ {
objupdate.Data = new byte[1]; objupdate.Data = new byte[1];
objupdate.Data[0] = primShape.State; objupdate.Data[0] = primShape.State;

View File

@ -1814,7 +1814,7 @@ namespace OpenSim.Region.Environment.Scenes
LLQuaternion mRot = RotationOffset; LLQuaternion mRot = RotationOffset;
if ((ObjectFlags & (uint) LLObject.ObjectFlags.Physics) == 0) if ((ObjectFlags & (uint) LLObject.ObjectFlags.Physics) == 0)
{ {
remoteClient.SendPrimTerseUpdate(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, lPos, mRot); remoteClient.SendPrimTerseUpdate(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, lPos, mRot, Shape.State);
} }
else else
{ {
@ -1829,7 +1829,7 @@ namespace OpenSim.Region.Environment.Scenes
LLQuaternion mRot = RotationOffset; LLQuaternion mRot = RotationOffset;
if ((ObjectFlags & (uint) LLObject.ObjectFlags.Physics) == 0) if ((ObjectFlags & (uint) LLObject.ObjectFlags.Physics) == 0)
{ {
remoteClient.SendPrimTerseUpdate(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, lPos, mRot); remoteClient.SendPrimTerseUpdate(m_regionHandle, (ushort)(m_parentGroup.GetTimeDilation() * (float)ushort.MaxValue), LocalId, lPos, mRot, Shape.State);
} }
else else
{ {

View File

@ -357,7 +357,7 @@ namespace SimpleApp
{ {
} }
public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID,
LLVector3 position, LLQuaternion rotation) LLVector3 position, LLQuaternion rotation, byte state)
{ {
} }