aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsScene.cs10
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs7
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs4
3 files changed, 8 insertions, 13 deletions
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
index c07213e..cdffa6b 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
@@ -147,15 +147,9 @@ namespace OpenSim.Region.Physics.Manager
147 return ret; 147 return ret;
148 } 148 }
149 149
150 public virtual PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size,float feetOffset, bool isFlying) 150 public virtual PhysicsActor AddAvatar(uint localID, string avName, Vector3 position, Vector3 size, float feetOffset, bool isFlying)
151 { 151 {
152 return null; 152 PhysicsActor ret = AddAvatar(localID, avName, position, size, isFlying);
153 }
154
155 public virtual PhysicsActor AddAvatar(uint localID,string avName, Vector3 position, Vector3 size, float feetOffset, bool isFlying)
156 {
157 PhysicsActor ret = AddAvatar(avName, position, size,feetOffset, isFlying);
158 if (ret != null) ret.LocalID = localID;
159 return ret; 153 return ret;
160 } 154 }
161 155
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
index 1b25faf..b769c88 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs
@@ -165,9 +165,10 @@ namespace OpenSim.Region.Physics.OdePlugin
165 165
166 166
167 167
168 public OdeCharacter(String avName, OdeScene parent_scene, Vector3 pos, Vector3 pSize, float pfeetOffset, float density, float walk_divisor, float rundivisor) 168 public OdeCharacter(uint localID, String avName, OdeScene parent_scene, Vector3 pos, Vector3 pSize, float pfeetOffset, float density, float walk_divisor, float rundivisor)
169 { 169 {
170 m_uuid = UUID.Random(); 170 m_uuid = UUID.Random();
171 m_localID = localID;
171 172
172 timeStep = parent_scene.ODE_STEPSIZE; 173 timeStep = parent_scene.ODE_STEPSIZE;
173 invtimeStep = 1 / timeStep; 174 invtimeStep = 1 / timeStep;
@@ -1209,7 +1210,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1209 1210
1210 d.AABB aabb; 1211 d.AABB aabb;
1211 d.GeomGetAABB(feetbox, out aabb); 1212 d.GeomGetAABB(feetbox, out aabb);
1212 float chrminZ = aabb.MinZ - 0.02f; // move up a bit 1213 float chrminZ = aabb.MinZ; ; // move up a bit
1213 Vector3 posch = localpos; 1214 Vector3 posch = localpos;
1214 1215
1215 float ftmp; 1216 float ftmp;
@@ -1252,7 +1253,7 @@ namespace OpenSim.Region.Physics.OdePlugin
1252 contact.PenetrationDepth = depth; 1253 contact.PenetrationDepth = depth;
1253 contact.Position.X = localpos.X; 1254 contact.Position.X = localpos.X;
1254 contact.Position.Y = localpos.Y; 1255 contact.Position.Y = localpos.Y;
1255 contact.Position.Z = chrminZ; 1256 contact.Position.Z = terrainheight;
1256 contact.SurfaceNormal.X = 0.0f; 1257 contact.SurfaceNormal.X = 0.0f;
1257 contact.SurfaceNormal.Y = 0.0f; 1258 contact.SurfaceNormal.Y = 0.0f;
1258 contact.SurfaceNormal.Z = -1f; 1259 contact.SurfaceNormal.Z = -1f;
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
index 8878820..15eb01f 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs
@@ -1251,13 +1251,13 @@ namespace OpenSim.Region.Physics.OdePlugin
1251 1251
1252 #region Add/Remove Entities 1252 #region Add/Remove Entities
1253 1253
1254 public override PhysicsActor AddAvatar(string avName, Vector3 position, Vector3 size, float feetOffset, bool isFlying) 1254 public override PhysicsActor AddAvatar(uint localID, string avName, Vector3 position, Vector3 size, float feetOffset, bool isFlying)
1255 { 1255 {
1256 Vector3 pos; 1256 Vector3 pos;
1257 pos.X = position.X; 1257 pos.X = position.X;
1258 pos.Y = position.Y; 1258 pos.Y = position.Y;
1259 pos.Z = position.Z; 1259 pos.Z = position.Z;
1260 OdeCharacter newAv = new OdeCharacter(avName, this, pos, size, feetOffset, avDensity, avMovementDivisorWalk, avMovementDivisorRun); 1260 OdeCharacter newAv = new OdeCharacter(localID,avName, this, pos, size, feetOffset, avDensity, avMovementDivisorWalk, avMovementDivisorRun);
1261 newAv.Flying = isFlying; 1261 newAv.Flying = isFlying;
1262 newAv.MinimumGroundFlightOffset = minimumGroundFlightOffset; 1262 newAv.MinimumGroundFlightOffset = minimumGroundFlightOffset;
1263 1263