Fixed bug of avie going under the terrain when crossing regions in certain directions. This was a 1-off bug: the terrain was being placed in 127, 127 resulting in a bounding box if -2, 256. I placed it in 128, 128 resulting in a bounding box of -1, 257.

iar_mods
Diva Canto 2011-12-20 09:43:39 -08:00
parent 964ec57ffe
commit 25cbba9bca
1 changed files with 2 additions and 2 deletions

View File

@ -3430,7 +3430,7 @@ namespace OpenSim.Region.Physics.OdePlugin
private void SetTerrain(float[] heightMap, Vector3 pOffset)
{
int startTime = Util.EnvironmentTickCount();
m_log.DebugFormat("[ODE SCENE]: Setting terrain for {0}", Name);
m_log.DebugFormat("[ODE SCENE]: Setting terrain for {0} with offset {1}", Name, pOffset);
// this._heightmap[i] = (double)heightMap[i];
// dbm (danx0r) -- creating a buffer zone of one extra sample all around
@ -3544,7 +3544,7 @@ namespace OpenSim.Region.Physics.OdePlugin
d.RFromAxisAndAngle(out R, v3.X, v3.Y, v3.Z, angle);
d.GeomSetRotation(GroundGeom, ref R);
d.GeomSetPosition(GroundGeom, (pOffset.X + ((int)Constants.RegionSize * 0.5f)) - 1, (pOffset.Y + ((int)Constants.RegionSize * 0.5f)) - 1, 0);
d.GeomSetPosition(GroundGeom, (pOffset.X + ((int)Constants.RegionSize * 0.5f)), (pOffset.Y + ((int)Constants.RegionSize * 0.5f)), 0);
IntPtr testGround = IntPtr.Zero;
if (RegionTerrain.TryGetValue(pOffset, out testGround))
{