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/OdePlugin/ODECharacter.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/OdePlugin/ODECharacter.cs')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 6 |
1 files changed, 5 insertions, 1 deletions
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 | |||
167 | /// <param name="avName"></param> | 167 | /// <param name="avName"></param> |
168 | /// <param name="parent_scene"></param> | 168 | /// <param name="parent_scene"></param> |
169 | /// <param name="pos"></param> | 169 | /// <param name="pos"></param> |
170 | /// <param name="vel"></param> | ||
170 | /// <param name="size"></param> | 171 | /// <param name="size"></param> |
171 | /// <param name="pid_d"></param> | 172 | /// <param name="pid_d"></param> |
172 | /// <param name="pid_p"></param> | 173 | /// <param name="pid_p"></param> |
@@ -178,7 +179,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
178 | /// <param name="walk_divisor"></param> | 179 | /// <param name="walk_divisor"></param> |
179 | /// <param name="rundivisor"></param> | 180 | /// <param name="rundivisor"></param> |
180 | public OdeCharacter( | 181 | public OdeCharacter( |
181 | String avName, OdeScene parent_scene, Vector3 pos, Vector3 size, float pid_d, float pid_p, | 182 | String avName, OdeScene parent_scene, Vector3 pos, Vector3 vel, Vector3 size, float pid_d, float pid_p, |
182 | float capsule_radius, float tensor, float density, | 183 | float capsule_radius, float tensor, float density, |
183 | float walk_divisor, float rundivisor) | 184 | float walk_divisor, float rundivisor) |
184 | { | 185 | { |
@@ -210,6 +211,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
210 | m_log.WarnFormat("[ODE CHARACTER]: Got NaN Position on Character Create for {0}", avName); | 211 | m_log.WarnFormat("[ODE CHARACTER]: Got NaN Position on Character Create for {0}", avName); |
211 | } | 212 | } |
212 | 213 | ||
214 | _velocity = vel; | ||
215 | m_taintTargetVelocity = vel; | ||
216 | |||
213 | _parent_scene = parent_scene; | 217 | _parent_scene = parent_scene; |
214 | 218 | ||
215 | PID_D = pid_d; | 219 | PID_D = pid_d; |