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/Physics/BulletSPlugin/BSActorAvatarMove.cs | |
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/Physics/BulletSPlugin/BSActorAvatarMove.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs b/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs index 14518e9..8e998ba 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs | |||
@@ -30,6 +30,7 @@ using System.Collections.Generic; | |||
30 | using System.Linq; | 30 | using System.Linq; |
31 | using System.Text; | 31 | using System.Text; |
32 | 32 | ||
33 | using OpenSim.Framework; | ||
33 | using OpenSim.Region.Physics.Manager; | 34 | using OpenSim.Region.Physics.Manager; |
34 | 35 | ||
35 | using OMV = OpenMetaverse; | 36 | using OMV = OpenMetaverse; |
@@ -109,6 +110,10 @@ public class BSActorAvatarMove : BSActor | |||
109 | { | 110 | { |
110 | if (m_velocityMotor != null) | 111 | if (m_velocityMotor != null) |
111 | { | 112 | { |
113 | // if (targ == OMV.Vector3.Zero) | ||
114 | // Util.PrintCallStack(); | ||
115 | // | ||
116 | // Console.WriteLine("SetVelocityAndTarget, {0} {1}", vel, targ); | ||
112 | m_velocityMotor.Reset(); | 117 | m_velocityMotor.Reset(); |
113 | m_velocityMotor.SetTarget(targ); | 118 | m_velocityMotor.SetTarget(targ); |
114 | m_velocityMotor.SetCurrent(vel); | 119 | m_velocityMotor.SetCurrent(vel); |