diff options
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 39 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 18 |
2 files changed, 32 insertions, 25 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index f125822..08da05f 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -3706,7 +3706,22 @@ 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 | |||
3710 | if (objectUpdateBlocks.IsValueCreated) | 3725 | if (objectUpdateBlocks.IsValueCreated) |
3711 | { | 3726 | { |
3712 | List<ObjectUpdatePacket.ObjectDataBlock> blocks = objectUpdateBlocks.Value; | 3727 | List<ObjectUpdatePacket.ObjectDataBlock> blocks = objectUpdateBlocks.Value; |
@@ -3718,8 +3733,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3718 | 3733 | ||
3719 | for (int i = 0; i < blocks.Count; i++) | 3734 | for (int i = 0; i < blocks.Count; i++) |
3720 | packet.ObjectData[i] = blocks[i]; | 3735 | packet.ObjectData[i] = blocks[i]; |
3721 | 3736 | ||
3722 | OutPacket(packet, ThrottleOutPacketType.Task, true); | 3737 | OutPacket(packet, ThrottleOutPacketType.Unknown, true); |
3723 | } | 3738 | } |
3724 | 3739 | ||
3725 | if (compressedUpdateBlocks.IsValueCreated) | 3740 | if (compressedUpdateBlocks.IsValueCreated) |
@@ -3733,24 +3748,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3733 | 3748 | ||
3734 | for (int i = 0; i < blocks.Count; i++) | 3749 | for (int i = 0; i < blocks.Count; i++) |
3735 | packet.ObjectData[i] = blocks[i]; | 3750 | packet.ObjectData[i] = blocks[i]; |
3736 | 3751 | ||
3737 | OutPacket(packet, ThrottleOutPacketType.Task, true); | 3752 | OutPacket(packet, ThrottleOutPacketType.Unknown, true); |
3738 | } | 3753 | } |
3739 | 3754 | ||
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 | } | ||
3754 | } | 3755 | } |
3755 | 3756 | ||
3756 | #endregion Packet Sending | 3757 | #endregion Packet Sending |
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; |