mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Ditto...More work on the AllNewSceneObject* classes.
This commit is contained in:
@@ -316,16 +316,25 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
#endregion
|
||||
|
||||
#region Update Scheduling
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
private void ClearUpdateSchedule()
|
||||
{
|
||||
m_updateFlag = 0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
private void ScheduleFullUpdate()
|
||||
{
|
||||
m_updateFlag = 2;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
private void ScheduleTerseUpdate()
|
||||
{
|
||||
if (m_updateFlag < 1)
|
||||
@@ -333,6 +342,26 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
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
|
||||
|
||||
#region Shape
|
||||
@@ -389,7 +418,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
this.m_Shape.ExtraParams[i++] = (byte)((length >> 24) % 256);
|
||||
Array.Copy(data, 0, this.m_Shape.ExtraParams, i, data.Length);
|
||||
|
||||
//this.ScheduleFullUpdate();
|
||||
this.ScheduleFullUpdate();
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -442,6 +471,18 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
#endregion
|
||||
|
||||
#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>
|
||||
@@ -457,6 +498,18 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
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>
|
||||
|
||||
Reference in New Issue
Block a user