mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 20:05:33 +08:00
* Sets ZeroMesher as default. (If you want to cut and hollow, you'll need to uncomment the Meshmerizer in OpenSim.ini)
* Fixes a geometry issue in ODE when using ZeroMesher
This commit is contained in:
@@ -213,7 +213,7 @@ namespace OpenSim
|
||||
{
|
||||
m_sandbox = !startupConfig.GetBoolean("gridmode", false);
|
||||
m_physicsEngine = startupConfig.GetString("physics", "basicphysics");
|
||||
m_meshEngineName = startupConfig.GetString("meshing", "Meshmerizer");
|
||||
m_meshEngineName = startupConfig.GetString("meshing", "ZeroMesher");
|
||||
m_verbose = startupConfig.GetBoolean("verbose", true);
|
||||
m_physicalPrim = startupConfig.GetBoolean("physical_prim", true);
|
||||
m_permissions = startupConfig.GetBoolean("serverside_object_permissions", false);
|
||||
|
||||
@@ -308,7 +308,11 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||
p = (OdePrim) prim;
|
||||
p.disableBody();
|
||||
}
|
||||
d.GeomDestroy(((OdePrim)prim).prim_geom);
|
||||
if (((OdePrim)prim).prim_geom != null)
|
||||
{
|
||||
if (((OdePrim)prim).prim_geom != (IntPtr) 0)
|
||||
d.GeomDestroy(((OdePrim)prim).prim_geom);
|
||||
}
|
||||
_prims.Remove((OdePrim)prim);
|
||||
|
||||
}
|
||||
@@ -1181,7 +1185,13 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||
IMesh mesh = _parent_scene.mesher.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
|
||||
{
|
||||
prim_geom = d.CreateBox(_parent_scene.space, _size.X, _size.Y, _size.Z);
|
||||
}
|
||||
} else {
|
||||
prim_geom = d.CreateBox(_parent_scene.space, _size.X, _size.Y, _size.Z);
|
||||
|
||||
@@ -1228,7 +1238,14 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||
if (this._parent_scene.needsMeshing(_pbs))
|
||||
{
|
||||
IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size);
|
||||
setMesh(_parent_scene, mesh);
|
||||
if (mesh != null)
|
||||
{
|
||||
setMesh(_parent_scene, mesh);
|
||||
}
|
||||
else
|
||||
{
|
||||
prim_geom = d.CreateBox(_parent_scene.space, _size.X, _size.Y, _size.Z);
|
||||
}
|
||||
} else {
|
||||
prim_geom = d.CreateBox(_parent_scene.space, _size.X, _size.Y, _size.Z);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user