changes on updates
parent
333aa0d67c
commit
b156378819
|
@ -156,7 +156,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
SceneObjectGroup sog = GetGroupByPrim(primLocalID);
|
SceneObjectGroup sog = GetGroupByPrim(primLocalID);
|
||||||
|
|
||||||
if (sog != null)
|
if (sog != null)
|
||||||
sog.SendFullUpdateToClient(remoteClient);
|
sog.SendFullAnimUpdateToClient(remoteClient);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -626,6 +626,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
for (int i = 0; i < updates.Count; i++)
|
for (int i = 0; i < updates.Count; i++)
|
||||||
{
|
{
|
||||||
SceneObjectGroup sog = updates[i];
|
SceneObjectGroup sog = updates[i];
|
||||||
|
if (sog.IsDeleted)
|
||||||
|
continue;
|
||||||
|
|
||||||
// Don't abort the whole update if one entity happens to give us an exception.
|
// Don't abort the whole update if one entity happens to give us an exception.
|
||||||
try
|
try
|
||||||
|
|
|
@ -2506,24 +2506,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// don't backup while it's selected or you're asking for changes mid stream.
|
// don't backup while it's selected or you're asking for changes mid stream.
|
||||||
if (isTimeToPersist() || forcedBackup)
|
if (isTimeToPersist() || forcedBackup)
|
||||||
{
|
{
|
||||||
if (m_rootPart.PhysActor != null &&
|
|
||||||
(!m_rootPart.PhysActor.IsPhysical))
|
|
||||||
{
|
|
||||||
// Possible ghost prim
|
|
||||||
if (m_rootPart.PhysActor.Position != m_rootPart.GroupPosition)
|
|
||||||
{
|
|
||||||
foreach (SceneObjectPart part in m_parts.GetArray())
|
|
||||||
{
|
|
||||||
// Re-set physics actor positions and
|
|
||||||
// orientations
|
|
||||||
part.GroupPosition = m_rootPart.GroupPosition;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// m_log.DebugFormat(
|
|
||||||
// "[SCENE]: Storing {0}, {1} in {2}",
|
|
||||||
// Name, UUID, m_scene.RegionInfo.RegionName);
|
|
||||||
|
|
||||||
if (RootPart.Shape.PCode == 9 && RootPart.Shape.State != 0)
|
if (RootPart.Shape.PCode == 9 && RootPart.Shape.State != 0)
|
||||||
{
|
{
|
||||||
RootPart.Shape.LastAttachPoint = RootPart.Shape.State;
|
RootPart.Shape.LastAttachPoint = RootPart.Shape.State;
|
||||||
|
@ -2557,12 +2539,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
backup_group.Clear();
|
backup_group.Clear();
|
||||||
backup_group = null;
|
backup_group = null;
|
||||||
}
|
}
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// m_log.DebugFormat(
|
|
||||||
// "[SCENE]: Did not update persistence of object {0} {1}, selected = {2}",
|
|
||||||
// Name, UUID, IsSelected);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
@ -2582,35 +2558,20 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// Used when the client initially connects and when client sends RequestPrim packet
|
/// Used when the client initially connects and when client sends RequestPrim packet
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
/// <param name="remoteClient"></param>
|
/// <param name="remoteClient"></param>
|
||||||
public void SendFullUpdateToClient(IClientAPI remoteClient)
|
|
||||||
{
|
|
||||||
PrimUpdateFlags update = PrimUpdateFlags.FullUpdate;
|
|
||||||
|
|
||||||
RootPart.SendFullUpdate(remoteClient, update);
|
|
||||||
|
|
||||||
SceneObjectPart[] parts = m_parts.GetArray();
|
|
||||||
for (int i = 0; i < parts.Length; i++)
|
|
||||||
{
|
|
||||||
SceneObjectPart part = parts[i];
|
|
||||||
if (part != RootPart)
|
|
||||||
part.SendFullUpdate(remoteClient, update);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SendFullAnimUpdateToClient(IClientAPI remoteClient)
|
public void SendFullAnimUpdateToClient(IClientAPI remoteClient)
|
||||||
{
|
{
|
||||||
PrimUpdateFlags update = PrimUpdateFlags.FullUpdate;
|
PrimUpdateFlags update = PrimUpdateFlags.FullUpdate;
|
||||||
if (RootPart.Shape.MeshFlagEntry)
|
if (RootPart.Shape.MeshFlagEntry)
|
||||||
update = PrimUpdateFlags.FullUpdatewithAnim;
|
update = PrimUpdateFlags.FullUpdatewithAnim;
|
||||||
|
|
||||||
RootPart.SendFullUpdate(remoteClient, update);
|
RootPart.SendUpdate(remoteClient, update);
|
||||||
|
|
||||||
SceneObjectPart[] parts = m_parts.GetArray();
|
SceneObjectPart[] parts = m_parts.GetArray();
|
||||||
for (int i = 0; i < parts.Length; i++)
|
for (int i = 0; i < parts.Length; i++)
|
||||||
{
|
{
|
||||||
SceneObjectPart part = parts[i];
|
SceneObjectPart part = parts[i];
|
||||||
if (part != RootPart)
|
if (part != RootPart)
|
||||||
part.SendFullUpdate(remoteClient, update);
|
part.SendUpdate(remoteClient, update);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3033,28 +2994,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// the race conditions.
|
// the race conditions.
|
||||||
if (IsDeleted || inTransit)
|
if (IsDeleted || inTransit)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Even temporary objects take part in physics (e.g. temp-on-rez bullets)
|
|
||||||
//if ((RootPart.Flags & PrimFlags.TemporaryOnRez) != 0)
|
|
||||||
// return;
|
|
||||||
|
|
||||||
// If we somehow got here to updating the SOG and its root part is not scheduled for update,
|
|
||||||
// check to see if the physical position or rotation warrant an update.
|
|
||||||
/*
|
|
||||||
if (m_rootPart.UpdateFlag == UpdateRequired.NONE)
|
|
||||||
{
|
|
||||||
// rootpart SendScheduledUpdates will check if a update is needed
|
|
||||||
m_rootPart.UpdateFlag = UpdateRequired.TERSE;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
if (IsAttachment)
|
if (IsAttachment)
|
||||||
{
|
{
|
||||||
ScenePresence sp = m_scene.GetScenePresence(AttachedAvatar);
|
ScenePresence sp = m_scene.GetScenePresence(AttachedAvatar);
|
||||||
if (sp != null)
|
if (sp != null)
|
||||||
{
|
|
||||||
sp.SendAttachmentScheduleUpdate(this);
|
sp.SendAttachmentScheduleUpdate(this);
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// while physics doesn't suports LookAt, we do it in RootPart
|
// while physics doesn't suports LookAt, we do it in RootPart
|
||||||
|
@ -3134,13 +3080,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RootPart.SendFullUpdateToAllClientsInternal();
|
RootPart.SendFullUpdateToAllClientsNoAttachment();
|
||||||
SceneObjectPart[] parts = m_parts.GetArray();
|
SceneObjectPart[] parts = m_parts.GetArray();
|
||||||
for (int i = 0; i < parts.Length; i++)
|
for (int i = 0; i < parts.Length; i++)
|
||||||
{
|
{
|
||||||
SceneObjectPart part = parts[i];
|
SceneObjectPart part = parts[i];
|
||||||
if (part != RootPart)
|
if (part != RootPart)
|
||||||
part.SendFullUpdateToAllClientsInternal();
|
part.SendFullUpdateToAllClientsNoAttachment();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5465,7 +5411,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
private string GetLinkNumber_lastname;
|
private string GetLinkNumber_lastname;
|
||||||
private int GetLinkNumber_lastnumber;
|
private int GetLinkNumber_lastnumber;
|
||||||
|
|
||||||
// this scales bad but so does GetLinkNumPart
|
|
||||||
public int GetLinkNumber(string name)
|
public int GetLinkNumber(string name)
|
||||||
{
|
{
|
||||||
if(String.IsNullOrEmpty(name) || name == "Object" || name == "Primitive")
|
if(String.IsNullOrEmpty(name) || name == "Object" || name == "Primitive")
|
||||||
|
|
|
@ -660,7 +660,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Dictionary<int, string> CollisionFilter
|
public Dictionary<int, string> CollisionFilter
|
||||||
{
|
{
|
||||||
get { return m_CollisionFilter; }
|
get { return m_CollisionFilter; }
|
||||||
|
@ -3282,8 +3281,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void ScheduleFullUpdate()
|
public void ScheduleFullUpdate()
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat("[SCENE OBJECT PART]: Scheduling full update for {0} {1}", Name, LocalId);
|
|
||||||
|
|
||||||
if (ParentGroup == null || ParentGroup.IsDeleted || ParentGroup.Scene == null)
|
if (ParentGroup == null || ParentGroup.IsDeleted || ParentGroup.Scene == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -3315,16 +3312,18 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
ParentGroup.QueueForUpdateCheck();
|
ParentGroup.QueueForUpdateCheck();
|
||||||
|
|
||||||
bool isfull = false;
|
bool isfull = false;
|
||||||
lock (UpdateFlagLock)
|
PrimUpdateFlags update;
|
||||||
|
if (ParentGroup.IsAttachment)
|
||||||
{
|
{
|
||||||
if (ParentGroup.IsAttachment)
|
update = PrimUpdateFlags.FullUpdate;
|
||||||
{
|
isfull = true;
|
||||||
UpdateFlag |= PrimUpdateFlags.FullUpdate;
|
|
||||||
isfull = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
UpdateFlag |= PrimUpdateFlags.TerseUpdate;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
update = PrimUpdateFlags.TerseUpdate;
|
||||||
|
|
||||||
|
lock (UpdateFlagLock)
|
||||||
|
UpdateFlag |= update;
|
||||||
|
|
||||||
ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this, isfull);
|
ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this, isfull);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3341,17 +3340,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
ParentGroup.QueueForUpdateCheck();
|
ParentGroup.QueueForUpdateCheck();
|
||||||
|
|
||||||
bool isfull = false;
|
bool isfull = false;
|
||||||
lock (UpdateFlagLock)
|
if (ParentGroup.IsAttachment)
|
||||||
{
|
{
|
||||||
if (ParentGroup.IsAttachment)
|
update |= PrimUpdateFlags.FullUpdate;
|
||||||
{
|
isfull = true;
|
||||||
UpdateFlag |= update | PrimUpdateFlags.FullUpdate;
|
|
||||||
isfull = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
UpdateFlag |= update;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lock (UpdateFlagLock)
|
||||||
|
UpdateFlag |= update;
|
||||||
|
|
||||||
ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this, isfull);
|
ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this, isfull);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3369,40 +3366,28 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (ParentGroup == null)
|
if (ParentGroup == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
|
||||||
// "[SOG]: Sendinging part full update to {0} for {1} {2}", remoteClient.Name, part.Name, part.LocalId);
|
|
||||||
|
|
||||||
|
|
||||||
if (ParentGroup.IsAttachment)
|
if (ParentGroup.IsAttachment)
|
||||||
{
|
{
|
||||||
ScenePresence sp = ParentGroup.Scene.GetScenePresence(ParentGroup.AttachedAvatar);
|
ScenePresence sp = ParentGroup.Scene.GetScenePresence(ParentGroup.AttachedAvatar);
|
||||||
if (sp != null)
|
if (sp != null)
|
||||||
{
|
|
||||||
sp.SendAttachmentUpdate(this, PrimUpdateFlags.FullUpdate);
|
sp.SendAttachmentUpdate(this, PrimUpdateFlags.FullUpdate);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SendFullUpdateToClient(remoteClient);
|
SendUpdateToClient(remoteClient, PrimUpdateFlags.FullUpdate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected internal void SendFullUpdate(IClientAPI remoteClient, PrimUpdateFlags update)
|
protected internal void SendUpdate(IClientAPI remoteClient, PrimUpdateFlags update)
|
||||||
{
|
{
|
||||||
if (ParentGroup == null)
|
if (ParentGroup == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// m_log.DebugFormat(
|
|
||||||
// "[SOG]: Sendinging part full update to {0} for {1} {2}", remoteClient.Name, part.Name, part.LocalId);
|
|
||||||
|
|
||||||
|
|
||||||
if (ParentGroup.IsAttachment)
|
if (ParentGroup.IsAttachment)
|
||||||
{
|
{
|
||||||
ScenePresence sp = ParentGroup.Scene.GetScenePresence(ParentGroup.AttachedAvatar);
|
ScenePresence sp = ParentGroup.Scene.GetScenePresence(ParentGroup.AttachedAvatar);
|
||||||
if (sp != null)
|
if (sp != null)
|
||||||
{
|
|
||||||
sp.SendAttachmentUpdate(this, update);
|
sp.SendAttachmentUpdate(this, update);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -3413,7 +3398,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Send a full update for this part to all clients.
|
/// Send a full update for this part to all clients.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void SendFullUpdateToAllClientsInternal()
|
public void SendFullUpdateToAllClientsNoAttachment()
|
||||||
{
|
{
|
||||||
if (ParentGroup == null)
|
if (ParentGroup == null)
|
||||||
return;
|
return;
|
||||||
|
@ -3427,11 +3412,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_lastAcceleration = Acceleration;
|
m_lastAcceleration = Acceleration;
|
||||||
m_lastAngularVelocity = AngularVelocity;
|
m_lastAngularVelocity = AngularVelocity;
|
||||||
m_lastUpdateSentTime = Util.GetTimeStampMS();
|
m_lastUpdateSentTime = Util.GetTimeStampMS();
|
||||||
|
UpdateFlag &= ~PrimUpdateFlags.FullUpdate;
|
||||||
}
|
}
|
||||||
|
|
||||||
ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
|
ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
|
||||||
{
|
{
|
||||||
SendFullUpdate(avatar.ControllingClient);
|
SendUpdateToClient(avatar.ControllingClient, PrimUpdateFlags.FullUpdate);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3449,52 +3435,24 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_lastAcceleration = Acceleration;
|
m_lastAcceleration = Acceleration;
|
||||||
m_lastAngularVelocity = AngularVelocity;
|
m_lastAngularVelocity = AngularVelocity;
|
||||||
m_lastUpdateSentTime = Util.GetTimeStampMS();
|
m_lastUpdateSentTime = Util.GetTimeStampMS();
|
||||||
|
UpdateFlag &= ~PrimUpdateFlags.FullUpdate;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ParentGroup.IsAttachment)
|
if (ParentGroup.IsAttachment)
|
||||||
{
|
{
|
||||||
ScenePresence sp = ParentGroup.Scene.GetScenePresence(ParentGroup.AttachedAvatar);
|
ScenePresence sp = ParentGroup.Scene.GetScenePresence(ParentGroup.AttachedAvatar);
|
||||||
if (sp != null)
|
if (sp != null)
|
||||||
{
|
|
||||||
sp.SendAttachmentUpdate(this, PrimUpdateFlags.FullUpdate);
|
sp.SendAttachmentUpdate(this, PrimUpdateFlags.FullUpdate);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
|
ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
|
||||||
{
|
{
|
||||||
SendFullUpdate(avatar.ControllingClient);
|
SendUpdateToClient(avatar.ControllingClient, PrimUpdateFlags.FullUpdate);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Sends a full update to the client
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="remoteClient"></param>
|
|
||||||
public void SendFullUpdateToClient(IClientAPI remoteClient)
|
|
||||||
{
|
|
||||||
if (ParentGroup == null || ParentGroup.IsDeleted)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (ParentGroup.IsAttachment
|
|
||||||
&& ParentGroup.AttachedAvatar != remoteClient.AgentId
|
|
||||||
&& ParentGroup.HasPrivateAttachmentPoint)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (remoteClient.AgentId == OwnerID)
|
|
||||||
{
|
|
||||||
if ((Flags & PrimFlags.CreateSelected) != 0)
|
|
||||||
Flags &= ~PrimFlags.CreateSelected;
|
|
||||||
}
|
|
||||||
//bool isattachment = IsAttachment;
|
|
||||||
//if (LocalId != ParentGroup.RootPart.LocalId)
|
|
||||||
//isattachment = ParentGroup.RootPart.IsAttachment;
|
|
||||||
|
|
||||||
remoteClient.SendEntityUpdate(this, PrimUpdateFlags.FullUpdate);
|
|
||||||
ParentGroup.Scene.StatsReporter.AddObjectUpdates(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
private const float ROTATION_TOLERANCE = 0.01f;
|
private const float ROTATION_TOLERANCE = 0.01f;
|
||||||
private const float VELOCITY_TOLERANCE = 0.1f;
|
private const float VELOCITY_TOLERANCE = 0.1f;
|
||||||
private const float ANGVELOCITY_TOLERANCE = 0.005f;
|
private const float ANGVELOCITY_TOLERANCE = 0.005f;
|
||||||
|
@ -3546,17 +3504,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if(vz > 128.0)
|
if(vz > 128.0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if(
|
if(vx < VELOCITY_TOLERANCE && vy < VELOCITY_TOLERANCE && vz < VELOCITY_TOLERANCE
|
||||||
vx < VELOCITY_TOLERANCE &&
|
|
||||||
vy < VELOCITY_TOLERANCE &&
|
|
||||||
vz < VELOCITY_TOLERANCE
|
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if(!AbsolutePosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE))
|
if(!AbsolutePosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE))
|
||||||
break;
|
break;
|
||||||
if(vx < 1e-4 &&
|
if(vx < 1e-4 && vy < 1e-4 && vz < 1e-4 &&
|
||||||
vy < 1e-4 &&
|
|
||||||
vz < 1e-4 &&
|
|
||||||
(
|
(
|
||||||
Math.Abs(m_lastVelocity.X) > 1e-4 ||
|
Math.Abs(m_lastVelocity.X) > 1e-4 ||
|
||||||
Math.Abs(m_lastVelocity.Y) > 1e-4 ||
|
Math.Abs(m_lastVelocity.Y) > 1e-4 ||
|
||||||
|
@ -4750,10 +4703,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
AggregateInnerPerms();
|
AggregateInnerPerms();
|
||||||
|
|
||||||
if (OwnerMask != prevOwnerMask ||
|
if (OwnerMask != prevOwnerMask || GroupMask != prevGroupMask ||
|
||||||
GroupMask != prevGroupMask ||
|
EveryoneMask != prevEveryoneMask || NextOwnerMask != prevNextOwnerMask)
|
||||||
EveryoneMask != prevEveryoneMask ||
|
|
||||||
NextOwnerMask != prevNextOwnerMask)
|
|
||||||
SendFullUpdateToAllClients();
|
SendFullUpdateToAllClients();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2168,11 +2168,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
if( ParentPart != null && !IsNPC && (crossingFlags & 0x08) != 0)
|
if( ParentPart != null && !IsNPC && (crossingFlags & 0x08) != 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
// SceneObjectPart root = ParentPart.ParentGroup.RootPart;
|
|
||||||
// if(root.LocalId != ParentPart.LocalId)
|
|
||||||
// ControllingClient.SendEntityTerseUpdateImmediate(root);
|
|
||||||
// ControllingClient.SendEntityTerseUpdateImmediate(ParentPart);
|
|
||||||
ParentPart.ParentGroup.SendFullAnimUpdateToClient(ControllingClient);
|
ParentPart.ParentGroup.SendFullAnimUpdateToClient(ControllingClient);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5439,35 +5434,34 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
PrimUpdateFlags[] flags = new PrimUpdateFlags[origparts.Length];
|
PrimUpdateFlags[] flags = new PrimUpdateFlags[origparts.Length];
|
||||||
|
|
||||||
SceneObjectPart rootpart = sog.RootPart;
|
SceneObjectPart rootpart = sog.RootPart;
|
||||||
PrimUpdateFlags rootreq = sog.RootPart.GetAndClearUpdateFlag();
|
PrimUpdateFlags cur = sog.RootPart.GetAndClearUpdateFlag();
|
||||||
|
|
||||||
int j = 0;
|
int nparts = 0;
|
||||||
|
if (cur != PrimUpdateFlags.None)
|
||||||
|
{
|
||||||
|
flags[nparts] = cur;
|
||||||
|
parts[nparts] = rootpart;
|
||||||
|
++nparts;
|
||||||
|
}
|
||||||
|
|
||||||
PrimUpdateFlags cur;
|
|
||||||
for (int i = 0; i < origparts.Length; i++)
|
for (int i = 0; i < origparts.Length; i++)
|
||||||
{
|
{
|
||||||
if (origparts[i] != rootpart)
|
if (origparts[i] == rootpart)
|
||||||
{
|
continue;
|
||||||
cur = origparts[i].GetAndClearUpdateFlag();
|
|
||||||
if(cur == PrimUpdateFlags.None)
|
cur = origparts[i].GetAndClearUpdateFlag();
|
||||||
continue;
|
if(cur == PrimUpdateFlags.None)
|
||||||
flags[j] = cur;
|
continue;
|
||||||
parts[j] = origparts[i];
|
flags[nparts] = cur;
|
||||||
j++;
|
parts[nparts] = origparts[i];
|
||||||
}
|
++nparts;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (j == 0 && rootreq == PrimUpdateFlags.None)
|
if (nparts == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int nparts = j;
|
|
||||||
|
|
||||||
ControllingClient.SendEntityUpdate(rootpart, rootreq);
|
|
||||||
|
|
||||||
for (int i = 0; i < nparts; i++)
|
for (int i = 0; i < nparts; i++)
|
||||||
{
|
|
||||||
ControllingClient.SendEntityUpdate(parts[i], flags[i]);
|
ControllingClient.SendEntityUpdate(parts[i], flags[i]);
|
||||||
}
|
|
||||||
|
|
||||||
if (sog.HasPrivateAttachmentPoint)
|
if (sog.HasPrivateAttachmentPoint)
|
||||||
return;
|
return;
|
||||||
|
@ -5481,12 +5475,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod)
|
if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
p.ControllingClient.SendEntityUpdate(rootpart, rootreq);
|
|
||||||
|
|
||||||
for (int i = 0; i < nparts; i++)
|
for (int i = 0; i < nparts; i++)
|
||||||
{
|
|
||||||
p.ControllingClient.SendEntityUpdate(parts[i], flags[i]);
|
p.ControllingClient.SendEntityUpdate(parts[i], flags[i]);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5532,31 +5522,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendAttachmentScheduleUpdate(SceneObjectPart part)
|
|
||||||
{
|
|
||||||
if (IsChildAgent || IsInTransit)
|
|
||||||
return;
|
|
||||||
|
|
||||||
PrimUpdateFlags flag = part.GetAndClearUpdateFlag();
|
|
||||||
|
|
||||||
ControllingClient.SendEntityUpdate(part, flag);
|
|
||||||
|
|
||||||
if (part.ParentGroup.HasPrivateAttachmentPoint)
|
|
||||||
return;
|
|
||||||
|
|
||||||
List<ScenePresence> allPresences = m_scene.GetScenePresences();
|
|
||||||
foreach (ScenePresence p in allPresences)
|
|
||||||
{
|
|
||||||
if (p == this)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (ParcelHideThisAvatar && currentParcelUUID != p.currentParcelUUID && !p.IsViewerUIGod)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
p.ControllingClient.SendEntityUpdate(part, flag);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SendAttachmentUpdate(SceneObjectPart part, PrimUpdateFlags flag)
|
public void SendAttachmentUpdate(SceneObjectPart part, PrimUpdateFlags flag)
|
||||||
{
|
{
|
||||||
if (IsChildAgent || IsInTransit)
|
if (IsChildAgent || IsInTransit)
|
||||||
|
|
Loading…
Reference in New Issue