aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Manager
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-11-29 00:12:11 +0000
committerJustin Clark-Casey (justincc)2014-11-29 00:12:11 +0000
commit265fe349e00b3ece59ec02e56f83bb7623e9d962 (patch)
tree42afe816271f54a017fe5f731d905e923ef5d67b /OpenSim/Region/Physics/Manager
parentAvoid repeated lag-generating continuous attempts to retrieve HG service Urls... (diff)
downloadopensim-SC_OLD-265fe349e00b3ece59ec02e56f83bb7623e9d962.zip
opensim-SC_OLD-265fe349e00b3ece59ec02e56f83bb7623e9d962.tar.gz
opensim-SC_OLD-265fe349e00b3ece59ec02e56f83bb7623e9d962.tar.bz2
opensim-SC_OLD-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/Manager')
-rw-r--r--OpenSim/Region/Physics/Manager/NullPhysicsScene.cs3
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsScene.cs15
2 files changed, 13 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/Manager/NullPhysicsScene.cs b/OpenSim/Region/Physics/Manager/NullPhysicsScene.cs
index 1ccf46d..b52f1f6 100644
--- a/OpenSim/Region/Physics/Manager/NullPhysicsScene.cs
+++ b/OpenSim/Region/Physics/Manager/NullPhysicsScene.cs
@@ -45,7 +45,8 @@ namespace OpenSim.Region.Physics.Manager
45 // Does nothing right now 45 // Does nothing right now
46 } 46 }
47 47
48 public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying) 48 public override PhysicsActor AddAvatar(
49 string avName, Vector3 position, Vector3 velocity, Vector3 size, bool isFlying)
49 { 50 {
50 m_log.InfoFormat("[PHYSICS]: NullPhysicsScene : AddAvatar({0})", position); 51 m_log.InfoFormat("[PHYSICS]: NullPhysicsScene : AddAvatar({0})", position);
51 return PhysicsActor.Null; 52 return PhysicsActor.Null;
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
index 71ad795..9cdedbf 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
@@ -142,10 +142,12 @@ namespace OpenSim.Region.Physics.Manager
142 /// </summary> 142 /// </summary>
143 /// <param name="avName"></param> 143 /// <param name="avName"></param>
144 /// <param name="position"></param> 144 /// <param name="position"></param>
145 /// <param name="velocity"></param>
145 /// <param name="size"></param> 146 /// <param name="size"></param>
146 /// <param name="isFlying"></param> 147 /// <param name="isFlying"></param>
147 /// <returns></returns> 148 /// <returns></returns>
148 public abstract PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, bool isFlying); 149 public abstract PhysicsActor AddAvatar(
150 string avName, Vector3 position, Vector3 velocity, Vector3 size, bool isFlying);
149 151
150 /// <summary> 152 /// <summary>
151 /// Add an avatar 153 /// Add an avatar
@@ -153,13 +155,18 @@ namespace OpenSim.Region.Physics.Manager
153 /// <param name="localID"></param> 155 /// <param name="localID"></param>
154 /// <param name="avName"></param> 156 /// <param name="avName"></param>
155 /// <param name="position"></param> 157 /// <param name="position"></param>
158 /// <param name="velocity"></param>
156 /// <param name="size"></param> 159 /// <param name="size"></param>
157 /// <param name="isFlying"></param> 160 /// <param name="isFlying"></param>
158 /// <returns></returns> 161 /// <returns></returns>
159 public virtual PhysicsActor AddAvatar(uint localID, string avName, Vector3 position, Vector3 size, bool isFlying) 162 public virtual PhysicsActor AddAvatar(
163 uint localID, string avName, Vector3 position, Vector3 velocity, Vector3 size, bool isFlying)
160 { 164 {
161 PhysicsActor ret = AddAvatar(avName, position, size, isFlying); 165 PhysicsActor ret = AddAvatar(avName, position, velocity, size, isFlying);
162 if (ret != null) ret.LocalID = localID; 166
167 if (ret != null)
168 ret.LocalID = localID;
169
163 return ret; 170 return ret;
164 } 171 }
165 172