Changed interface of ScheduleFullUpdate and ScheduleTerseUpdate, and pass a list of updatedProperties as the argument.

dsg
Huaiyu (Kitty) Liu 2011-02-14 13:54:34 -08:00
parent 2b2eb4dbe3
commit 41c85d9fd1
20 changed files with 130 additions and 88 deletions

View File

@ -612,7 +612,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
so.IsSelected = false; // fudge....
//so.ScheduleGroupForFullUpdate();
so.ScheduleGroupForFullUpdate(SceneObjectPartProperties.FullUpdate); //just force it to sychronize all properties
so.ScheduleGroupForFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.FullUpdate}); //just force it to sychronize all properties
}
// In case it is later dropped again, don't let

View File

@ -49,6 +49,8 @@ using OSDMap = OpenMetaverse.StructuredData.OSDMap;
using OpenSim.Framework.Capabilities;
using ExtraParamType = OpenMetaverse.ExtraParamType;
using System.Collections.Generic;
namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
{
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
@ -353,7 +355,7 @@ namespace OpenSim.Region.CoreModules.Avatar.ObjectCaps
}
//rootGroup.ScheduleGroupForFullUpdate();
rootGroup.ScheduleGroupForFullUpdate(SceneObjectPartProperties.FullUpdate); //seems like new object
rootGroup.ScheduleGroupForFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.FullUpdate}); //seems like new object
pos = m_scene.GetNewRezLocation(Vector3.Zero, rootpos, UUID.Zero, rot, (byte)1, 1, true, allparts[0].GroupScale(), false);
responsedata["int_response_code"] = 200; //501; //410; //404;

View File

@ -1582,7 +1582,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
{
grp.OffsetForNewRegion(oldGroupPosition);
//grp.ScheduleGroupForFullUpdate();
grp.ScheduleGroupForFullUpdate(SceneObjectPartProperties.Position);
grp.ScheduleGroupForFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.Position});
}
}

View File

@ -601,7 +601,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
if (!attachment)
{
//group.ScheduleGroupForFullUpdate();
group.ScheduleGroupForFullUpdate(SceneObjectPartProperties.FullUpdate); //new object
group.ScheduleGroupForFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.FullUpdate}); //new object
float offsetHeight = 0;
pos = m_Scene.GetNewRezLocation(
@ -700,7 +700,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
rootPart.ParentGroup.ResumeScripts();
//rootPart.ScheduleFullUpdate();
rootPart.ScheduleFullUpdate(SceneObjectPartProperties.FullUpdate);
rootPart.ScheduleFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.FullUpdate});
}
if (!m_Scene.Permissions.BypassPermissions())

View File

@ -551,7 +551,7 @@ namespace OpenSim.Region.CoreModules.RegionSync.RegionSyncModule
primToUpdate.OffsetPosition = pos;
parent.HasGroupChanged = true;
//parent.ScheduleGroupForTerseUpdate();
parent.ScheduleGroupForTerseUpdate(SceneObjectPartProperties.OffsetPosition);
parent.ScheduleGroupForTerseUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.OffsetPosition});
}
}

View File

@ -279,7 +279,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid
return m_GridService.LookupQuark(locX, locY, actorType);
}
public bool CleanUpEndpoint(string syncServerID)
{
{
return m_GridService.CleanUpEndpoint(syncServerID);
}
#endregion SYNC SERVER

View File

@ -237,7 +237,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
UpdateMediaUrl(part, UUID.Zero);
//part.ScheduleFullUpdate();
part.ScheduleFullUpdate(SceneObjectPartProperties.MediaUrl);
part.ScheduleFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.MediaUrl});
part.TriggerScriptChangedEvent(Changed.MEDIA);
}
@ -423,8 +423,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
// Arguably, we could avoid sending a full update to the avatar that just changed the texture.
//part.ScheduleFullUpdate();
part.ScheduleFullUpdate(SceneObjectPartProperties.Shape);
part.ScheduleFullUpdate(SceneObjectPartProperties.MediaUrl); //not an efficient way to taint two properties, but should not have bad side effects
part.ScheduleFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.Shape, SceneObjectPartProperties.MediaUrl});
part.TriggerScriptChangedEvent(Changed.MEDIA);
@ -503,7 +502,7 @@ namespace OpenSim.Region.CoreModules.Media.Moap
UpdateMediaUrl(part, agentId);
//part.ScheduleFullUpdate();
part.ScheduleFullUpdate(SceneObjectPartProperties.MediaUrl);
part.ScheduleFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.MediaUrl});
part.TriggerScriptChangedEvent(Changed.MEDIA);

View File

