minor: Add comments which explain what's going on wrt avatar movements at various points in the main scene loop and associated methods

viewer-2-initial-appearance
Justin Clark-Casey (justincc) 2010-09-13 21:53:25 +01:00
parent fbe72e30eb
commit dd803b4f0c
2 changed files with 6 additions and 0 deletions

View File

@ -1319,6 +1319,7 @@ namespace OpenSim.Region.Framework.Scenes
if (m_frame % m_update_presences == 0)
m_sceneGraph.UpdatePresences();
// Coarse locations relate to positions of green dots on the mini-map (on a SecondLife client)
if (m_frame % m_update_coarse_locations == 0)
{
List<Vector3> coarseLocations;
@ -1336,9 +1337,12 @@ namespace OpenSim.Region.Framework.Scenes
m_sceneGraph.UpdatePreparePhysics();
physicsMS2 = Util.EnvironmentTickCountSubtract(tmpPhysicsMS2);
// Apply any pending avatar force input to the avatar's velocity
if (m_frame % m_update_entitymovement == 0)
m_sceneGraph.UpdateScenePresenceMovement();
// Perform the main physics update. This will do the actual work of moving objects and avatars according to their
// velocity
int tmpPhysicsMS = Util.EnvironmentTickCount();
if (m_frame % m_update_physics == 0)
{

View File

@ -1522,6 +1522,8 @@ namespace OpenSim.Region.Framework.Scenes
}
}
// If the agent update does move the avatar, then calculate the force ready for the velocity update,
// which occurs later in the main scene loop
if (update_movementflag || (update_rotation && DCFlagKeyPressed))
{
// m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed));