Aurora var region support
Firestorm patch by Cinders Adopted from Angstrom viewer with assistance of nhede Core and Revolution Smythe.
This commit is contained in:
@@ -145,7 +145,13 @@ LLViewerParcelMgr::LLViewerParcelMgr()
|
||||
mHoverParcel = new LLParcel();
|
||||
mCollisionParcel = new LLParcel();
|
||||
|
||||
mParcelsPerEdge = S32( REGION_WIDTH_METERS / PARCEL_GRID_STEP_METERS );
|
||||
// <FS:CR> Aurora Sim
|
||||
// Max region size on Aurora-Sim, 8192, just creating larger buffers, it will still work on Second Life and Opensim
|
||||
F32 region_size = 8192.f;
|
||||
|
||||
mParcelsPerEdge = S32( region_size / PARCEL_GRID_STEP_METERS );
|
||||
//mParcelsPerEdge = S32( REGION_WIDTH_METERS / PARCEL_GRID_STEP_METERS );
|
||||
// </FS:CR> Aurora Sim
|
||||
mHighlightSegments = new U8[(mParcelsPerEdge+1)*(mParcelsPerEdge+1)];
|
||||
resetSegments(mHighlightSegments);
|
||||
|
||||
@@ -168,9 +174,19 @@ LLViewerParcelMgr::LLViewerParcelMgr()
|
||||
mAgentParcelOverlay[i] = 0;
|
||||
}
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
mParcelsPerEdge = S32( REGION_WIDTH_METERS / PARCEL_GRID_STEP_METERS );
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
mTeleportInProgress = TRUE; // the initial parcel update is treated like teleport
|
||||
}
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
void LLViewerParcelMgr::init(F32 region_size)
|
||||
{
|
||||
mParcelsPerEdge = S32( region_size / PARCEL_GRID_STEP_METERS );
|
||||
}
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
LLViewerParcelMgr::~LLViewerParcelMgr()
|
||||
{
|
||||
@@ -450,9 +466,15 @@ LLParcelSelectionHandle LLViewerParcelMgr::selectParcelInRectangle()
|
||||
void LLViewerParcelMgr::selectCollisionParcel()
|
||||
{
|
||||
// BUG: Claim to be in the agent's region
|
||||
mWestSouth = gAgent.getRegion()->getOriginGlobal();
|
||||
// <FS:CR> Aurora Sim
|
||||
//mWestSouth = gAgent.getRegion()->getOriginGlobal();
|
||||
//mEastNorth = mWestSouth;
|
||||
//mEastNorth += LLVector3d(PARCEL_GRID_STEP_METERS, PARCEL_GRID_STEP_METERS, 0.0);
|
||||
mWestSouth = getSelectionRegion()->getOriginGlobal();
|
||||
mEastNorth = mWestSouth;
|
||||
mEastNorth += LLVector3d(PARCEL_GRID_STEP_METERS, PARCEL_GRID_STEP_METERS, 0.0);
|
||||
mEastNorth += LLVector3d((getSelectionRegion()->getWidth() / REGION_WIDTH_METERS) * PARCEL_GRID_STEP_METERS,
|
||||
(getSelectionRegion()->getWidth() / REGION_WIDTH_METERS) * PARCEL_GRID_STEP_METERS, 0.0);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
// BUG: must be in the sim you are in
|
||||
LLMessageSystem *msg = gMessageSystem;
|
||||
@@ -1410,8 +1432,11 @@ void LLViewerParcelMgr::processParcelOverlay(LLMessageSystem *msg, void **user)
|
||||
return;
|
||||
}
|
||||
|
||||
S32 parcels_per_edge = LLViewerParcelMgr::getInstance()->mParcelsPerEdge;
|
||||
S32 expected_size = parcels_per_edge * parcels_per_edge / PARCEL_OVERLAY_CHUNKS;
|
||||
// <FS:CR> Aurora Sim
|
||||
//S32 parcels_per_edge = LLViewerParcelMgr::getInstance()->mParcelsPerEdge;
|
||||
//S32 expected_size = parcels_per_edge * parcels_per_edge / PARCEL_OVERLAY_CHUNKS;
|
||||
S32 expected_size = 1024;
|
||||
// </FS:CR> Aurora Sim
|
||||
if (packed_overlay_size != expected_size)
|
||||
{
|
||||
llwarns << "Got parcel overlay size " << packed_overlay_size
|
||||
@@ -1474,6 +1499,15 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use
|
||||
S32 other_clean_time = 0;
|
||||
|
||||
LLViewerParcelMgr& parcel_mgr = LLViewerParcelMgr::instance();
|
||||
// <FS:CR> Aurora Sim
|
||||
LLViewerRegion* msg_region = LLWorld::getInstance()->getRegion( msg->getSender() );
|
||||
if(msg_region) {
|
||||
parcel_mgr.mParcelsPerEdge = S32( msg_region->getWidth() / PARCEL_GRID_STEP_METERS );
|
||||
}
|
||||
else {
|
||||
parcel_mgr.mParcelsPerEdge = S32( gAgent.getRegion()->getWidth() / PARCEL_GRID_STEP_METERS );
|
||||
}
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_RequestResult, request_result );
|
||||
msg->getS32Fast(_PREHASH_ParcelData, _PREHASH_SequenceID, sequence_id );
|
||||
|
||||
Reference in New Issue
Block a user