* Fix for exception in landmanager crash.
parent
a360116502
commit
c9eb051936
|
@ -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 =
|
landData.AABBMin =
|
||||||
new LLVector3((float)(min_x * 4), (float)(min_y * 4),
|
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 =
|
landData.AABBMax =
|
||||||
new LLVector3((float)(max_x * 4), (float)(max_y * 4),
|
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;
|
landData.area = tempArea;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -269,8 +269,6 @@ namespace OpenSim.Region.Environment.Modules.Terrain
|
||||||
m_tainted = false;
|
m_tainted = false;
|
||||||
m_scene.PhysicsScene.SetTerrain(m_channel.GetFloatsSerialised());
|
m_scene.PhysicsScene.SetTerrain(m_channel.GetFloatsSerialised());
|
||||||
m_scene.SaveTerrain();
|
m_scene.SaveTerrain();
|
||||||
|
|
||||||
//m_scene.CreateTerrainTexture(true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue