diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 7a0a232629..d30e00589e 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -608,7 +608,7 @@ namespace OpenSim.Framework
uint parentID, byte[] particleSystem, LLQuaternion rotation, byte clickAction);
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,
LLQuaternion rotation, LLVector3 velocity, LLVector3 rotationalvelocity);
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index f11ac56eae..58d425dbec 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -1898,7 +1898,7 @@ namespace OpenSim.Region.ClientStack
///
///
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 rotationalvelocity = new LLVector3(0f, 0f, 0f);
@@ -1907,7 +1907,7 @@ namespace OpenSim.Region.ClientStack
terse.RegionData.RegionHandle = regionHandle;
terse.RegionData.TimeDilation = timeDilation;
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;
OutPacket(terse, ThrottleOutPacketType.Task);
}
@@ -1920,7 +1920,7 @@ namespace OpenSim.Region.ClientStack
terse.RegionData.RegionHandle = regionHandle;
terse.RegionData.TimeDilation = timeDilation;
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;
OutPacket(terse, ThrottleOutPacketType.Task);
}
@@ -2027,7 +2027,8 @@ namespace OpenSim.Region.ClientStack
LLVector3 position,
LLQuaternion rotation,
LLVector3 velocity,
- LLVector3 rotationalvelocity)
+ LLVector3 rotationalvelocity,
+ byte state)
{
uint ID = localID;
byte[] bytes = new byte[60];
@@ -2039,7 +2040,7 @@ namespace OpenSim.Region.ClientStack
bytes[i++] = (byte)((ID >> 8) % 256);
bytes[i++] = (byte)((ID >> 16) % 256);
bytes[i++] = (byte)((ID >> 24) % 256);
- bytes[i++] = 0;
+ bytes[i++] = state;
bytes[i++] = 0;
byte[] pb = position.GetBytes();
@@ -2125,7 +2126,8 @@ namespace OpenSim.Region.ClientStack
SetDefaultPrimPacketValues(objupdate);
objupdate.UpdateFlags = flags;
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[0] = primShape.State;
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 6ed63beac0..f20a638b78 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -1814,7 +1814,7 @@ namespace OpenSim.Region.Environment.Scenes
LLQuaternion mRot = RotationOffset;
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
{
@@ -1829,7 +1829,7 @@ namespace OpenSim.Region.Environment.Scenes
LLQuaternion mRot = RotationOffset;
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
{
diff --git a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
index 68fea97909..82ff3cc99b 100644
--- a/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleApp/MyNpcCharacter.cs
@@ -357,7 +357,7 @@ namespace SimpleApp
{
}
public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID,
- LLVector3 position, LLQuaternion rotation)
+ LLVector3 position, LLQuaternion rotation, byte state)
{
}