diff options
author | Justin Clark-Casey (justincc) | 2014-11-29 00:12:11 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-11-29 00:12:11 +0000 |
commit | 265fe349e00b3ece59ec02e56f83bb7623e9d962 (patch) | |
tree | 42afe816271f54a017fe5f731d905e923ef5d67b /OpenSim/Region/ClientStack/Linden/UDP | |
parent | Avoid repeated lag-generating continuous attempts to retrieve HG service Urls... (diff) | |
download | opensim-SC-265fe349e00b3ece59ec02e56f83bb7623e9d962.zip opensim-SC-265fe349e00b3ece59ec02e56f83bb7623e9d962.tar.gz opensim-SC-265fe349e00b3ece59ec02e56f83bb7623e9d962.tar.bz2 opensim-SC-265fe349e00b3ece59ec02e56f83bb7623e9d962.tar.xz |
Somewhat improve avatar region crossings by properly preserving velocity when avatar enters the new region.
This commit addresses the following issues were causing velocity to be set to 0 on the new region, disrupting flight in particular
* Full avatar updates contained no velocity information, which does appear to have some effect in testing.
* BulletSim was always setting the velocity to 0 for the new BSCharacter. Now, physics engines take a velocity parameter when setting up characters so we can avoid this.
This patch applies to both Bullet and ODE.
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP')
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 85f9d68..5da0ca1 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -5195,8 +5195,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5195 | { | 5195 | { |
5196 | ScenePresence presence = (ScenePresence)entity; | 5196 | ScenePresence presence = (ScenePresence)entity; |
5197 | 5197 | ||
5198 | // m_log.DebugFormat( | 5198 | // m_log.DebugFormat( |
5199 | // "[LLCLIENTVIEW]: Sending terse update to {0} with position {1} in {2}", Name, presence.OffsetPosition, m_scene.Name); | 5199 | // "[LLCLIENTVIEW]: Sending terse update to {0} with pos {1}, vel {2} in {3}", |
5200 | // Name, presence.OffsetPosition, presence.Velocity, m_scene.Name); | ||
5200 | 5201 | ||
5201 | attachPoint = presence.State; | 5202 | attachPoint = presence.State; |
5202 | collisionPlane = presence.CollisionPlane; | 5203 | collisionPlane = presence.CollisionPlane; |
@@ -5333,13 +5334,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5333 | protected ObjectUpdatePacket.ObjectDataBlock CreateAvatarUpdateBlock(ScenePresence data) | 5334 | protected ObjectUpdatePacket.ObjectDataBlock CreateAvatarUpdateBlock(ScenePresence data) |
5334 | { | 5335 | { |
5335 | // m_log.DebugFormat( | 5336 | // m_log.DebugFormat( |
5336 | // "[LLCLIENTVIEW]: Sending full update to {0} with position {1} in {2}", Name, data.OffsetPosition, m_scene.Name); | 5337 | // "[LLCLIENTVIEW]: Sending full update to {0} with pos {1}, vel {2} in {3}", Name, data.OffsetPosition, data.Velocity, m_scene.Name); |
5337 | 5338 | ||
5338 | byte[] objectData = new byte[76]; | 5339 | byte[] objectData = new byte[76]; |
5339 | 5340 | ||
5340 | data.CollisionPlane.ToBytes(objectData, 0); | 5341 | data.CollisionPlane.ToBytes(objectData, 0); |
5341 | data.OffsetPosition.ToBytes(objectData, 16); | 5342 | data.OffsetPosition.ToBytes(objectData, 16); |
5342 | // data.Velocity.ToBytes(objectData, 28); | 5343 | data.Velocity.ToBytes(objectData, 28); |
5343 | // data.Acceleration.ToBytes(objectData, 40); | 5344 | // data.Acceleration.ToBytes(objectData, 40); |
5344 | 5345 | ||
5345 | // Whilst not in mouselook, an avatar will transmit only the Z rotation as this is the only axis | 5346 | // Whilst not in mouselook, an avatar will transmit only the Z rotation as this is the only axis |