bug fix on ode spaces and allow more of them on large regions

avinationmerge
UbitUmarov 2015-09-04 15:47:21 +01:00
parent a54e0339ef
commit ce1c5de793
2 changed files with 12 additions and 12 deletions

View File

@ -726,15 +726,15 @@ namespace OpenSim.Region.Physics.OdePlugin
spaceGridMaxY = (int)(WorldExtents.Y * spacesPerMeterY); spaceGridMaxY = (int)(WorldExtents.Y * spacesPerMeterY);
// ubit: limit number of spaces // ubit: limit number of spaces
if (spaceGridMaxX > 40) if (spaceGridMaxX > 100)
{ {
spaceGridMaxX = 40; spaceGridMaxX = 100;
spacesPerMeterX = WorldExtents.X / spaceGridMaxX; spacesPerMeterX = spaceGridMaxX / WorldExtents.X ;
} }
if (spaceGridMaxY > 40) if (spaceGridMaxY > 100)
{ {
spaceGridMaxY = 40; spaceGridMaxY = 100;
spacesPerMeterY = WorldExtents.X / spaceGridMaxY; spacesPerMeterY = spaceGridMaxY / WorldExtents.Y;
} }
staticPrimspace = new IntPtr[spaceGridMaxX, spaceGridMaxY]; staticPrimspace = new IntPtr[spaceGridMaxX, spaceGridMaxY];

View File

@ -552,16 +552,16 @@ namespace OpenSim.Region.Physics.OdePlugin
spaceGridMaxX = (int)(WorldExtents.X * spacesPerMeterX); spaceGridMaxX = (int)(WorldExtents.X * spacesPerMeterX);
spaceGridMaxY = (int)(WorldExtents.Y * spacesPerMeterY); spaceGridMaxY = (int)(WorldExtents.Y * spacesPerMeterY);
if (spaceGridMaxX > 40) if (spaceGridMaxX > 100)
{ {
spaceGridMaxX = 40; spaceGridMaxX = 100;
spacesPerMeterX = WorldExtents.X / spaceGridMaxX; spacesPerMeterX = spaceGridMaxX / WorldExtents.X ;
} }
if (spaceGridMaxY > 40) if (spaceGridMaxY > 100)
{ {
spaceGridMaxY = 40; spaceGridMaxY = 100;
spacesPerMeterY = WorldExtents.Y / spaceGridMaxY; spacesPerMeterY = spaceGridMaxY / WorldExtents.Y ;
} }
staticPrimspace = new IntPtr[spaceGridMaxX, spaceGridMaxY]; staticPrimspace = new IntPtr[spaceGridMaxX, spaceGridMaxY];