temporary remove the delay on first child updates
parent
a5a31114b2
commit
ddd067266b
|
@ -331,7 +331,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
private float m_sitAvatarHeight = 2.0f;
|
private float m_sitAvatarHeight = 2.0f;
|
||||||
|
|
||||||
private bool childUpdatesActive = false;
|
private bool childUpdatesBusy = false;
|
||||||
private int lastChildUpdatesTime;
|
private int lastChildUpdatesTime;
|
||||||
private Vector3 m_lastChildAgentUpdatePosition;
|
private Vector3 m_lastChildAgentUpdatePosition;
|
||||||
// private Vector3 m_lastChildAgentUpdateCamPosition;
|
// private Vector3 m_lastChildAgentUpdateCamPosition;
|
||||||
|
@ -1033,7 +1033,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
AbsolutePosition = posLastMove = posLastSignificantMove = CameraPosition =
|
AbsolutePosition = posLastMove = posLastSignificantMove = CameraPosition =
|
||||||
m_lastCameraPosition = ControllingClient.StartPos;
|
m_lastCameraPosition = ControllingClient.StartPos;
|
||||||
|
|
||||||
childUpdatesActive = true; // disable it for now
|
childUpdatesBusy = true; // disable it for now
|
||||||
|
|
||||||
m_reprioritization_timer = new Timer(world.ReprioritizationInterval);
|
m_reprioritization_timer = new Timer(world.ReprioritizationInterval);
|
||||||
m_reprioritization_timer.Elapsed += new ElapsedEventHandler(Reprioritize);
|
m_reprioritization_timer.Elapsed += new ElapsedEventHandler(Reprioritize);
|
||||||
|
@ -2036,8 +2036,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_agentTransfer.EnableChildAgents(this);
|
m_agentTransfer.EnableChildAgents(this);
|
||||||
}
|
}
|
||||||
// let updates be sent, with some delay
|
// let updates be sent, with some delay
|
||||||
lastChildUpdatesTime = Util.EnvironmentTickCount() + 10000;
|
// lastChildUpdatesTime = Util.EnvironmentTickCount() + 10000;
|
||||||
childUpdatesActive = false; // allow them
|
// temporary make them on next update
|
||||||
|
lastChildUpdatesTime = Util.EnvironmentTickCount() - 50000;
|
||||||
|
childUpdatesBusy = false; // allow them
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3896,7 +3898,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_scene.EventManager.TriggerSignificantClientMovement(this);
|
m_scene.EventManager.TriggerSignificantClientMovement(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!childUpdatesActive)
|
if(!childUpdatesBusy)
|
||||||
{
|
{
|
||||||
int tdiff = Util.EnvironmentTickCountSubtract(lastChildUpdatesTime);
|
int tdiff = Util.EnvironmentTickCountSubtract(lastChildUpdatesTime);
|
||||||
if(tdiff > CHILDUPDATES_TIME)
|
if(tdiff > CHILDUPDATES_TIME)
|
||||||
|
@ -3904,7 +3906,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
diff = pos - m_lastChildAgentUpdatePosition;
|
diff = pos - m_lastChildAgentUpdatePosition;
|
||||||
if (diff.LengthSquared() > CHILDUPDATES_MOVEMENT)
|
if (diff.LengthSquared() > CHILDUPDATES_MOVEMENT)
|
||||||
{
|
{
|
||||||
childUpdatesActive = true;
|
childUpdatesBusy = true;
|
||||||
m_lastChildAgentUpdatePosition = pos;
|
m_lastChildAgentUpdatePosition = pos;
|
||||||
// m_lastChildAgentUpdateCamPosition = CameraPosition;
|
// m_lastChildAgentUpdateCamPosition = CameraPosition;
|
||||||
|
|
||||||
|
@ -3925,7 +3927,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
m_scene.SendOutChildAgentUpdates(agentpos, this);
|
m_scene.SendOutChildAgentUpdates(agentpos, this);
|
||||||
lastChildUpdatesTime = Util.EnvironmentTickCount();
|
lastChildUpdatesTime = Util.EnvironmentTickCount();
|
||||||
childUpdatesActive= false;
|
childUpdatesBusy = false;
|
||||||
}, null, "ScenePresence.SendOutChildAgentUpdates");
|
}, null, "ScenePresence.SendOutChildAgentUpdates");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue