diff options
author | John Hurliman | 2009-10-15 15:25:02 -0700 |
---|---|---|
committer | John Hurliman | 2009-10-15 15:25:02 -0700 |
commit | d44b50ee462978b4899c0b142f6ecbfb553f06b6 (patch) | |
tree | 650046925796d20c18ed2e2028f951286d93662d /OpenSim/Region/Framework/Scenes/ScenePresence.cs | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-d44b50ee462978b4899c0b142f6ecbfb553f06b6.zip opensim-SC-d44b50ee462978b4899c0b142f6ecbfb553f06b6.tar.gz opensim-SC-d44b50ee462978b4899c0b142f6ecbfb553f06b6.tar.bz2 opensim-SC-d44b50ee462978b4899c0b142f6ecbfb553f06b6.tar.xz |
* Removed some of the redundant broadcast functions in Scene and SceneGraph so it is clear who/what the broadcast is going to each time
* Removed two redundant parameters from SceneObjectPart
* Changed some code in terse update sending that was meant to work with references to work with value types (since Vector3 and Quaternion are structs)
* Committing a preview of a new method for sending object updates efficiently (all commented out for now)
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 2a06f9e..387db44 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2455,11 +2455,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2455 | m_perfMonMS = Environment.TickCount; | 2455 | m_perfMonMS = Environment.TickCount; |
2456 | 2456 | ||
2457 | Vector3 pos = m_pos; | 2457 | Vector3 pos = m_pos; |
2458 | Vector3 vel = Velocity; | ||
2459 | Quaternion rot = m_bodyRot; | ||
2460 | pos.Z -= m_appearance.HipOffset; | 2458 | pos.Z -= m_appearance.HipOffset; |
2461 | remoteClient.SendAvatarTerseUpdate(m_regionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId, new Vector3(pos.X, pos.Y, pos.Z), | 2459 | |
2462 | new Vector3(vel.X, vel.Y, vel.Z), rot, m_uuid); | 2460 | remoteClient.SendAvatarTerseUpdate(m_regionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), |
2461 | LocalId, pos, Velocity, m_bodyRot, m_uuid); | ||
2463 | 2462 | ||
2464 | m_scene.StatsReporter.AddAgentTime(Environment.TickCount - m_perfMonMS); | 2463 | m_scene.StatsReporter.AddAgentTime(Environment.TickCount - m_perfMonMS); |
2465 | m_scene.StatsReporter.AddAgentUpdates(1); | 2464 | m_scene.StatsReporter.AddAgentUpdates(1); |
@@ -2473,7 +2472,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2473 | { | 2472 | { |
2474 | m_perfMonMS = Environment.TickCount; | 2473 | m_perfMonMS = Environment.TickCount; |
2475 | 2474 | ||
2476 | m_scene.Broadcast(SendTerseUpdateToClient); | 2475 | m_scene.ForEachClient(SendTerseUpdateToClient); |
2477 | 2476 | ||
2478 | m_lastVelocity = m_velocity; | 2477 | m_lastVelocity = m_velocity; |
2479 | lastPhysPos = AbsolutePosition; | 2478 | lastPhysPos = AbsolutePosition; |
@@ -2774,7 +2773,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2774 | if (m_isChildAgent) | 2773 | if (m_isChildAgent) |
2775 | return; | 2774 | return; |
2776 | 2775 | ||
2777 | m_scene.Broadcast( | 2776 | m_scene.ForEachClient( |
2778 | delegate(IClientAPI client) { client.SendAnimations(animations, seqs, m_controllingClient.AgentId, objectIDs); }); | 2777 | delegate(IClientAPI client) { client.SendAnimations(animations, seqs, m_controllingClient.AgentId, objectIDs); }); |
2779 | } | 2778 | } |
2780 | 2779 | ||