Ditto...More work on the AllNewSceneObject* classes.
parent
dde8aafb8a
commit
ad21cb2ea8
|
@ -19,7 +19,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
protected Dictionary<LLUUID, AllNewSceneObjectPart2> m_parts = new Dictionary<LLUUID, AllNewSceneObjectPart2>();
|
protected Dictionary<LLUUID, AllNewSceneObjectPart2> m_parts = new Dictionary<LLUUID, AllNewSceneObjectPart2>();
|
||||||
|
|
||||||
protected ulong m_regionHandle;
|
protected ulong m_regionHandle;
|
||||||
protected Scene m_scene;
|
|
||||||
|
|
||||||
public event PrimCountTaintedDelegate OnPrimCountTainted;
|
public event PrimCountTaintedDelegate OnPrimCountTainted;
|
||||||
|
|
||||||
|
@ -54,8 +53,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
m_scene = world;
|
m_scene = world;
|
||||||
|
|
||||||
this.Pos = pos;
|
this.Pos = pos;
|
||||||
this.m_rootPart = new AllNewSceneObjectPart2(m_regionHandle, this, ownerID, localID, shape, pos);
|
LLVector3 rootOffset = new LLVector3(0, 0, 0);
|
||||||
this.m_parts.Add(this.m_rootPart.UUID, this.m_rootPart);
|
AllNewSceneObjectPart2 newPart = new AllNewSceneObjectPart2(m_regionHandle, this, ownerID, localID, shape, rootOffset);
|
||||||
|
this.m_parts.Add(newPart.UUID, newPart);
|
||||||
|
this.SetPartAsRoot(newPart);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -63,7 +64,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void FlagGroupForFullUpdate()
|
public void FlagGroupForFullUpdate()
|
||||||
{
|
{
|
||||||
|
foreach (AllNewSceneObjectPart2 part in this.m_parts.Values)
|
||||||
|
{
|
||||||
|
part.SendFullUpdateToAllClients();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -71,7 +75,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void FlagGroupForTerseUpdate()
|
public void FlagGroupForTerseUpdate()
|
||||||
{
|
{
|
||||||
|
foreach (AllNewSceneObjectPart2 part in this.m_parts.Values)
|
||||||
|
{
|
||||||
|
part.SendTerseUpdateToALLClients();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -413,5 +420,14 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public List<ScenePresence> RequestSceneAvatars()
|
||||||
|
{
|
||||||
|
return m_scene.RequestAvatarList();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -316,16 +316,25 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Update Scheduling
|
#region Update Scheduling
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
private void ClearUpdateSchedule()
|
private void ClearUpdateSchedule()
|
||||||
{
|
{
|
||||||
m_updateFlag = 0;
|
m_updateFlag = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
private void ScheduleFullUpdate()
|
private void ScheduleFullUpdate()
|
||||||
{
|
{
|
||||||
m_updateFlag = 2;
|
m_updateFlag = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
private void ScheduleTerseUpdate()
|
private void ScheduleTerseUpdate()
|
||||||
{
|
{
|
||||||
if (m_updateFlag < 1)
|
if (m_updateFlag < 1)
|
||||||
|
@ -333,6 +342,26 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
m_updateFlag = 1;
|
m_updateFlag = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public void SendScheduledUpdates()
|
||||||
|
{
|
||||||
|
if (m_updateFlag == 1) //some change has been made so update the clients
|
||||||
|
{
|
||||||
|
SendTerseUpdateToALLClients();
|
||||||
|
ClearUpdateSchedule();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (m_updateFlag == 2) // is a new prim just been created/reloaded or has major changes
|
||||||
|
{
|
||||||
|
SendFullUpdateToAllClients();
|
||||||
|
ClearUpdateSchedule();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Shape
|
#region Shape
|
||||||
|
@ -389,7 +418,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
this.m_Shape.ExtraParams[i++] = (byte)((length >> 24) % 256);
|
this.m_Shape.ExtraParams[i++] = (byte)((length >> 24) % 256);
|
||||||
Array.Copy(data, 0, this.m_Shape.ExtraParams, i, data.Length);
|
Array.Copy(data, 0, this.m_Shape.ExtraParams, i, data.Length);
|
||||||
|
|
||||||
//this.ScheduleFullUpdate();
|
this.ScheduleFullUpdate();
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -442,6 +471,18 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Client Update Methods
|
#region Client Update Methods
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public void SendFullUpdateToAllClients()
|
||||||
|
{
|
||||||
|
List<ScenePresence> avatars = this.m_parentGroup.RequestSceneAvatars();
|
||||||
|
for (int i = 0; i < avatars.Count; i++)
|
||||||
|
{
|
||||||
|
SendFullUpdateToClient(avatars[i].ControllingClient);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -457,6 +498,18 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
OwnerID, m_text, ParentID, this.m_particleSystem);
|
OwnerID, m_text, ParentID, this.m_particleSystem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public void SendTerseUpdateToALLClients()
|
||||||
|
{
|
||||||
|
List<ScenePresence> avatars = this.m_parentGroup.RequestSceneAvatars();
|
||||||
|
for (int i = 0; i < avatars.Count; i++)
|
||||||
|
{
|
||||||
|
SendTerseUpdateToClient(avatars[i].ControllingClient);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue