parent
18b10fab60
commit
c42876df67
|
@ -3706,22 +3706,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
const float TIME_DILATION = 1.0f;
|
const float TIME_DILATION = 1.0f;
|
||||||
ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f);
|
ushort timeDilation = Utils.FloatToUInt16(TIME_DILATION, 0.0f, 1.0f);
|
||||||
|
|
||||||
if (terseUpdateBlocks.IsValueCreated)
|
|
||||||
{
|
|
||||||
List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseUpdateBlocks.Value;
|
|
||||||
|
|
||||||
ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket();
|
|
||||||
packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
|
|
||||||
packet.RegionData.TimeDilation = timeDilation;
|
|
||||||
packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count];
|
|
||||||
|
|
||||||
for (int i = 0; i < blocks.Count; i++)
|
|
||||||
packet.ObjectData[i] = blocks[i];
|
|
||||||
|
|
||||||
OutPacket(packet, ThrottleOutPacketType.Unknown, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (objectUpdateBlocks.IsValueCreated)
|
if (objectUpdateBlocks.IsValueCreated)
|
||||||
{
|
{
|
||||||
List<ObjectUpdatePacket.ObjectDataBlock> blocks = objectUpdateBlocks.Value;
|
List<ObjectUpdatePacket.ObjectDataBlock> blocks = objectUpdateBlocks.Value;
|
||||||
|
@ -3733,8 +3718,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
for (int i = 0; i < blocks.Count; i++)
|
for (int i = 0; i < blocks.Count; i++)
|
||||||
packet.ObjectData[i] = blocks[i];
|
packet.ObjectData[i] = blocks[i];
|
||||||
|
|
||||||
OutPacket(packet, ThrottleOutPacketType.Unknown, true);
|
OutPacket(packet, ThrottleOutPacketType.Task, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (compressedUpdateBlocks.IsValueCreated)
|
if (compressedUpdateBlocks.IsValueCreated)
|
||||||
|
@ -3748,10 +3733,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
for (int i = 0; i < blocks.Count; i++)
|
for (int i = 0; i < blocks.Count; i++)
|
||||||
packet.ObjectData[i] = blocks[i];
|
packet.ObjectData[i] = blocks[i];
|
||||||
|
|
||||||
OutPacket(packet, ThrottleOutPacketType.Unknown, true);
|
OutPacket(packet, ThrottleOutPacketType.Task, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (terseUpdateBlocks.IsValueCreated)
|
||||||
|
{
|
||||||
|
List<ImprovedTerseObjectUpdatePacket.ObjectDataBlock> blocks = terseUpdateBlocks.Value;
|
||||||
|
|
||||||
|
ImprovedTerseObjectUpdatePacket packet = new ImprovedTerseObjectUpdatePacket();
|
||||||
|
packet.RegionData.RegionHandle = m_scene.RegionInfo.RegionHandle;
|
||||||
|
packet.RegionData.TimeDilation = timeDilation;
|
||||||
|
packet.ObjectData = new ImprovedTerseObjectUpdatePacket.ObjectDataBlock[blocks.Count];
|
||||||
|
|
||||||
|
for (int i = 0; i < blocks.Count; i++)
|
||||||
|
packet.ObjectData[i] = blocks[i];
|
||||||
|
|
||||||
|
OutPacket(packet, ThrottleOutPacketType.Task, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Packet Sending
|
#endregion Packet Sending
|
||||||
|
|
|
@ -1217,8 +1217,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// return;
|
// return;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
//m_log.DebugFormat("DEBUG: HandleAgentUpdate {0}", (AgentManager.ControlFlags)agentData.ControlFlags);
|
|
||||||
|
|
||||||
m_perfMonMS = Util.EnvironmentTickCount();
|
m_perfMonMS = Util.EnvironmentTickCount();
|
||||||
|
|
||||||
++m_movementUpdateCount;
|
++m_movementUpdateCount;
|
||||||
|
@ -1395,7 +1393,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
agent_control_v3 += dirVectors[i];
|
agent_control_v3 += dirVectors[i];
|
||||||
//m_log.DebugFormat("[Motion]: (0) {0}, {1}",i, dirVectors[i]);
|
//m_log.DebugFormat("[Motion]: {0}, {1}",i, dirVectors[i]);
|
||||||
}
|
}
|
||||||
catch (IndexOutOfRangeException)
|
catch (IndexOutOfRangeException)
|
||||||
{
|
{
|
||||||
|
@ -1473,7 +1471,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
Vector3 LocalVectorToTarget2D = new Vector3((float)(LocalVectorToTarget3D.X), (float)(LocalVectorToTarget3D.Y), 0f);
|
Vector3 LocalVectorToTarget2D = new Vector3((float)(LocalVectorToTarget3D.X), (float)(LocalVectorToTarget3D.Y), 0f);
|
||||||
LocalVectorToTarget2D.Normalize();
|
LocalVectorToTarget2D.Normalize();
|
||||||
agent_control_v3 += LocalVectorToTarget2D;
|
agent_control_v3 += LocalVectorToTarget2D;
|
||||||
//m_log.DebugFormat("[Motion]: (1) {0}, {1}", i, dirVectors[i]);
|
|
||||||
|
|
||||||
// update avatar movement flags. the avatar coordinate system is as follows:
|
// update avatar movement flags. the avatar coordinate system is as follows:
|
||||||
//
|
//
|
||||||
|
@ -1557,11 +1554,11 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
// If the agent update does move the avatar, then calculate the force ready for the velocity update,
|
// 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
|
// which occurs later in the main scene loop
|
||||||
if ((update_movementflag) || (update_rotation && DCFlagKeyPressed))
|
if (update_movementflag || (update_rotation && DCFlagKeyPressed))
|
||||||
{
|
{
|
||||||
//m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed));
|
// m_log.DebugFormat("{0} {1}", update_movementflag, (update_rotation && DCFlagKeyPressed));
|
||||||
//m_log.DebugFormat(
|
// m_log.DebugFormat(
|
||||||
// "In {0} adding velocity to {1} of {2}", m_scene.RegionInfo.RegionName, Name, agent_control_v3);
|
// "In {0} adding velocity to {1} of {2}", m_scene.RegionInfo.RegionName, Name, agent_control_v3);
|
||||||
|
|
||||||
AddNewMovement(agent_control_v3, q);
|
AddNewMovement(agent_control_v3, q);
|
||||||
|
|
||||||
|
@ -2330,9 +2327,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
!m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE))
|
!m_pos.ApproxEquals(m_lastPosition, POSITION_TOLERANCE))
|
||||||
//Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE)
|
//Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE)
|
||||||
{
|
{
|
||||||
//m_log.DebugFormat("XXX SendTerseUpdateToAllClients {0}-{1} {2}-{3} {4}-{5}",
|
|
||||||
// m_bodyRot, m_lastRotation, Velocity, m_lastVelocity, m_pos, m_lastPosition);
|
|
||||||
|
|
||||||
SendTerseUpdateToAllClients();
|
SendTerseUpdateToAllClients();
|
||||||
|
|
||||||
// Update the "last" values
|
// Update the "last" values
|
||||||
|
@ -3232,7 +3226,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
Vector3 force = m_forceToApply.Value;
|
Vector3 force = m_forceToApply.Value;
|
||||||
|
|
||||||
m_updateflag = true;
|
m_updateflag = true;
|
||||||
// movementvector = force;
|
// movementvector = force;
|
||||||
Velocity = force;
|
Velocity = force;
|
||||||
|
|
||||||
m_forceToApply = null;
|
m_forceToApply = null;
|
||||||
|
|
Loading…
Reference in New Issue