aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs20
1 files changed, 18 insertions, 2 deletions
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
138 { 138 {
139 if (_size.X == _size.Y && _size.Y == _size.Z && _size.X == _size.Z) 139 if (_size.X == _size.Y && _size.Y == _size.Z && _size.X == _size.Z)
140 { 140 {
141 prim_geom = d.CreateSphere(m_targetSpace, _size.X / 2); 141 if (((_size.X / 2f) > 0f) && ((_size.X / 2f) < 1000))
142 {
143 prim_geom = d.CreateSphere(m_targetSpace, _size.X / 2);
144 }
145 else
146 {
147 prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
148 }
142 } 149 }
143 else 150 else
144 { 151 {
@@ -490,7 +497,16 @@ namespace OpenSim.Region.Physics.OdePlugin
490 { 497 {
491 if (_size.X == _size.Y && _size.Y == _size.Z && _size.X == _size.Z) 498 if (_size.X == _size.Y && _size.Y == _size.Z && _size.X == _size.Z)
492 { 499 {
493 prim_geom = d.CreateSphere(m_targetSpace, _size.X / 2); 500 if (((_size.X / 2f) > 0f) && ((_size.X / 2f) < 1000))
501 {
502 prim_geom = d.CreateSphere(m_targetSpace, _size.X / 2);
503 }
504 else
505 {
506 OpenSim.Framework.Console.MainLog.Instance.Verbose("PHYSICS", "Failed to load a sphere bad size");
507 prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z);
508 }
509
494 } 510 }
495 else 511 else
496 { 512 {