aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs39
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs18
2 files changed, 25 insertions, 32 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 08da05f..f125822 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -3706,22 +3706,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3706 3706
3707 const float TIME_DILATION = 1.0f; 3707 const float TIME_DILATION = 1.0f;
3708 ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f); 3708 ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f);
3709 3709
3710 if (terseUpdateBlocks.IsValueCreated)
3711 {
3712 List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseUpdateBlocks.Value;
3713
3714 ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket();
3715 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
3716 packet.RegionData.TimeDilation = timeDilation;
3717 packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count];
3718
3719 for (int i = 0; i < blocks.Count; i++)
3720 packet.ObjectData[i] = blocks[i];
3721
3722 OutPacket(packet, ThrottleOutPacketType.Unknown, true);
3723 }
3724
3725 if (objectUpdateBlocks.IsValueCreated) 3710 if (objectUpdateBlocks.IsValueCreated)
3726 { 3711 {
3727 List<ObjectUpdatePacket.ObjectDataBlock> blocks = objectUpdateBlocks.Value; 3712 List<ObjectUpdatePacket.ObjectDataBlock> blocks = objectUpdateBlocks.Value;
@@ -3733,8 +3718,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3733 3718
3734 for (int i = 0; i < blocks.Count; i++) 3719 for (int i = 0; i < blocks.Count; i++)
3735 packet.ObjectData[i] = blocks[i]; 3720 packet.ObjectData[i] = blocks[i];
3736 3721
3737 OutPacket(packet, ThrottleOutPacketType.Unknown, true); 3722 OutPacket(packet, ThrottleOutPacketType.Task, true);
3738 } 3723 }
3739 3724
3740 if (compressedUpdateBlocks.IsValueCreated) 3725 if (compressedUpdateBlocks.IsValueCreated)
@@ -3748,10 +3733,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3748 3733
3749 for (int i = 0; i < blocks.Count; i++) 3734 for (int i = 0; i < blocks.Count; i++)
3750 packet.ObjectData[i] = blocks[i]; 3735 packet.ObjectData[i] = blocks[i];
3751 3736
3752 OutPacket(packet, ThrottleOutPacketType.Unknown, true); 3737 OutPacket(packet, ThrottleOutPacketType.Task, true);
3753 } 3738 }
3754 3739
3740 if (terseUpdateBlocks.IsValueCreated)
3741 {
3742 List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseUpdateBlocks.Value;
3743
3744 ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket();
3745 packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
3746 packet.RegionData.TimeDilation = timeDilation;
3747 packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count];
3748
3749 for (int i = 0; i < blocks.Count; i++)
3750 packet.ObjectData[i] = blocks[i];
3751
3752 OutPacket(packet, ThrottleOutPacketType.Task, true);
3753 }
3755 } 3754 }
3756 3755
3757 #endregion Packet Sending 3756 #endregion Packet Sending
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index b4a7e02..a1c80e5 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1217,8 +1217,6 @@ 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
1222 m_perfMonMS = Util.EnvironmentTickCount(); 1220 m_perfMonMS = Util.EnvironmentTickCount();
1223 1221
1224 ++m_movementUpdateCount; 1222 ++m_movementUpdateCount;
@@ -1395,7 +1393,7 @@ namespace OpenSim.Region.Framework.Scenes
1395 try 1393 try
1396 { 1394 {
1397 agent_control_v3 += dirVectors[i]; 1395 agent_control_v3 += dirVectors[i];
1398 //m_log.DebugFormat("[Motion]: (0) {0}, {1}",i, dirVectors[i]); 1396 //m_log.DebugFormat("[Motion]: {0}, {1}",i, dirVectors[i]);
1399 } 1397 }
1400 catch (IndexOutOfRangeException) 1398 catch (IndexOutOfRangeException)
1401 { 1399 {
@@ -1473,7 +1471,6 @@ namespace OpenSim.Region.Framework.Scenes
1473 Vector3 LocalVectorToTarget2D = new Vector3((float)(LocalVectorToTarget3D.X), (float)(LocalVectorToTarget3D.Y), 0f); 1471 Vector3 LocalVectorToTarget2D = new Vector3((float)(LocalVectorToTarget3D.X), (float)(LocalVectorToTarget3D.Y), 0f);
1474 LocalVectorToTarget2D.Normalize(); 1472 LocalVectorToTarget2D.Normalize();
1475 agent_control_v3 += LocalVectorToTarget2D; 1473 agent_control_v3 += LocalVectorToTarget2D;
1476 //m_log.DebugFormat("[Motion]: (1) {0}, {1}", i, dirVectors[i]);
1477 1474
1478 // update avatar movement flags. the avatar coordinate system is as follows: 1475 // update avatar movement flags. the avatar coordinate system is as follows:
1479 // 1476 //
@@ -1557,11 +1554,11 @@ namespace OpenSim.Region.Framework.Scenes
1557 1554
1558 // If the agent update does move the avatar, then calculate the force ready for the velocity update, 1555 // If the agent update does move the avatar, then calculate the force ready for the velocity update,
1559 // which occurs later in the main scene loop 1556 // which occurs later in the main scene loop
1560 if ((update_movementflag) || (update_rotation && DCFlagKeyPressed)) 1557 if (update_movementflag || (update_rotation && DCFlagKeyPressed))
1561 { 1558 {
1562 //m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed)); 1559 // m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed));
1563 //m_log.DebugFormat( 1560 // m_log.DebugFormat(
1564 // "In {0} adding velocity to {1} of {2}", m_scene.RegionInfo.RegionName, Name, agent_control_v3); 1561 // "In {0} adding velocity to {1} of {2}", m_scene.RegionInfo.RegionName, Name, agent_control_v3);
1565 1562
1566 AddNewMovement(agent_control_v3, q); 1563 AddNewMovement(agent_control_v3, q);
1567 1564
@@ -2330,9 +2327,6 @@ namespace OpenSim.Region.Framework.Scenes
2330 !m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE)) 2327 !m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE))
2331 //Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE) 2328 //Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE)
2332 { 2329 {
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
2336 SendTerseUpdateToAllClients(); 2330 SendTerseUpdateToAllClients();
2337 2331
2338 // Update the "last" values 2332 // Update the "last" values
@@ -3232,7 +3226,7 @@ namespace OpenSim.Region.Framework.Scenes
3232 Vector3 force = m_forceToApply.Value; 3226 Vector3 force = m_forceToApply.Value;
3233 3227
3234 m_updateflag = true; 3228 m_updateflag = true;
3235 // movementvector = force; 3229// movementvector = force;
3236 Velocity = force; 3230 Velocity = force;
3237 3231
3238 m_forceToApply = null; 3232 m_forceToApply = null;