@ -149,7 +149,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell
part.TriggerScriptChangedEvent(Changed.OWNER);
group.ResumeScripts();
//part.ScheduleFullUpdate();
part.ScheduleFullUpdate(SceneObjectPartProperties.FullUpdate); //quite some properties changed, let's just force all to be synchronized
part.ScheduleFullUpdate(new List<SceneObjectPartProperties>() { SceneObjectPartProperties.FullUpdate }); //quite some properties changed, let's just force all to be synchronized
break;

View File

@ -2198,7 +2198,7 @@ namespace OpenSim.Region.Framework.Scenes
group.CreateScriptInstances(param, true, DefaultScriptEngine, 3);
//group.ScheduleGroupForFullUpdate();
group.ScheduleGroupForFullUpdate(SceneObjectPartProperties.FullUpdate); //new object, all properties have new value
group.ScheduleGroupForFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.FullUpdate}); //new object, all properties have new value
return group;
}
@ -2264,7 +2264,7 @@ namespace OpenSim.Region.Framework.Scenes
sog.SetOwnerId(ownerID);
sog.SetGroup(groupID, remoteClient);
//sog.ScheduleGroupForFullUpdate();
sog.ScheduleGroupForFullUpdate(SceneObjectPartProperties.OwnerID);
sog.ScheduleGroupForFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.OwnerID, SceneObjectPartProperties.GroupID});
SceneObjectPart[] partList = sog.Parts;

View File

@ -213,7 +213,7 @@ namespace OpenSim.Region.Framework.Scenes
isAttachment = true;
else
//part.ParentGroup.ScheduleGroupForFullUpdate();
part.ParentGroup.ScheduleGroupForFullUpdate(SceneObjectPartProperties.IsSelected);
part.ParentGroup.ScheduleGroupForFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.IsSelected});
// If it's not an attachment, and we are allowed to move it,
// then we might have done so. If we moved across a parcel

View File

@ -2392,7 +2392,7 @@ namespace OpenSim.Region.Framework.Scenes
}
//sceneObject.ScheduleGroupForFullUpdate();
sceneObject.ScheduleGroupForFullUpdate(SceneObjectPartProperties.FullUpdate); //new object, all properties have new value
sceneObject.ScheduleGroupForFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.FullUpdate}); //new object, all properties have new value
return sceneObject;
}
@ -4492,7 +4492,7 @@ namespace OpenSim.Region.Framework.Scenes
if (ent is SceneObjectGroup)
{
//((SceneObjectGroup)ent).ScheduleGroupForFullUpdate();
((SceneObjectGroup)ent).ScheduleGroupForFullUpdate(SceneObjectPartProperties.None); //This is not due to property being updated, hence passing "None" property.
((SceneObjectGroup)ent).ScheduleGroupForFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.None}); //This is not due to property being updated, hence passing "None" property.
}
}
}

View File

@ -384,7 +384,7 @@ namespace OpenSim.Region.Framework.Scenes
if (sendClientUpdates)
//sceneObject.ScheduleGroupForFullUpdate();
sceneObject.ScheduleGroupForFullUpdate(SceneObjectPartProperties.None);
sceneObject.ScheduleGroupForFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.None});
Entities.Add(sceneObject);
@ -1895,7 +1895,7 @@ namespace OpenSim.Region.Framework.Scenes
copy.CreateScriptInstances(0, false, m_parentScene.DefaultScriptEngine, 1);
copy.HasGroupChanged = true;
//copy.ScheduleGroupForFullUpdate();
copy.ScheduleGroupForFullUpdate(SceneObjectPartProperties.FullUpdate); //new object, all property values are new
copy.ScheduleGroupForFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.FullUpdate}); //new object, all property values are new
copy.ResumeScripts();
// required for physics to update it's position
@ -1964,7 +1964,7 @@ namespace OpenSim.Region.Framework.Scenes
{
//if we need to debug the script engine with a viewer attaching to it,
//we need to schedule updates to be sent to the viewer
oldSog.ScheduleGroupForFullUpdate(SceneObjectPartProperties.None);
oldSog.ScheduleGroupForFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.None});
}
}
else

View File

