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/OdePlugin/ODECharacter.cs | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region/Physics/OdePlugin/ODECharacter.cs')
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index 67503df..05eaf2a 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
@@ -167,6 +167,7 @@ namespace OpenSim.Region.Physics.OdePlugin
///
///
///
+ ///
///
///
///
@@ -178,7 +179,7 @@ namespace OpenSim.Region.Physics.OdePlugin
///
///
public OdeCharacter(
- String avName, OdeScene parent_scene, Vector3 pos, Vector3 size, float pid_d, float pid_p,
+ String avName, OdeScene parent_scene, Vector3 pos, Vector3 vel, Vector3 size, float pid_d, float pid_p,
float capsule_radius, float tensor, float density,
float walk_divisor, float rundivisor)
{
@@ -210,6 +211,9 @@ namespace OpenSim.Region.Physics.OdePlugin
m_log.WarnFormat("[ODE CHARACTER]: Got NaN Position on Character Create for {0}", avName);
}
+ _velocity = vel;
+ m_taintTargetVelocity = vel;
+
_parent_scene = parent_scene;
PID_D = pid_d;
--
cgit v1.1