aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorTeravus Ovares2008-01-22 09:06:44 +0000
committerTeravus Ovares2008-01-22 09:06:44 +0000
commitaf433492942ed621e95c93c949c7986f89fb57a2 (patch)
tree98542f6f73c407841aeb97b506cc2b11958ec44b /OpenSim/Region
parentGiving Mantis #388 a shot (diff)
downloadopensim-SC_OLD-af433492942ed621e95c93c949c7986f89fb57a2.zip
opensim-SC_OLD-af433492942ed621e95c93c949c7986f89fb57a2.tar.gz
opensim-SC_OLD-af433492942ed621e95c93c949c7986f89fb57a2.tar.bz2
opensim-SC_OLD-af433492942ed621e95c93c949c7986f89fb57a2.tar.xz
Giving Mantis 393 a shot (not enough info to really know for sure though).
Diffstat (limited to 'OpenSim/Region')
-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 {