diff options
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 23 |
2 files changed, 21 insertions, 4 deletions
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index e3c326b..7efe408 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -213,7 +213,7 @@ namespace OpenSim | |||
213 | { | 213 | { |
214 | m_sandbox = !startupConfig.GetBoolean("gridmode", false); | 214 | m_sandbox = !startupConfig.GetBoolean("gridmode", false); |
215 | m_physicsEngine = startupConfig.GetString("physics", "basicphysics"); | 215 | m_physicsEngine = startupConfig.GetString("physics", "basicphysics"); |
216 | m_meshEngineName = startupConfig.GetString("meshing", "Meshmerizer"); | 216 | m_meshEngineName = startupConfig.GetString("meshing", "ZeroMesher"); |
217 | m_verbose = startupConfig.GetBoolean("verbose", true); | 217 | m_verbose = startupConfig.GetBoolean("verbose", true); |
218 | m_physicalPrim = startupConfig.GetBoolean("physical_prim", true); | 218 | m_physicalPrim = startupConfig.GetBoolean("physical_prim", true); |
219 | m_permissions = startupConfig.GetBoolean("serverside_object_permissions", false); | 219 | m_permissions = startupConfig.GetBoolean("serverside_object_permissions", false); |
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 646ccb5..2ba8827 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | |||
@@ -308,7 +308,11 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
308 | p = (OdePrim) prim; | 308 | p = (OdePrim) prim; |
309 | p.disableBody(); | 309 | p.disableBody(); |
310 | } | 310 | } |
311 | d.GeomDestroy(((OdePrim)prim).prim_geom); | 311 | if (((OdePrim)prim).prim_geom != null) |
312 | { | ||
313 | if (((OdePrim)prim).prim_geom != (IntPtr) 0) | ||
314 | d.GeomDestroy(((OdePrim)prim).prim_geom); | ||
315 | } | ||
312 | _prims.Remove((OdePrim)prim); | 316 | _prims.Remove((OdePrim)prim); |
313 | 317 | ||
314 | } | 318 | } |
@@ -1181,7 +1185,13 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1181 | IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size); | 1185 | IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size); |
1182 | // createmesh returns null when it's a shape that isn't a cube. | 1186 | // createmesh returns null when it's a shape that isn't a cube. |
1183 | if (mesh != null) | 1187 | if (mesh != null) |
1184 | setMesh(_parent_scene, mesh); | 1188 | { |
1189 | setMesh(_parent_scene, mesh); | ||
1190 | } | ||
1191 | else | ||
1192 | { | ||
1193 | prim_geom = d.CreateBox(_parent_scene.space, _size.X, _size.Y, _size.Z); | ||
1194 | } | ||
1185 | } else { | 1195 | } else { |
1186 | prim_geom = d.CreateBox(_parent_scene.space, _size.X, _size.Y, _size.Z); | 1196 | prim_geom = d.CreateBox(_parent_scene.space, _size.X, _size.Y, _size.Z); |
1187 | 1197 | ||
@@ -1228,7 +1238,14 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1228 | if (this._parent_scene.needsMeshing(_pbs)) | 1238 | if (this._parent_scene.needsMeshing(_pbs)) |
1229 | { | 1239 | { |
1230 | IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size); | 1240 | IMesh mesh = _parent_scene.mesher.CreateMesh(oldname, _pbs, _size); |
1231 | setMesh(_parent_scene, mesh); | 1241 | if (mesh != null) |
1242 | { | ||
1243 | setMesh(_parent_scene, mesh); | ||
1244 | } | ||
1245 | else | ||
1246 | { | ||
1247 | prim_geom = d.CreateBox(_parent_scene.space, _size.X, _size.Y, _size.Z); | ||
1248 | } | ||
1232 | } else { | 1249 | } else { |
1233 | prim_geom = d.CreateBox(_parent_scene.space, _size.X, _size.Y, _size.Z); | 1250 | prim_geom = d.CreateBox(_parent_scene.space, _size.X, _size.Y, _size.Z); |
1234 | } | 1251 | } |