@ -1023,7 +1023,7 @@ namespace OpenSim.Region.Framework.Scenes
AttachToBackup();
m_scene.EventManager.TriggerParcelPrimCountTainted();
//m_rootPart.ScheduleFullUpdate();
m_rootPart.ScheduleFullUpdate(SceneObjectPartProperties.AttachmentPoint); //Physics properties, such as Position, OffsetPosition, etc, should be tainted in ApplyPhysics()
m_rootPart.ScheduleFullUpdate(new List<SceneObjectPartProperties>() { SceneObjectPartProperties.GroupPosition, SceneObjectPartProperties.AttachmentPoint}); //Physics properties, such as Position, OffsetPosition, etc, should be tainted in ApplyPhysics()
m_rootPart.ClearUndoState();
}
@ -1297,7 +1297,7 @@ namespace OpenSim.Region.Framework.Scenes
}
//ScheduleGroupForFullUpdate();
ScheduleGroupForFullUpdate(SceneObjectPartProperties.Flags);
ScheduleGroupForFullUpdate(new List<SceneObjectPartProperties>(){ SceneObjectPartProperties.Flags}); //do we also need to synchronize SOG properties such as m_scriptListens_atRotTarget? (does any acotr other than script engine care about it?)
}
public void SetText(string text, Vector3 color, double alpha)
@ -1310,7 +1310,7 @@ namespace OpenSim.Region.Framework.Scenes
HasGroupChanged = true;
//m_rootPart.ScheduleFullUpdate();
m_rootPart.ScheduleFullUpdate(SceneObjectPartProperties.Text);
m_rootPart.ScheduleFullUpdate(new List<SceneObjectPartProperties>() {SceneObjectPartProperties.Text, SceneObjectPartProperties.Color});
}
/// <summary>
@ -1545,7 +1545,7 @@ namespace OpenSim.Region.Framework.Scenes
dupe.AttachToBackup();
//ScheduleGroupForFullUpdate();
ScheduleGroupForFullUpdate(SceneObjectPartProperties.None); //This full-update is triggered by copying, no property changed
ScheduleGroupForFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.FullUpdate});
}
return dupe;
@ -1799,7 +1799,7 @@ namespace OpenSim.Region.Framework.Scenes
}
//part.ScheduleFullUpdate();
part.ScheduleFullUpdate(SceneObjectPartProperties.OwnerID);
part.ScheduleFullUpdate(new List<SceneObjectPartProperties>() {SceneObjectPartProperties.OwnerID, SceneObjectPartProperties.GroupID, SceneObjectPartProperties.LastOwnerID});
}
/// <summary>
@ -1925,14 +1925,14 @@ namespace OpenSim.Region.Framework.Scenes
/// Schedule a full update for this scene object
/// </summary>
//public void ScheduleGroupForFullUpdate()
public void ScheduleGroupForFullUpdate(SceneObjectPartProperties property)
public void ScheduleGroupForFullUpdate(List<SceneObjectPartProperties> updatedProperties)
{
// if (IsAttachment)
// m_log.DebugFormat("[SOG]: Scheduling full update for {0} {1}", Name, LocalId);
checkAtTargets();
//RootPart.ScheduleFullUpdate();
RootPart.ScheduleFullUpdate(property);
RootPart.ScheduleFullUpdate(updatedProperties);
SceneObjectPart[] parts = m_parts.GetArray();
for (int i = 0; i < parts.Length; i++)
@ -1940,7 +1940,7 @@ namespace OpenSim.Region.Framework.Scenes
SceneObjectPart part = parts[i];
if (part != RootPart)
//part.ScheduleFullUpdate();
part.ScheduleFullUpdate(property);
part.ScheduleFullUpdate(updatedProperties);
}
}
@ -1948,14 +1948,14 @@ namespace OpenSim.Region.Framework.Scenes
/// Schedule a terse update for this scene object
/// </summary>
//public void ScheduleGroupForTerseUpdate()
public void ScheduleGroupForTerseUpdate(SceneObjectPartProperties property)
public void ScheduleGroupForTerseUpdate(List<SceneObjectPartProperties> updatedProperties)
{
// m_log.DebugFormat("[SOG]: Scheduling terse update for {0} {1}", Name, UUID);
SceneObjectPart[] parts = m_parts.GetArray();
for (int i = 0; i < parts.Length; i++)
//parts[i].ScheduleTerseUpdate();
parts[i].ScheduleTerseUpdate(property);
parts[i].ScheduleTerseUpdate(updatedProperties);
}
/// <summary>
@ -2714,7 +2714,7 @@ namespace OpenSim.Region.Framework.Scenes
HasGroupChanged = true;
part.TriggerScriptChangedEvent(Changed.SCALE);
//ScheduleGroupForFullUpdate();
ScheduleGroupForFullUpdate(SceneObjectPartProperties.None); //above actions only update Scale for the given part, and part.Resize() will taint Scale as updated
ScheduleGroupForFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.None}); //above actions only update Scale for the given part, and part.Resize() will taint Scale as updated
//if (part.UUID == m_rootPart.UUID)
//{
@ -2867,7 +2867,7 @@ namespace OpenSim.Region.Framework.Scenes
HasGroupChanged = true;
m_rootPart.TriggerScriptChangedEvent(Changed.SCALE);
//ScheduleGroupForTerseUpdate();
ScheduleGroupForTerseUpdate(SceneObjectPartProperties.Scale);
ScheduleGroupForTerseUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.Scale});
}
}
@ -2909,7 +2909,7 @@ namespace OpenSim.Region.Framework.Scenes
//we need to do a terse update even if the move wasn't allowed
// so that the position is reset in the client (the object snaps back)
//ScheduleGroupForTerseUpdate();
ScheduleGroupForTerseUpdate(SceneObjectPartProperties.GroupPosition);
ScheduleGroupForTerseUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.GroupPosition});
}
/// <summary>
@ -2973,7 +2973,7 @@ namespace OpenSim.Region.Framework.Scenes
HasGroupChanged = true;
//ScheduleGroupForTerseUpdate();
ScheduleGroupForTerseUpdate(SceneObjectPartProperties.Position);
ScheduleGroupForTerseUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.Position, SceneObjectPartProperties.OffsetPosition});
}
public void OffsetForNewRegion(Vector3 offset)
@ -3006,7 +3006,7 @@ namespace OpenSim.Region.Framework.Scenes
HasGroupChanged = true;
//ScheduleGroupForTerseUpdate();
ScheduleGroupForTerseUpdate(SceneObjectPartProperties.None); //Above actions only update m_rootPart's RotationOffset, and m_rootPart.UpdateRotation will taint RotationOffset as updated
ScheduleGroupForTerseUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.Orientation}); //Above actions only update m_rootPart's RotationOffset, and m_rootPart.UpdateRotation will taint RotationOffset as updated
}
/// <summary>
@ -3033,7 +3033,7 @@ namespace OpenSim.Region.Framework.Scenes
HasGroupChanged = true;
//ScheduleGroupForTerseUpdate();
ScheduleGroupForTerseUpdate(SceneObjectPartProperties.Position); //RotationOffset is only updated for m_rootPart, and m_rootPart.UpdateRotation should already taint RotationOffset as updated
ScheduleGroupForTerseUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.Position, SceneObjectPartProperties.Orientation}); //RotationOffset is only updated for m_rootPart, and m_rootPart.UpdateRotation should already taint RotationOffset as updated
}
/// <summary>
@ -3121,7 +3121,7 @@ namespace OpenSim.Region.Framework.Scenes
newRot *= Quaternion.Inverse(axRot);
prim.RotationOffset = newRot;
//prim.ScheduleTerseUpdate();
prim.ScheduleTerseUpdate(SceneObjectPartProperties.RotationOffset | SceneObjectPartProperties.OffsetPosition);
prim.ScheduleTerseUpdate(new List<SceneObjectPartProperties>(){ SceneObjectPartProperties.RotationOffset, SceneObjectPartProperties.OffsetPosition});
}
}
@ -3136,7 +3136,7 @@ namespace OpenSim.Region.Framework.Scenes
}
//m_rootPart.ScheduleTerseUpdate();
m_rootPart.ScheduleTerseUpdate(SceneObjectPartProperties.RotationOffset);
m_rootPart.ScheduleTerseUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.RotationOffset});
}
#endregion

View File

@ -2752,7 +2752,7 @@ namespace OpenSim.Region.Framework.Scenes
//m_parentGroup.RootPart.m_groupPosition = newpos;
}
//ScheduleTerseUpdate();
ScheduleTerseUpdate(SceneObjectPartProperties.Position);
ScheduleTerseUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.Position});
//SendTerseUpdateToAllClients();
}
@ -2843,7 +2843,7 @@ namespace OpenSim.Region.Framework.Scenes
ParentGroup.HasGroupChanged = true;
//ScheduleFullUpdate();
ScheduleFullUpdate(SceneObjectPartProperties.Scale);
ScheduleFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.Scale});
}
public void RotLookAt(Quaternion target, float strength, float damping)
@ -2886,7 +2886,7 @@ namespace OpenSim.Region.Framework.Scenes
/// Schedules this prim for a full update
/// </summary>
//public void ScheduleFullUpdate() :: SYMMETRIC SYNC: changed the interface so that we can identify which property triggers calling this function
public virtual void ScheduleFullUpdate(SceneObjectPartProperties sopProperty)
public virtual void ScheduleFullUpdate(List<SceneObjectPartProperties> updatedProperties)
{
// m_log.DebugFormat("[SCENE OBJECT PART]: Scheduling full update for {0} {1}", Name, LocalId);
@ -2921,7 +2921,7 @@ namespace OpenSim.Region.Framework.Scenes
/// rotation, velocity, rotational velocity and shape information.
/// </summary>
//public void ScheduleTerseUpdate()
public virtual void ScheduleTerseUpdate(SceneObjectPartProperties sopProperty)
public virtual void ScheduleTerseUpdate(List<SceneObjectPartProperties> updatedProperties)
{
if (m_updateFlag < 1)
{
@ -3623,7 +3623,7 @@ namespace OpenSim.Region.Framework.Scenes
ParentGroup.HasGroupChanged = true;
//ScheduleFullUpdate();
ScheduleFullUpdate(SceneObjectPartProperties.Text);
ScheduleFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.Text});
}
public void StopLookAt()
@ -3631,7 +3631,7 @@ namespace OpenSim.Region.Framework.Scenes
m_parentGroup.stopLookAt();
//m_parentGroup.ScheduleGroupForTerseUpdate();
m_parentGroup.ScheduleGroupForTerseUpdate(SceneObjectPartProperties.None);//in stopLookAt(), PhysicsActor shall already take care of tainting which properties have been updated
m_parentGroup.ScheduleGroupForTerseUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.None});//in stopLookAt(), PhysicsActor shall already take care of tainting which properties have been updated
}
/// <summary>
@ -3654,7 +3654,7 @@ namespace OpenSim.Region.Framework.Scenes
m_parentGroup.stopMoveToTarget();
//m_parentGroup.ScheduleGroupForTerseUpdate();
m_parentGroup.ScheduleGroupForTerseUpdate(SceneObjectPartProperties.None); //in stopMoveToTarget(), PhysicsActor shall already take care of tainting which properties have been updated
m_parentGroup.ScheduleGroupForTerseUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.None}); //in stopMoveToTarget(), PhysicsActor shall already take care of tainting which properties have been updated
//m_parentGroup.ScheduleGroupForFullUpdate();
}
@ -4203,7 +4203,7 @@ namespace OpenSim.Region.Framework.Scenes
ParentGroup.HasGroupChanged = true;
//ScheduleFullUpdate();
ScheduleFullUpdate(SceneObjectPartProperties.Shape);
ScheduleFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.Shape});
}
public void UpdateGroupPosition(Vector3 pos)
@ -4215,7 +4215,7 @@ namespace OpenSim.Region.Framework.Scenes
Vector3 newPos = new Vector3(pos.X, pos.Y, pos.Z);
GroupPosition = newPos;
//ScheduleTerseUpdate();
ScheduleFullUpdate(SceneObjectPartProperties.GroupPosition);
ScheduleFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.GroupPosition});
}
}
@ -4248,7 +4248,7 @@ namespace OpenSim.Region.Framework.Scenes
OffsetPosition = newPos;
//ScheduleTerseUpdate();
ScheduleFullUpdate(SceneObjectPartProperties.OffsetPosition);
ScheduleFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.OffsetPosition});
}
}
@ -4538,7 +4538,7 @@ namespace OpenSim.Region.Framework.Scenes
ParentGroup.HasGroupChanged = true;
//ScheduleFullUpdate();
ScheduleFullUpdate(SceneObjectPartProperties.Flags);
ScheduleFullUpdate(new List<SceneObjectPartProperties>() { SceneObjectPartProperties.Flags});
}
public void UpdateRotation(Quaternion rot)
@ -4551,7 +4551,7 @@ namespace OpenSim.Region.Framework.Scenes
RotationOffset = rot;
ParentGroup.HasGroupChanged = true;
//ScheduleTerseUpdate();
ScheduleFullUpdate(SceneObjectPartProperties.RotationOffset);
ScheduleFullUpdate(new List<SceneObjectPartProperties>() {SceneObjectPartProperties.RotationOffset});
}
}
@ -4597,7 +4597,7 @@ namespace OpenSim.Region.Framework.Scenes
ParentGroup.HasGroupChanged = true;
TriggerScriptChangedEvent(Changed.SHAPE);
//ScheduleFullUpdate();
ScheduleFullUpdate(SceneObjectPartProperties.Shape);
ScheduleFullUpdate(new List<SceneObjectPartProperties>() {SceneObjectPartProperties.Shape});
}
/// <summary>
@ -4645,7 +4645,7 @@ namespace OpenSim.Region.Framework.Scenes
//ParentGroup.ScheduleGroupForFullUpdate();
//This is sparta
//ScheduleFullUpdate();
ScheduleFullUpdate(SceneObjectPartProperties.Shape);
ScheduleFullUpdate(new List<SceneObjectPartProperties>() {SceneObjectPartProperties.Shape});
}
public void aggregateScriptEvents()
@ -4714,7 +4714,7 @@ namespace OpenSim.Region.Framework.Scenes
// m_log.DebugFormat(
// "[SCENE OBJECT PART]: Scheduling part {0} {1} for full update in aggregateScriptEvents() since m_parentGroup == null", Name, LocalId);
//ScheduleFullUpdate();
ScheduleFullUpdate(SceneObjectPartProperties.Flags);
ScheduleFullUpdate(new List<SceneObjectPartProperties>() { SceneObjectPartProperties.Flags, SceneObjectPartProperties.AggregateScriptEvents});
return;
}
@ -4738,7 +4738,7 @@ namespace OpenSim.Region.Framework.Scenes
// m_log.DebugFormat(
// "[SCENE OBJECT PART]: Scheduling part {0} {1} for full update in aggregateScriptEvents()", Name, LocalId);
//ScheduleFullUpdate();
ScheduleFullUpdate(SceneObjectPartProperties.Flags);
ScheduleFullUpdate(new List<SceneObjectPartProperties>() { SceneObjectPartProperties.Flags, SceneObjectPartProperties.AggregateScriptEvents});
}
}
@ -5143,7 +5143,8 @@ namespace OpenSim.Region.Framework.Scenes
IsPhysical,
Flying,
Buoyancy,
//To be handled in serialization/deserizaltion for synchronization
//TODO!!!! To be handled in serialization/deserizaltion for synchronization
AggregateScriptEvents,
IsSelected,
AttachmentPoint,
AttachedPos,
@ -5648,16 +5649,24 @@ namespace OpenSim.Region.Framework.Scenes
}
public override void ScheduleFullUpdate(SceneObjectPartProperties property)
public override void ScheduleFullUpdate(List<SceneObjectPartProperties> updatedProperties)
{
base.ScheduleFullUpdate(property);
TaintBucketSyncInfo(property);
foreach (SceneObjectPartProperties property in updatedProperties)
{
TaintBucketSyncInfo(property);
}
base.ScheduleFullUpdate(updatedProperties);
//TaintBucketSyncInfo(property);
}
public override void ScheduleTerseUpdate(SceneObjectPartProperties property)
public override void ScheduleTerseUpdate(List<SceneObjectPartProperties> updatedProperties)
{
base.ScheduleTerseUpdate(property);
TaintBucketSyncInfo(property);
foreach (SceneObjectPartProperties property in updatedProperties)
{
TaintBucketSyncInfo(property);
}
base.ScheduleTerseUpdate(updatedProperties);
//TaintBucketSyncInfo(property);
}
/// <summary>

View File

@ -294,7 +294,7 @@ namespace OpenSim.Region.Framework.Scenes
m_part.ParentGroup.Scene.EventManager.TriggerRezScript(
m_part.LocalId, item.ItemID, String.Empty, startParam, postOnRez, engine, stateSource);
m_part.ParentGroup.AddActiveScriptCount(1);
m_part.ScheduleFullUpdate(SceneObjectPartProperties.Flags | SceneObjectPartProperties.TaskInventory);
m_part.ScheduleFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.Flags, SceneObjectPartProperties.TaskInventory});
return;
}
@ -322,7 +322,7 @@ namespace OpenSim.Region.Framework.Scenes
m_part.ParentGroup.Scene.EventManager.TriggerRezScript(
m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource);
m_part.ParentGroup.AddActiveScriptCount(1);
m_part.ScheduleFullUpdate(SceneObjectPartProperties.Flags | SceneObjectPartProperties.TaskInventory);
m_part.ScheduleFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.Flags, SceneObjectPartProperties.TaskInventory});
}
}
}
@ -546,7 +546,7 @@ namespace OpenSim.Region.Framework.Scenes
m_part.ParentGroup.HasGroupChanged = true;
//SYMMETRIC SYNC: add ScheduleFullUpdate to enable synchronization across actors
m_part.ScheduleFullUpdate(SceneObjectPartProperties.TaskInventory | SceneObjectPartProperties.InventorySerial);
m_part.ScheduleFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.TaskInventory, SceneObjectPartProperties.InventorySerial});
}
/// <summary>
@ -766,7 +766,7 @@ namespace OpenSim.Region.Framework.Scenes
if (!ContainsScripts())
m_part.RemFlag(PrimFlags.Scripted);
m_part.ScheduleFullUpdate(SceneObjectPartProperties.TaskInventory);
m_part.ScheduleFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.TaskInventory});
return type;

View File

@ -28,6 +28,8 @@
using OpenMetaverse;
using OpenSim.Region.Framework.Interfaces;
using System.Collections.Generic;
namespace OpenSim.Region.Framework.Scenes
{
public class UndoState
@ -92,7 +94,14 @@ namespace OpenSim.Region.Framework.Scenes
if (Scale != Vector3.Zero)
part.Resize(Scale);
//part.ParentGroup.ScheduleGroupForTerseUpdate();
part.ParentGroup.ScheduleGroupForTerseUpdate(SceneObjectPartProperties.Scale);
//SYMMETRIC SYNC
List<SceneObjectPartProperties> updatedProperties = new List<SceneObjectPartProperties>();
updatedProperties.Add(SceneObjectPartProperties.RotationOffset);
if (Position != Vector3.Zero)
updatedProperties.Add(SceneObjectPartProperties.Position);
if (Scale != Vector3.Zero)
updatedProperties.Add(SceneObjectPartProperties.Scale);
part.ParentGroup.ScheduleGroupForTerseUpdate(updatedProperties);
}
else
{
@ -101,7 +110,14 @@ namespace OpenSim.Region.Framework.Scenes
part.UpdateRotation(Rotation);
if (Scale != Vector3.Zero)
part.Resize(Scale); //part.ScheduleTerseUpdate();
part.ScheduleTerseUpdate(SceneObjectPartProperties.Scale);
//SYMMETRIC SYNC
List<SceneObjectPartProperties> updatedProperties = new List<SceneObjectPartProperties>();
updatedProperties.Add(SceneObjectPartProperties.RotationOffset);
if (Position != Vector3.Zero)
updatedProperties.Add(SceneObjectPartProperties.OffsetPosition);
if (Scale != Vector3.Zero)
updatedProperties.Add(SceneObjectPartProperties.Scale);
part.ScheduleTerseUpdate(updatedProperties);
}
part.Undoing = false;
@ -122,7 +138,15 @@ namespace OpenSim.Region.Framework.Scenes
if (Scale != Vector3.Zero)
part.Resize(Scale);
//part.ParentGroup.ScheduleGroupForTerseUpdate();
part.ParentGroup.ScheduleGroupForTerseUpdate(SceneObjectPartProperties.Scale);
//SYMMETRIC SYNC
List<SceneObjectPartProperties> updatedProperties = new List<SceneObjectPartProperties>();
if (Rotation != Quaternion.Identity)
updatedProperties.Add(SceneObjectPartProperties.RotationOffset);
if (Position != Vector3.Zero)
updatedProperties.Add(SceneObjectPartProperties.Position);
if (Scale != Vector3.Zero)
updatedProperties.Add(SceneObjectPartProperties.Scale);
part.ParentGroup.ScheduleGroupForTerseUpdate(updatedProperties);
}
else
{
@ -133,7 +157,15 @@ namespace OpenSim.Region.Framework.Scenes
if (Scale != Vector3.Zero)
part.Resize(Scale);
//part.ScheduleTerseUpdate();
part.ScheduleTerseUpdate(SceneObjectPartProperties.Scale);
//SYMMETRIC SYNC
List<SceneObjectPartProperties> updatedProperties = new List<SceneObjectPartProperties>();
if (Rotation != Quaternion.Identity)
updatedProperties.Add(SceneObjectPartProperties.RotationOffset);
if (Position != Vector3.Zero)
updatedProperties.Add(SceneObjectPartProperties.Position);
if (Scale != Vector3.Zero)
updatedProperties.Add(SceneObjectPartProperties.Scale);
part.ScheduleTerseUpdate(updatedProperties);
}
part.Undoing = false;

