From 4afe393ce4d487b95a52b15cd53fdefa796c3d1e Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Mon, 19 Nov 2007 15:37:50 +0000 Subject: * Space allocation fix for prim outside region. >256 & <0. --- OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'OpenSim/Region/Physics') 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 public int[] calculateSpaceArrayItemFromPos(PhysicsVector pos) { int[] returnint = new int[2]; + returnint[0] = (int)(pos.X / metersInSpace); + + if (returnint[0] > ((int)(259f / metersInSpace))) + returnint[0] = ((int)(259f / metersInSpace)); + if (returnint[0] < 0) + returnint[0] = 0; + returnint[1] = (int)(pos.Y / metersInSpace); + if (returnint[0] > ((int)(259f / metersInSpace))) + returnint[0] = ((int)(259f / metersInSpace)); + if (returnint[0] < 0) + returnint[0] = 0; + return returnint; } -- cgit v1.1