diff options
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/OdePlugin.cs')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index 4ee94b3..b40a98f 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | |||
@@ -606,8 +606,20 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
606 | public int[] calculateSpaceArrayItemFromPos(PhysicsVector pos) | 606 | public int[] calculateSpaceArrayItemFromPos(PhysicsVector pos) |
607 | { | 607 | { |
608 | int[] returnint = new int[2]; | 608 | int[] returnint = new int[2]; |
609 | |||
609 | returnint[0] = (int)(pos.X / metersInSpace); | 610 | returnint[0] = (int)(pos.X / metersInSpace); |
611 | |||
612 | if (returnint[0] > ((int)(259f / metersInSpace))) | ||
613 | returnint[0] = ((int)(259f / metersInSpace)); | ||
614 | if (returnint[0] < 0) | ||
615 | returnint[0] = 0; | ||
616 | |||
610 | returnint[1] = (int)(pos.Y / metersInSpace); | 617 | returnint[1] = (int)(pos.Y / metersInSpace); |
618 | if (returnint[0] > ((int)(259f / metersInSpace))) | ||
619 | returnint[0] = ((int)(259f / metersInSpace)); | ||
620 | if (returnint[0] < 0) | ||
621 | returnint[0] = 0; | ||
622 | |||
611 | return returnint; | 623 | return returnint; |
612 | } | 624 | } |
613 | 625 | ||