* Made a copy of parts before updating to avoid dictionary updated exceptions on big updates
* The part now uses the byte[] TextureEntry instead of the objectafrisby
parent
6a02900c8a
commit
5b720b4b39
|
@ -677,26 +677,32 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public override void Update()
|
public override void Update()
|
||||||
{
|
{
|
||||||
|
List<SceneObjectPart> parts = new List<SceneObjectPart>(m_parts.Values);
|
||||||
|
|
||||||
if (Util.GetDistanceTo(lastPhysGroupPos, AbsolutePosition) > 0.02)
|
if (Util.GetDistanceTo(lastPhysGroupPos, AbsolutePosition) > 0.02)
|
||||||
{
|
{
|
||||||
foreach (SceneObjectPart part in m_parts.Values)
|
foreach (SceneObjectPart part in parts)
|
||||||
{
|
{
|
||||||
if (part.UpdateFlag == 0) part.UpdateFlag = 1;
|
if (part.UpdateFlag == 0) part.UpdateFlag = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
lastPhysGroupPos = AbsolutePosition;
|
lastPhysGroupPos = AbsolutePosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1)
|
if ((Math.Abs(lastPhysGroupRot.W - GroupRotation.W) > 0.1)
|
||||||
|| (Math.Abs(lastPhysGroupRot.X - GroupRotation.X) > 0.1)
|
|| (Math.Abs(lastPhysGroupRot.X - GroupRotation.X) > 0.1)
|
||||||
|| (Math.Abs(lastPhysGroupRot.Y - GroupRotation.Y) > 0.1)
|
|| (Math.Abs(lastPhysGroupRot.Y - GroupRotation.Y) > 0.1)
|
||||||
|| (Math.Abs(lastPhysGroupRot.Z - GroupRotation.Z) > 0.1))
|
|| (Math.Abs(lastPhysGroupRot.Z - GroupRotation.Z) > 0.1))
|
||||||
{
|
{
|
||||||
foreach (SceneObjectPart part in m_parts.Values)
|
foreach (SceneObjectPart part in parts)
|
||||||
{
|
{
|
||||||
if (part.UpdateFlag == 0) part.UpdateFlag = 1;
|
if (part.UpdateFlag == 0) part.UpdateFlag = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
lastPhysGroupRot = GroupRotation;
|
lastPhysGroupRot = GroupRotation;
|
||||||
}
|
}
|
||||||
foreach (SceneObjectPart part in m_parts.Values)
|
|
||||||
|
foreach (SceneObjectPart part in parts)
|
||||||
{
|
{
|
||||||
part.SendScheduledUpdates();
|
part.SendScheduledUpdates();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1327,7 +1327,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// <param name="textureEntry"></param>
|
/// <param name="textureEntry"></param>
|
||||||
public void UpdateTextureEntry(byte[] textureEntry)
|
public void UpdateTextureEntry(byte[] textureEntry)
|
||||||
{
|
{
|
||||||
m_shape.Textures = new LLObject.TextureEntry(textureEntry, 0, textureEntry.Length);
|
m_shape.TextureEntry = textureEntry;
|
||||||
ScheduleFullUpdate();
|
ScheduleFullUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue