/// <summary> /// Schedule a terse update for this prim. Terse updates only send position, /// rotation, velocity, rotational velocity and shape information. /// </summary> public void ScheduleTerseUpdate() { if (m_updateFlag != InternalUpdateFlags.FullUpdate) { if (m_updateFlag != InternalUpdateFlags.TerseUpdate) CRC++; if (m_parentGroup != null) { //m_parentGroup.HasGroupChanged = true; m_parentGroup.QueueForUpdateCheck(); } TimeStampTerse = (uint) Util.UnixTimeSinceEpoch(); m_updateFlag = InternalUpdateFlags.TerseUpdate; } }
/// <summary> /// Schedules this prim for a full update /// </summary> public void ScheduleFullUpdate(PrimUpdateFlags UpdateFlags) { // m_log.DebugFormat("[SCENE OBJECT PART]: Scheduling full update for {0} {1}", Name, LocalId); if (m_parentGroup != null) { m_parentGroup.QueueForUpdateCheck(); } int timeNow = Util.UnixTimeSinceEpoch(); // If multiple updates are scheduled on the same second, we still need to perform all of them // So we'll force the issue by bumping up the timestamp so that later processing sees these need // to be performed. if (timeNow <= TimeStampFull) { TimeStampFull += 1; } else { TimeStampFull = (uint)timeNow; } if (UpdateFlags == PrimUpdateFlags.FindBest) { //Add the defaults UpdateFlags = PrimUpdateFlags.None; UpdateFlags |= PrimUpdateFlags.ClickAction; UpdateFlags |= PrimUpdateFlags.ExtraData; UpdateFlags |= PrimUpdateFlags.Shape; UpdateFlags |= PrimUpdateFlags.Material; UpdateFlags |= PrimUpdateFlags.Textures; UpdateFlags |= PrimUpdateFlags.Rotation; UpdateFlags |= PrimUpdateFlags.PrimFlags; UpdateFlags |= PrimUpdateFlags.Position; UpdateFlags |= PrimUpdateFlags.AngularVelocity; } //Must send these as well if (Text != "") UpdateFlags |= PrimUpdateFlags.Text; if (AngularVelocity != Vector3.Zero) UpdateFlags |= PrimUpdateFlags.AngularVelocity; if (TextureAnimation != null && TextureAnimation.Length != 0) UpdateFlags |= PrimUpdateFlags.TextureAnim; if (Sound != UUID.Zero) UpdateFlags |= PrimUpdateFlags.Sound; if (ParticleSystem != null && ParticleSystem.Length != 0) UpdateFlags |= PrimUpdateFlags.Particles; if (CurrentMediaVersion != "x-mv:0000000001/00000000-0000-0000-0000-000000000000") UpdateFlags |= PrimUpdateFlags.MediaURL; if (m_parentGroup != null) if (ParentGroup.ChildrenList.Count != 1) UpdateFlags |= PrimUpdateFlags.ParentID; m_neededUpdateFlags |= UpdateFlags; m_updateFlag = InternalUpdateFlags.FullUpdate; //Increment the CRC code so that the client won't be sent a cached update CRC++; // m_log.DebugFormat( // "[SCENE OBJECT PART]: Scheduling full update for {0}, {1} at {2}", // UUID, Name, TimeStampFull); }
public void SetUpdateFlag(InternalUpdateFlags flag) { //Full update overrides all and no update overrides all if (m_updateFlag != InternalUpdateFlags.FullUpdate || flag == InternalUpdateFlags.NoUpdate) m_updateFlag = flag; }
/// <summary> /// Clear all pending updates of parts to clients /// </summary> public void ClearUpdateSchedule() { m_updateFlag = InternalUpdateFlags.NoUpdate; m_neededUpdateFlags = PrimUpdateFlags.None; }
public void SetGroup(UUID groupID, IClientAPI client) { _groupID = groupID; if (client != null) GetProperties(client); m_updateFlag = InternalUpdateFlags.FullUpdate; }
/// <summary> /// Schedules this prim for a full update /// </summary> public void ScheduleFullUpdate(PrimUpdateFlags UpdateFlags) { // m_log.DebugFormat("[SCENE OBJECT PART]: Scheduling full update for {0} {1}", Name, LocalId); if (m_parentGroup != null) { m_parentGroup.QueueForUpdateCheck(); } int timeNow = Util.UnixTimeSinceEpoch(); // If multiple updates are scheduled on the same second, we still need to perform all of them // So we'll force the issue by bumping up the timestamp so that later processing sees these need // to be performed. if (timeNow <= TimeStampFull) { TimeStampFull += 1; } else { TimeStampFull = (uint)timeNow; } if (UpdateFlags == PrimUpdateFlags.FindBest) { UpdateFlags = PrimUpdateFlags.None; if (Text != "") UpdateFlags |= PrimUpdateFlags.Text; if (TextureAnimation.Length != 0) UpdateFlags |= PrimUpdateFlags.TextureAnim; if (Sound != UUID.Zero) UpdateFlags |= PrimUpdateFlags.Sound; if (ParticleSystem.Length != 0) UpdateFlags |= PrimUpdateFlags.Particles; if (CurrentMediaVersion != "x-mv:0000000001/00000000-0000-0000-0000-000000000000") UpdateFlags |= PrimUpdateFlags.MediaURL; UpdateFlags |= PrimUpdateFlags.ClickAction; UpdateFlags |= PrimUpdateFlags.ExtraData; UpdateFlags |= PrimUpdateFlags.Shape; UpdateFlags |= PrimUpdateFlags.Material; UpdateFlags |= PrimUpdateFlags.Textures; UpdateFlags |= PrimUpdateFlags.Rotation; UpdateFlags |= PrimUpdateFlags.PrimFlags; UpdateFlags |= PrimUpdateFlags.Position; } //Needs to be outside, otherwise compressed updates will be screwy with groups if (ParentGroup.ChildrenList.Count != 1) UpdateFlags |= PrimUpdateFlags.ParentID; m_neededUpdateFlags |= UpdateFlags; m_updateFlag = InternalUpdateFlags.FullUpdate; //Experimental for now //if ((UpdateFlags & PrimUpdateFlags.FullUpdate) == 0) CRC++; // m_log.DebugFormat( // "[SCENE OBJECT PART]: Scheduling full update for {0}, {1} at {2}", // UUID, Name, TimeStampFull); }