* Fix for exception in landmanager crash.

0.6.0-stable
Adam Frisby 2008-03-06 23:14:24 +00:00
parent a360116502
commit c9eb051936
2 changed files with 15 additions and 4 deletions

View File

@ -439,12 +439,25 @@ namespace OpenSim.Region.Environment.LandManagement
}
}
}
int tx = min_x * 4;
if (tx > 255)
tx = 255;
int ty = min_y * 4;
if (ty > 255)
ty = 255;
landData.AABBMin =
new LLVector3((float)(min_x * 4), (float)(min_y * 4),
(float)m_scene.Heightmap[(min_x * 4), (min_y * 4)]);
(float)m_scene.Heightmap[tx, ty]);
tx = max_x * 4;
if (tx > 255)
tx = 255;
ty = max_y * 4;
if (ty > 255)
ty = 255;
landData.AABBMax =
new LLVector3((float)(max_x * 4), (float)(max_y * 4),
(float)m_scene.Heightmap[(max_x * 4), (max_y * 4)]);
(float)m_scene.Heightmap[tx, ty]);
landData.area = tempArea;
}

View File

@ -269,8 +269,6 @@ namespace OpenSim.Region.Environment.Modules.Terrain
m_tainted = false;
m_scene.PhysicsScene.SetTerrain(m_channel.GetFloatsSerialised());
m_scene.SaveTerrain();
//m_scene.CreateTerrainTexture(true);
}
}