diff options
author | Teravus Ovares | 2008-02-14 01:57:19 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-02-14 01:57:19 +0000 |
commit | e3a711536b4c2dad76184747faa0118942368400 (patch) | |
tree | 05ef7d92f8fea78a6bb93ee60a83e4e2d1eb8f52 | |
parent | Added a small but maybe important clue that UserServer is not running. (diff) | |
download | opensim-SC_OLD-e3a711536b4c2dad76184747faa0118942368400.zip opensim-SC_OLD-e3a711536b4c2dad76184747faa0118942368400.tar.gz opensim-SC_OLD-e3a711536b4c2dad76184747faa0118942368400.tar.bz2 opensim-SC_OLD-e3a711536b4c2dad76184747faa0118942368400.tar.xz |
* ODE - This fixes a few things and breaks a few more.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 22 | ||||
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 21 |
3 files changed, 19 insertions, 26 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index a394ffb..9244402 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |||
@@ -520,7 +520,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
520 | // Calculated separately to avoid errors | 520 | // Calculated separately to avoid errors |
521 | cutHull.AddVertex(legEnd); | 521 | cutHull.AddVertex(legEnd); |
522 | 522 | ||
523 | m_log.DebugFormat("Starting cutting of the hollow shape from the prim {1}", 0, primName); | 523 | // m_log.DebugFormat("Starting cutting of the hollow shape from the prim {1}", 0, primName); |
524 | SimpleHull cuttedHull = SimpleHull.SubtractHull(outerHull, cutHull); | 524 | SimpleHull cuttedHull = SimpleHull.SubtractHull(outerHull, cutHull); |
525 | 525 | ||
526 | outerHull = cuttedHull; | 526 | outerHull = cuttedHull; |
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index bf54b02..12da6a7 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | |||
@@ -92,7 +92,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
92 | 92 | ||
93 | private int debugcounter = 0; | 93 | private int debugcounter = 0; |
94 | 94 | ||
95 | public OdePrim(String primName, OdeScene parent_scene, IntPtr targetSpace, PhysicsVector pos, PhysicsVector size, | 95 | public OdePrim(String primName, OdeScene parent_scene, PhysicsVector pos, PhysicsVector size, |
96 | Quaternion rotation, IMesh mesh, PrimitiveBaseShape pbs, bool pisPhysical, CollisionLocker dode) | 96 | Quaternion rotation, IMesh mesh, PrimitiveBaseShape pbs, bool pisPhysical, CollisionLocker dode) |
97 | { | 97 | { |
98 | ode = dode; | 98 | ode = dode; |
@@ -126,7 +126,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
126 | _pbs = pbs; | 126 | _pbs = pbs; |
127 | 127 | ||
128 | _parent_scene = parent_scene; | 128 | _parent_scene = parent_scene; |
129 | m_targetSpace = targetSpace; | 129 | m_targetSpace = (IntPtr)0; |
130 | 130 | ||
131 | if (pos.Z < 0) | 131 | if (pos.Z < 0) |
132 | m_isphysical = false; | 132 | m_isphysical = false; |
@@ -433,6 +433,14 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
433 | } | 433 | } |
434 | public void changeadd(float timestep) | 434 | public void changeadd(float timestep) |
435 | { | 435 | { |
436 | int[] iprimspaceArrItem = _parent_scene.calculateSpaceArrayItemFromPos(_position); | ||
437 | IntPtr targetspace = _parent_scene.calculateSpaceForGeom(_position); | ||
438 | |||
439 | if (targetspace == IntPtr.Zero) | ||
440 | targetspace = _parent_scene.createprimspace(iprimspaceArrItem[0], iprimspaceArrItem[1]); | ||
441 | |||
442 | m_targetSpace = targetspace; | ||
443 | |||
436 | if (_mesh != null) | 444 | if (_mesh != null) |
437 | { | 445 | { |
438 | } | 446 | } |
@@ -630,11 +638,11 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
630 | 638 | ||
631 | public void changesize(float timestamp) | 639 | public void changesize(float timestamp) |
632 | { | 640 | { |
633 | if (!_parent_scene.geom_name_map.ContainsKey(prim_geom)) | 641 | //if (!_parent_scene.geom_name_map.ContainsKey(prim_geom)) |
634 | { | 642 | //{ |
635 | m_taintsize = _size; | 643 | // m_taintsize = _size; |
636 | return; | 644 | //return; |
637 | } | 645 | //} |
638 | string oldname = _parent_scene.geom_name_map[prim_geom]; | 646 | string oldname = _parent_scene.geom_name_map[prim_geom]; |
639 | 647 | ||
640 | 648 | ||
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 50687ed..f934341 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | |||
@@ -1033,16 +1033,11 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1033 | rot.z = rotation.z; | 1033 | rot.z = rotation.z; |
1034 | 1034 | ||
1035 | 1035 | ||
1036 | int[] iprimspaceArrItem = calculateSpaceArrayItemFromPos(pos); | 1036 | |
1037 | IntPtr targetspace = calculateSpaceForGeom(pos); | ||
1038 | |||
1039 | if (targetspace == IntPtr.Zero) | ||
1040 | targetspace = createprimspace(iprimspaceArrItem[0], iprimspaceArrItem[1]); | ||
1041 | |||
1042 | OdePrim newPrim; | 1037 | OdePrim newPrim; |
1043 | lock (OdeLock) | 1038 | lock (OdeLock) |
1044 | { | 1039 | { |
1045 | newPrim = new OdePrim(name, this, targetspace, pos, siz, rot, mesh, pbs, isphysical, ode); | 1040 | newPrim = new OdePrim(name, this, pos, siz, rot, mesh, pbs, isphysical, ode); |
1046 | 1041 | ||
1047 | _prims.Add(newPrim); | 1042 | _prims.Add(newPrim); |
1048 | } | 1043 | } |
@@ -1244,18 +1239,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1244 | 1239 | ||
1245 | collision_optimized(timeStep); | 1240 | collision_optimized(timeStep); |
1246 | 1241 | ||
1247 | 1242 | d.WorldQuickStep(world, ODE_STEPSIZE); | |
1248 | |||
1249 | 1243 | ||
1250 | |||
1251 | try | ||
1252 | { | ||
1253 | d.WorldQuickStep(world, ODE_STEPSIZE); | ||
1254 | } | ||
1255 | catch (StackOverflowException) | ||
1256 | { | ||
1257 | d.WorldQuickStep(world, 0.001f); | ||
1258 | } | ||
1259 | d.JointGroupEmpty(contactgroup); | 1244 | d.JointGroupEmpty(contactgroup); |
1260 | ode.dunlock(world); | 1245 | ode.dunlock(world); |
1261 | 1246 | ||