View File

@ -291,7 +291,7 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
((SceneObjectGroup)ent).AttachToBackup();
((SceneObjectGroup)ent).HasGroupChanged = true; // If not true, then attaching to backup does nothing because no change is detected.
//((SceneObjectGroup)ent).ScheduleGroupForFullUpdate();
((SceneObjectGroup)ent).ScheduleGroupForFullUpdate(SceneObjectPartProperties.FullUpdate); //don't know what properties to taint, so just taint all
((SceneObjectGroup)ent).ScheduleGroupForFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.FullUpdate}); //don't know what properties to taint, so just taint all
}
catch(Exception e)
{

View File

@ -641,7 +641,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
s_tree.Scale += copse.m_rate;
s_tree.ParentGroup.HasGroupChanged = true;
//s_tree.ScheduleFullUpdate();
s_tree.ScheduleFullUpdate(SceneObjectPartProperties.Scale);
s_tree.ScheduleFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.Scale});
}
}
else

View File

@ -1412,7 +1412,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.ClickAction = (byte)action;
if (m_host.ParentGroup != null) m_host.ParentGroup.HasGroupChanged = true;
//m_host.ScheduleFullUpdate();
m_host.ScheduleFullUpdate(SceneObjectPartProperties.ClickAction);
m_host.ScheduleFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.ClickAction});
return;
}
@ -1681,7 +1681,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
part.ParentGroup.HasGroupChanged = true;
//part.ScheduleFullUpdate();
part.ScheduleFullUpdate(SceneObjectPartProperties.Shape);
part.ScheduleFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.Shape});
}
/// <summary>
@ -1717,7 +1717,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
part.ParentGroup.HasGroupChanged = true;
//part.ScheduleFullUpdate();
part.ScheduleFullUpdate(SceneObjectPartProperties.Shape);
part.ScheduleFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.Shape});
}
public LSL_Vector llGetColor(int face)
@ -1994,7 +1994,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
SceneObjectGroup parent = part.ParentGroup;
parent.HasGroupChanged = true;
//parent.ScheduleGroupForTerseUpdate();
parent.ScheduleGroupForTerseUpdate(SceneObjectPartProperties.OffsetPosition);
parent.ScheduleGroupForTerseUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.OffsetPosition});
}
}
@ -2341,7 +2341,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.SoundRadius = 20; // Magic number, 20 seems reasonable. Make configurable?
//m_host.ScheduleFullUpdate();
m_host.ScheduleFullUpdate(SceneObjectPartProperties.Sound);
m_host.ScheduleFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.Sound});
m_host.SendFullUpdateToAllClients();
}
@ -2362,7 +2362,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
prim.SoundRadius = 20; // Magic number, 20 seems reasonable. Make configurable?
//prim.ScheduleFullUpdate();
m_host.ScheduleFullUpdate(SceneObjectPartProperties.Sound);
m_host.ScheduleFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.Sound});
prim.SendFullUpdateToAllClients();
}
}
@ -2375,7 +2375,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.SoundRadius = 20; // Magic number, 20 seems reasonable. Make configurable?
//m_host.ScheduleFullUpdate();
m_host.ScheduleFullUpdate(SceneObjectPartProperties.Sound);
m_host.ScheduleFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.Sound});
m_host.SendFullUpdateToAllClients();
}
@ -2418,7 +2418,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
part.SoundFlags = 0;
part.SoundRadius = 0;
//part.ScheduleFullUpdate();
m_host.ScheduleFullUpdate(SceneObjectPartProperties.Sound);
m_host.ScheduleFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.Sound});
part.SendFullUpdateToAllClients();
}
m_host.ParentGroup.LoopSoundMasterPrim = null;
@ -2431,7 +2431,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.SoundFlags = 0;
m_host.SoundRadius = 0;
//m_host.ScheduleFullUpdate();
m_host.ScheduleFullUpdate(SceneObjectPartProperties.Sound);
m_host.ScheduleFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.Sound});
m_host.SendFullUpdateToAllClients();
}
}
@ -2442,7 +2442,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.SoundFlags = 0;
m_host.SoundRadius = 0;
//m_host.ScheduleFullUpdate();
m_host.ScheduleFullUpdate(SceneObjectPartProperties.Sound);
m_host.ScheduleFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.Sound});
m_host.SendFullUpdateToAllClients();
}
}
@ -3370,7 +3370,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1);
m_host.AngularVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate));
//m_host.ScheduleTerseUpdate();
m_host.ScheduleFullUpdate(SceneObjectPartProperties.AngularVelocity);
m_host.ScheduleFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.AngularVelocity});
m_host.SendTerseUpdateToAllClients();
m_host.ParentGroup.HasGroupChanged = true;
}
@ -3660,7 +3660,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
//parentGroup.SyncInfoUpdate();
World.RegionSyncModule.SendLinkObject(parentPrim, parentPrim.RootPart, new List<SceneObjectPart>(childPrim.Parts));
}
m_host.ScheduleFullUpdate(SceneObjectPartProperties.None); //SendLinkObject above will synchronize the link operation, no need to taint updates here
m_host.ScheduleFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.None}); //SendLinkObject above will synchronize the link operation, no need to taint updates here
//end of SYMMETRIC SYNC
if (client != null)
@ -3742,7 +3742,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
World.RegionSyncModule.SendDeLinkObject(parts, beforeDelinkGroups, afterDelinkGroups);
}
parentPrim.ScheduleGroupForFullUpdate(SceneObjectPartProperties.None);
parentPrim.ScheduleGroupForFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.None});
//end of SYMMETRIC SYNC
parentPrim.TriggerScriptChangedEvent(Changed.LINK);
@ -3762,7 +3762,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{
World.RegionSyncModule.SendLinkObject(newRoot.ParentGroup, newRoot, new List<SceneObjectPart>(newRoot.ParentGroup.Parts));
}
newRoot.ParentGroup.ScheduleGroupForFullUpdate(SceneObjectPartProperties.None);
newRoot.ParentGroup.ScheduleGroupForFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.None});
//end of SYMMETRIC SYNC
}
@ -3824,7 +3824,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
afterDelinkGroups.Add(rootPart.ParentGroup);
World.RegionSyncModule.SendDeLinkObject(parts, beforeDelinkGroups, afterDelinkGroups);
}
parentPrim.ScheduleGroupForFullUpdate(SceneObjectPartProperties.None);
parentPrim.ScheduleGroupForFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.None});
//end of SYMMETRIC SYNC
}
@ -4064,7 +4064,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.SetText(text, av3, Util.Clip((float)alpha, 0.0f, 1.0f));
m_host.ParentGroup.HasGroupChanged = true;
//m_host.ParentGroup.ScheduleGroupForFullUpdate();
m_host.ParentGroup.ScheduleGroupForFullUpdate(SceneObjectPartProperties.Text);
m_host.ParentGroup.ScheduleGroupForFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.Text});
}
public LSL_Float llWater(LSL_Vector offset)

View File

@ -2350,7 +2350,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
obj.ParentGroup.HasGroupChanged = true;
//obj.ScheduleFullUpdate();
obj.ScheduleFullUpdate(SceneObjectPartProperties.Shape);
obj.ScheduleFullUpdate(new List<SceneObjectPartProperties>(){SceneObjectPartProperties.Shape});
}