diff options
author | Diva Canto | 2010-12-10 23:16:26 -0800 |
---|---|---|
committer | Diva Canto | 2010-12-10 23:16:26 -0800 |
commit | ccb4f958c0dbb2daad4249a6b97d1c0b008b6a47 (patch) | |
tree | acbf5fba3355bbad7710771fe0d75dad5a63dfcf /OpenSim/Region/Framework | |
parent | Revert "A stab at mantis #5256. Separate ScenePresence updates from SceneObje... (diff) | |
download | opensim-SC_OLD-ccb4f958c0dbb2daad4249a6b97d1c0b008b6a47.zip opensim-SC_OLD-ccb4f958c0dbb2daad4249a6b97d1c0b008b6a47.tar.gz opensim-SC_OLD-ccb4f958c0dbb2daad4249a6b97d1c0b008b6a47.tar.bz2 opensim-SC_OLD-ccb4f958c0dbb2daad4249a6b97d1c0b008b6a47.tar.xz |
Another stab at mantis #5256
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index a1c80e5..b4a7e02 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1217,6 +1217,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
1217 | // return; | 1217 | // return; |
1218 | //} | 1218 | //} |
1219 | 1219 | ||
1220 | //m_log.DebugFormat("DEBUG: HandleAgentUpdate {0}", (AgentManager.ControlFlags)agentData.ControlFlags); | ||
1221 | |||
1220 | m_perfMonMS = Util.EnvironmentTickCount(); | 1222 | m_perfMonMS = Util.EnvironmentTickCount(); |
1221 | 1223 | ||
1222 | ++m_movementUpdateCount; | 1224 | ++m_movementUpdateCount; |
@@ -1393,7 +1395,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1393 | try | 1395 | try |
1394 | { | 1396 | { |
1395 | agent_control_v3 += dirVectors[i]; | 1397 | agent_control_v3 += dirVectors[i]; |
1396 | //m_log.DebugFormat("[Motion]: {0}, {1}",i, dirVectors[i]); | 1398 | //m_log.DebugFormat("[Motion]: (0) {0}, {1}",i, dirVectors[i]); |
1397 | } | 1399 | } |
1398 | catch (IndexOutOfRangeException) | 1400 | catch (IndexOutOfRangeException) |
1399 | { | 1401 | { |
@@ -1471,6 +1473,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1471 | Vector3 LocalVectorToTarget2D = new Vector3((float)(LocalVectorToTarget3D.X), (float)(LocalVectorToTarget3D.Y), 0f); | 1473 | Vector3 LocalVectorToTarget2D = new Vector3((float)(LocalVectorToTarget3D.X), (float)(LocalVectorToTarget3D.Y), 0f); |
1472 | LocalVectorToTarget2D.Normalize(); | 1474 | LocalVectorToTarget2D.Normalize(); |
1473 | agent_control_v3 += LocalVectorToTarget2D; | 1475 | agent_control_v3 += LocalVectorToTarget2D; |
1476 | //m_log.DebugFormat("[Motion]: (1) {0}, {1}", i, dirVectors[i]); | ||
1474 | 1477 | ||
1475 | // update avatar movement flags. the avatar coordinate system is as follows: | 1478 | // update avatar movement flags. the avatar coordinate system is as follows: |
1476 | // | 1479 | // |
@@ -1554,11 +1557,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1554 | 1557 | ||
1555 | // If the agent update does move the avatar, then calculate the force ready for the velocity update, | 1558 | // If the agent update does move the avatar, then calculate the force ready for the velocity update, |
1556 | // which occurs later in the main scene loop | 1559 | // which occurs later in the main scene loop |
1557 | if (update_movementflag || (update_rotation && DCFlagKeyPressed)) | 1560 | if ((update_movementflag) || (update_rotation && DCFlagKeyPressed)) |
1558 | { | 1561 | { |
1559 | // m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed)); | 1562 | //m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed)); |
1560 | // m_log.DebugFormat( | 1563 | //m_log.DebugFormat( |
1561 | // "In {0} adding velocity to {1} of {2}", m_scene.RegionInfo.RegionName, Name, agent_control_v3); | 1564 | // "In {0} adding velocity to {1} of {2}", m_scene.RegionInfo.RegionName, Name, agent_control_v3); |
1562 | 1565 | ||
1563 | AddNewMovement(agent_control_v3, q); | 1566 | AddNewMovement(agent_control_v3, q); |
1564 | 1567 | ||
@@ -2327,6 +2330,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2327 | !m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE)) | 2330 | !m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE)) |
2328 | //Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE) | 2331 | //Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE) |
2329 | { | 2332 | { |
2333 | //m_log.DebugFormat("XXX SendTerseUpdateToAllClients {0}-{1} {2}-{3} {4}-{5}", | ||
2334 | // m_bodyRot, m_lastRotation, Velocity, m_lastVelocity, m_pos, m_lastPosition); | ||
2335 | |||
2330 | SendTerseUpdateToAllClients(); | 2336 | SendTerseUpdateToAllClients(); |
2331 | 2337 | ||
2332 | // Update the "last" values | 2338 | // Update the "last" values |
@@ -3226,7 +3232,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3226 | Vector3 force = m_forceToApply.Value; | 3232 | Vector3 force = m_forceToApply.Value; |
3227 | 3233 | ||
3228 | m_updateflag = true; | 3234 | m_updateflag = true; |
3229 | // movementvector = force; | 3235 | // movementvector = force; |
3230 | Velocity = force; | 3236 | Velocity = force; |
3231 | 3237 | ||
3232 | m_forceToApply = null; | 3238 | m_forceToApply = null; |