Variable size region support, by RevolutionSmythe
This commit is contained in:
@@ -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*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user