mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
* Space allocation fix for prim outside region. >256 & <0.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user