diff options
author | UbitUmarov | 2012-12-11 17:14:32 +0000 |
---|---|---|
committer | UbitUmarov | 2012-12-11 17:14:32 +0000 |
commit | 28ea08c3e234f8ca3c6590af4045349af7fed844 (patch) | |
tree | 744b0040d1aa64fea05cfa5513a0d4f50f059fea /OpenSim/Region/Physics/UbitOdePlugin | |
parent | missing files remove some warnings... (diff) | |
download | opensim-SC_OLD-28ea08c3e234f8ca3c6590af4045349af7fed844.zip opensim-SC_OLD-28ea08c3e234f8ca3c6590af4045349af7fed844.tar.gz opensim-SC_OLD-28ea08c3e234f8ca3c6590af4045349af7fed844.tar.bz2 opensim-SC_OLD-28ea08c3e234f8ca3c6590af4045349af7fed844.tar.xz |
fix let other phys plugins work.. broken when added feetOffset
Diffstat (limited to 'OpenSim/Region/Physics/UbitOdePlugin')
-rw-r--r-- | OpenSim/Region/Physics/UbitOdePlugin/ODECharacter.cs | 7 | ||||
-rw-r--r-- | OpenSim/Region/Physics/UbitOdePlugin/OdeScene.cs | 4 |
2 files changed, 6 insertions, 5 deletions
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 | ||