* fix for Bug 563

* fix for ODE geoms not getting disposed of properly when resizing.
afrisby
Teravus Ovares 2007-11-06 17:19:10 +00:00
parent ee1fcc729c
commit 919118f0ef
2 changed files with 9 additions and 2 deletions

View File

@ -361,7 +361,11 @@ namespace OpenSim.Region.Physics.OdePlugin.Meshing
CalcNormals(mesh);
break;
default:
mesh = null;
mesh = CreateBoxMesh(primName, primShape, size);
CalcNormals(mesh);
//Set default mesh to cube otherwise it'll return
// null and crash on the 'setMesh' method in the physics plugins.
//mesh = null;
break;
}

View File

@ -1086,9 +1086,12 @@ namespace OpenSim.Region.Physics.OdePlugin
// Construction of new prim
if (this._parent_scene.needsMeshing(_pbs))
{
// Don't need to re-enable body.. it's done in SetMesh
Mesh mesh = Meshmerizer.CreateMesh(oldname, _pbs, _size);
// createmesh returns null when it's a shape that isn't a cube.
if (mesh != null)
setMesh(_parent_scene, mesh);
} else {
prim_geom = d.CreateBox(_parent_scene.space, _size.X, _size.Y, _size.Z);