From af433492942ed621e95c93c949c7986f89fb57a2 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Tue, 22 Jan 2008 09:06:44 +0000 Subject: Giving Mantis 393 a shot (not enough info to really know for sure though). --- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index cd84c4d..d13342b 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -138,7 +138,14 @@ namespace OpenSim.Region.Physics.OdePlugin { if (_size.X == _size.Y && _size.Y == _size.Z && _size.X == _size.Z) { - prim_geom = d.CreateSphere(m_targetSpace, _size.X / 2); + if (((_size.X / 2f) > 0f) && ((_size.X / 2f) < 1000)) + { + prim_geom = d.CreateSphere(m_targetSpace, _size.X / 2); + } + else + { + prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z); + } } else { @@ -490,7 +497,16 @@ namespace OpenSim.Region.Physics.OdePlugin { if (_size.X == _size.Y && _size.Y == _size.Z && _size.X == _size.Z) { - prim_geom = d.CreateSphere(m_targetSpace, _size.X / 2); + if (((_size.X / 2f) > 0f) && ((_size.X / 2f) < 1000)) + { + prim_geom = d.CreateSphere(m_targetSpace, _size.X / 2); + } + else + { + OpenSim.Framework.Console.MainLog.Instance.Verbose("PHYSICS", "Failed to load a sphere bad size"); + prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z); + } + } else { -- cgit v1.1