* Space allocation fix for prim outside region. >256 & <0.

afrisby
Teravus Ovares 2007-11-19 15:37:50 +00:00
parent 2fdca28dd4
commit 4afe393ce4
1 changed files with 12 additions and 0 deletions

View File

@ -606,8 +606,20 @@ namespace OpenSim.Region.Physics.OdePlugin
public int[] calculateSpaceArrayItemFromPos(PhysicsVector pos) public int[] calculateSpaceArrayItemFromPos(PhysicsVector pos)
{ {
int[] returnint = new int[2]; int[] returnint = new int[2];
returnint[0] = (int)(pos.X / metersInSpace); 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); 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; return returnint;
} }