From 265fe349e00b3ece59ec02e56f83bb7623e9d962 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 29 Nov 2014 00:12:11 +0000 Subject: 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. --- OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSActorAvatarMove.cs') 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; using System.Linq; using System.Text; +using OpenSim.Framework; using OpenSim.Region.Physics.Manager; using OMV = OpenMetaverse; @@ -109,6 +110,10 @@ public class BSActorAvatarMove : BSActor { if (m_velocityMotor != null) { +// if (targ == OMV.Vector3.Zero) +// Util.PrintCallStack(); +// +// Console.WriteLine("SetVelocityAndTarget, {0} {1}", vel, targ); m_velocityMotor.Reset(); m_velocityMotor.SetTarget(targ); m_velocityMotor.SetCurrent(vel); -- cgit v1.1