Changes UpdateFlag in SOP to an enumeration of NONE, TERSE and FULL.

UpdateFlag is now referenced/used only within SOP and SOG. Outsiders are
using ScheduleFullUpdate, ScheduleTerseUpdate or ClearUpdateSchedule on
SOP consistently now. Also started working toward eliminating those
calls to ScheduleFullUpdate, ScheduleTerseUpdate or ClearUpdateSchedule
from outside SOP in favor of just setting properties on SOP and let SOP
decide if an update should be scheduled. This consolidates the update
policy within SOP and the client rather than everywhere that makes
changes to SOP. Some places forget to call update while others call it
multiple times, "just to be sure".

UpdateFlag and Schedule*Update will both be made private shortly.

UpdateFlag is intended to be transient and internal to SOP so it has
been removed from XML serializer for SOPs.
This commit is contained in:
Dan Lake
2011-11-02 14:59:00 -07:00
parent 7c8bfac11b
commit e2c51a977d
11 changed files with 76 additions and 91 deletions

View File

@@ -3330,10 +3330,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
protected void TargetOmega(SceneObjectPart part, LSL_Vector axis, double spinrate, double gain)
{
part.AngularVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate));
part.ScheduleTerseUpdate();
part.SendTerseUpdateToAllClients();
part.ParentGroup.HasGroupChanged = true;
part.UpdateAngularVelocity(new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)));
}
public LSL_Integer llGetStartParameter()
@@ -3595,11 +3592,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
parentPrim = targetPart.ParentGroup;
childPrim = m_host.ParentGroup;
}
// byte uf = childPrim.RootPart.UpdateFlag;
childPrim.RootPart.UpdateFlag = 0;
// Required for linking
childPrim.RootPart.ClearUpdateSchedule();
parentPrim.LinkToGroup(childPrim);
// if (uf != (Byte)0)
// parent.RootPart.UpdateFlag = uf;
}
parentPrim.TriggerScriptChangedEvent(Changed.LINK);
@@ -3680,7 +3676,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
parts.Remove(newRoot);
foreach (SceneObjectPart part in parts)
{
part.UpdateFlag = 0;
// Required for linking
part.ClearUpdateSchedule();
newRoot.ParentGroup.LinkToGroup(part.ParentGroup);
}
newRoot.ParentGroup.HasGroupChanged = true;