* fix for Bug 563
* fix for ODE geoms not getting disposed of properly when resizing.afrisby
parent
ee1fcc729c
commit
919118f0ef
|
@ -361,7 +361,11 @@ namespace OpenSim.Region.Physics.OdePlugin.Meshing
|
||||||
CalcNormals(mesh);
|
CalcNormals(mesh);
|
||||||
break;
|
break;
|
||||||
default:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1087,8 +1087,11 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
if (this._parent_scene.needsMeshing(_pbs))
|
if (this._parent_scene.needsMeshing(_pbs))
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
// Don't need to re-enable body.. it's done in SetMesh
|
// Don't need to re-enable body.. it's done in SetMesh
|
||||||
Mesh mesh = Meshmerizer.CreateMesh(oldname, _pbs, _size);
|
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);
|
setMesh(_parent_scene, mesh);
|
||||||
} else {
|
} else {
|
||||||
prim_geom = d.CreateBox(_parent_scene.space, _size.X, _size.Y, _size.Z);
|
prim_geom = d.CreateBox(_parent_scene.space, _size.X, _size.Y, _size.Z);
|
||||||
|
|
Loading…
Reference in New Issue