Variable size region support, by RevolutionSmythe

This commit is contained in:
Siana Gearz
2011-08-03 17:40:06 +02:00
parent 3bde58d970
commit e70bc6b800
24 changed files with 155 additions and 49 deletions

View File

@@ -58,6 +58,7 @@ const U8 OVERLAY_IMG_COMPONENTS = 4;
LLViewerParcelOverlay::LLViewerParcelOverlay(LLViewerRegion* region, F32 region_width_meters)
: mRegion( region ),
mParcelGridsPerEdge( S32( region_width_meters / PARCEL_GRID_STEP_METERS ) ),
mRegionSize(S32(region_width_meters)),
mDirty( FALSE ),
mTimeSinceLastUpdate(),
mOverlayTextureIdx(-1),
@@ -298,7 +299,8 @@ void LLViewerParcelOverlay::uncompressLandOverlay(S32 chunk, U8 *packed_overlay)
{
// Unpack the message data into the ownership array
S32 size = mParcelGridsPerEdge * mParcelGridsPerEdge;
S32 chunk_size = size / PARCEL_OVERLAY_CHUNKS;
S32 mParcelOverLayChunks = mRegionSize * mRegionSize / (128 * 128);
S32 chunk_size = size / mParcelOverLayChunks;
memcpy(mOwnership + chunk*chunk_size, packed_overlay, chunk_size); /*Flawfinder: ignore*/