* Some Physics Scene Changes to prepare for larger regions

This commit is contained in:
Teravus Ovares (Dan Olivares)
2009-08-18 11:05:07 -04:00
parent 30ce56e721
commit c54cb59a71
4 changed files with 59 additions and 52 deletions

View File

@@ -161,7 +161,7 @@ namespace OpenSim.Region.Physics.OdePlugin
}
else
{
_position = new PhysicsVector(((int)Constants.RegionSize * 0.5f), ((int)Constants.RegionSize * 0.5f), parent_scene.GetTerrainHeightAtXY(128, 128) + 10);
_position = new PhysicsVector(((int)_parent_scene.WorldExtents.X * 0.5f), ((int)_parent_scene.WorldExtents.Y * 0.5f), parent_scene.GetTerrainHeightAtXY(128, 128) + 10);
m_taintPosition.X = _position.X;
m_taintPosition.Y = _position.Y;
m_taintPosition.Z = _position.Z;
@@ -1096,8 +1096,8 @@ namespace OpenSim.Region.Physics.OdePlugin
// kluge to keep things in bounds. ODE lets dead avatars drift away (they should be removed!)
if (vec.X < 0.0f) vec.X = 0.0f;
if (vec.Y < 0.0f) vec.Y = 0.0f;
if (vec.X > (int)Constants.RegionSize - 0.05f) vec.X = (int)Constants.RegionSize - 0.05f;
if (vec.Y > (int)Constants.RegionSize - 0.05f) vec.Y = (int)Constants.RegionSize - 0.05f;
if (vec.X > (int)_parent_scene.WorldExtents.X - 0.05f) vec.X = (int)_parent_scene.WorldExtents.X - 0.05f;
if (vec.Y > (int)_parent_scene.WorldExtents.Y - 0.05f) vec.Y = (int)_parent_scene.WorldExtents.Y - 0.05f;
_position.X = vec.X;
_position.Y = vec.Y;