Revert "Crude port of megaregion mem corruption fix, by Rev"

This reverts commit 6b60fe40c6.
This commit is contained in:
Siana Gearz
2012-01-14 05:33:05 +01:00
parent 242134d2af
commit e835d51bdf
4 changed files with 11 additions and 9 deletions

View File

@@ -176,7 +176,6 @@ void LLSurface::create(const S32 grids_per_edge,
mNumberOfPatches = mPatchesPerEdge * mPatchesPerEdge;
mMetersPerGrid = width / ((F32)(mGridsPerEdge - 1));
mMetersPerEdge = mMetersPerGrid * (mGridsPerEdge - 1);
sTextureSize = width;
mOriginGlobal.setVec(origin_global);

View File

@@ -145,6 +145,9 @@ LLViewerParcelMgr::LLViewerParcelMgr()
mCollisionParcel = new LLParcel();
mBlockedImage = LLViewerTextureManager::getFetchedTextureFromFile("noentrylines.j2c");
mPassImage = LLViewerTextureManager::getFetchedTextureFromFile("noentrypasslines.j2c");
init(256);
}
//moved this stuff out of the constructor and into a function that we can call again after we get the region size.
@@ -152,7 +155,7 @@ LLViewerParcelMgr::LLViewerParcelMgr()
//on a single grid properly - Patrick Sapinski (2/10/2011)
void LLViewerParcelMgr::init(F32 region_size)
{
mParcelsPerEdge = S32( region_size / PARCEL_GRID_STEP_METERS );
mParcelsPerEdge = S32( REGION_WIDTH_METERS / PARCEL_GRID_STEP_METERS );
mHighlightSegments = new U8[(mParcelsPerEdge+1)*(mParcelsPerEdge+1)];
resetSegments(mHighlightSegments);

View File

@@ -242,9 +242,9 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
mCacheLoaded(FALSE),
mCacheDirty(FALSE),
mReleaseNotesRequested(FALSE),
mCapabilitiesReceived(false),
mWidth(region_width_meters)
mCapabilitiesReceived(false)
{
mWidth = region_width_meters;
mImpl->mOriginGlobal = from_region_handle(handle);
updateRenderMatrix();
@@ -256,7 +256,7 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
mImpl->mCompositionp =
new LLVLComposition(mImpl->mLandp,
grids_per_region_edge,
mWidth / grids_per_region_edge);
region_width_meters / grids_per_region_edge);
mImpl->mCompositionp->setSurface(mImpl->mLandp);
// Create the surfaces
@@ -269,9 +269,9 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
if (!gNoRender)
{
mParcelOverlay = new LLViewerParcelOverlay(this, mWidth);
//Re-init the parcel mgr for this sim
LLViewerParcelMgr::getInstance()->init(mWidth);
mParcelOverlay = new LLViewerParcelOverlay(this, region_width_meters);
//Re-init the parcel mgr for this sim
LLViewerParcelMgr::getInstance()->init(region_width_meters);
}
else
{

View File

@@ -164,7 +164,7 @@ BOOL LLVLComposition::generateHeights(const F32 x, const F32 y,
const F32 xyScaleInv = (1.f / xyScale);
const F32 zScaleInv = (1.f / zScale);
const F32 inv_width = 1.f/256.f;
const F32 inv_width = 1.f/mWidth;
// OK, for now, just have the composition value equal the height at the point.
for (S32 j = y_begin; j < y_end; j++)