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:
@@ -78,6 +78,7 @@
|
||||
#include "llviewercontrol.h"
|
||||
#include "llsdserialize.h"
|
||||
|
||||
#include "llviewerparcelmgr.h" //Aurora Sim
|
||||
#ifdef LL_WINDOWS
|
||||
#pragma warning(disable:4355)
|
||||
#endif
|
||||
@@ -309,9 +310,12 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
|
||||
mReleaseNotesRequested(FALSE),
|
||||
mCapabilitiesReceived(false),
|
||||
mFeaturesReceived(false),
|
||||
mGamingFlags(0)
|
||||
mGamingFlags(0),
|
||||
// <FS:CR> Aurora Sim
|
||||
mWidth(region_width_meters)
|
||||
{
|
||||
mWidth = region_width_meters;
|
||||
// Moved this up... -> mWidth = region_width_meters;
|
||||
// </FS:CR>
|
||||
mImpl->mOriginGlobal = from_region_handle(handle);
|
||||
updateRenderMatrix();
|
||||
|
||||
@@ -321,7 +325,10 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
|
||||
mImpl->mCompositionp =
|
||||
new LLVLComposition(mImpl->mLandp,
|
||||
grids_per_region_edge,
|
||||
region_width_meters / grids_per_region_edge);
|
||||
// <FS:CR> Aurora Sim
|
||||
//region_width_meters / grids_per_region_edge);
|
||||
mWidth / grids_per_region_edge);
|
||||
// </FS:CR> Aurora Sim
|
||||
mImpl->mCompositionp->setSurface(mImpl->mLandp);
|
||||
|
||||
// Create the surfaces
|
||||
@@ -331,7 +338,11 @@ LLViewerRegion::LLViewerRegion(const U64 &handle,
|
||||
mImpl->mOriginGlobal,
|
||||
mWidth);
|
||||
|
||||
mParcelOverlay = new LLViewerParcelOverlay(this, region_width_meters);
|
||||
// <FS:CR> Aurora Sim
|
||||
//mParcelOverlay = new LLViewerParcelOverlay(this, region_width_meters);
|
||||
mParcelOverlay = new LLViewerParcelOverlay(this, mWidth);
|
||||
LLViewerParcelMgr::getInstance()->init(mWidth);
|
||||
// </FS:CR> Aurora Sim
|
||||
|
||||
setOriginGlobal(from_region_handle(handle));
|
||||
calculateCenterGlobal();
|
||||
@@ -493,6 +504,13 @@ void LLViewerRegion::setWaterHeight(F32 water_level)
|
||||
mImpl->mLandp->setWaterHeight(water_level);
|
||||
}
|
||||
|
||||
// <FS:CR> Aurora Sim
|
||||
void LLViewerRegion::rebuildWater()
|
||||
{
|
||||
mImpl->mLandp->rebuildWater();
|
||||
}
|
||||
// <FS:CR> Aurora Sim
|
||||
|
||||
F32 LLViewerRegion::getWaterHeight() const
|
||||
{
|
||||
return mImpl->mLandp->getWaterHeight();
|
||||
@@ -838,11 +856,20 @@ LLVLComposition * LLViewerRegion::getComposition() const
|
||||
|
||||
F32 LLViewerRegion::getCompositionXY(const S32 x, const S32 y) const
|
||||
{
|
||||
if (x >= 256)
|
||||
// <FS:CR> Aurora Sim
|
||||
//if (x >= 256)
|
||||
if (x >= mWidth)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
if (y >= 256)
|
||||
// <FS:CR> Aurora Sim
|
||||
//if (y >= 256)
|
||||
if (y >= mWidth)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
LLVector3d center = getCenterGlobal() + LLVector3d(256.f, 256.f, 0.f);
|
||||
// <FS:CR> Aurora Sim
|
||||
//LLVector3d center = getCenterGlobal() + LLVector3d(256.f, 256.f, 0.f);
|
||||
LLVector3d center = getCenterGlobal() + LLVector3d(mWidth, mWidth, 0.f);
|
||||
// </FS:CR> Aurora Sim
|
||||
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromPosGlobal(center);
|
||||
if (regionp)
|
||||
{
|
||||
@@ -851,8 +878,12 @@ F32 LLViewerRegion::getCompositionXY(const S32 x, const S32 y) const
|
||||
// If we're attempting to blend, then we want to make the fractional part of
|
||||
// this region match the fractional of the adjacent. For now, just minimize
|
||||
// the delta.
|
||||
F32 our_comp = getComposition()->getValueScaled(255, 255);
|
||||
F32 adj_comp = regionp->getComposition()->getValueScaled(x - 256.f, y - 256.f);
|
||||
// <FS:CR> Aurora Sim
|
||||
//F32 our_comp = getComposition()->getValueScaled(255, 255);
|
||||
//F32 adj_comp = regionp->getComposition()->getValueScaled(x - 256.f, y - 256.f);
|
||||
F32 our_comp = getComposition()->getValueScaled(mWidth-1.f, mWidth-1.f);
|
||||
F32 adj_comp = regionp->getComposition()->getValueScaled(x - regionp->getWidth(), y - regionp->getWidth());
|
||||
// </FS:CR> Aurora Sim
|
||||
while (llabs(our_comp - adj_comp) >= 1.f)
|
||||
{
|
||||
if (our_comp > adj_comp)
|
||||
@@ -869,7 +900,10 @@ F32 LLViewerRegion::getCompositionXY(const S32 x, const S32 y) const
|
||||
}
|
||||
else
|
||||
{
|
||||
LLVector3d center = getCenterGlobal() + LLVector3d(256.f, 0, 0.f);
|
||||
// <FS:CR> Aurora Sim
|
||||
//LLVector3d center = getCenterGlobal() + LLVector3d(256.f, 0, 0.f);
|
||||
LLVector3d center = getCenterGlobal() + LLVector3d(mWidth, 0.f, 0.f);
|
||||
// </FS:CR> Aurora Sim
|
||||
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromPosGlobal(center);
|
||||
if (regionp)
|
||||
{
|
||||
@@ -878,8 +912,12 @@ F32 LLViewerRegion::getCompositionXY(const S32 x, const S32 y) const
|
||||
// If we're attempting to blend, then we want to make the fractional part of
|
||||
// this region match the fractional of the adjacent. For now, just minimize
|
||||
// the delta.
|
||||
F32 our_comp = getComposition()->getValueScaled(255.f, (F32)y);
|
||||
F32 adj_comp = regionp->getComposition()->getValueScaled(x - 256.f, (F32)y);
|
||||
// <FS:CR> Aurora Sim
|
||||
//F32 our_comp = getComposition()->getValueScaled(255.f, (F32)y);
|
||||
//F32 adj_comp = regionp->getComposition()->getValueScaled(x - 256.f, (F32)y);
|
||||
F32 our_comp = getComposition()->getValueScaled(mWidth-1.f, (F32)y);
|
||||
F32 adj_comp = regionp->getComposition()->getValueScaled(x - regionp->getWidth(), (F32)y);
|
||||
// </FS:CR> Aurora Sim
|
||||
while (llabs(our_comp - adj_comp) >= 1.f)
|
||||
{
|
||||
if (our_comp > adj_comp)
|
||||
@@ -895,9 +933,15 @@ F32 LLViewerRegion::getCompositionXY(const S32 x, const S32 y) const
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (y >= 256)
|
||||
// <FS:CR> Aurora Sim
|
||||
//else if (y >= 256)
|
||||
else if (y >= mWidth)
|
||||
// </FS:CR> Aurora Sim
|
||||
{
|
||||
LLVector3d center = getCenterGlobal() + LLVector3d(0.f, 256.f, 0.f);
|
||||
// <FS:CR> Aurora Sim
|
||||
//LLVector3d center = getCenterGlobal() + LLVector3d(0.f, 256.f, 0.f);
|
||||
LLVector3d center = getCenterGlobal() + LLVector3d(0.f, mWidth, 0.f);
|
||||
// </FS:CR> Aurora Sim
|
||||
LLViewerRegion *regionp = LLWorld::getInstance()->getRegionFromPosGlobal(center);
|
||||
if (regionp)
|
||||
{
|
||||
@@ -906,8 +950,12 @@ F32 LLViewerRegion::getCompositionXY(const S32 x, const S32 y) const
|
||||
// If we're attempting to blend, then we want to make the fractional part of
|
||||
// this region match the fractional of the adjacent. For now, just minimize
|
||||
// the delta.
|
||||
F32 our_comp = getComposition()->getValueScaled((F32)x, 255.f);
|
||||
F32 adj_comp = regionp->getComposition()->getValueScaled((F32)x, y - 256.f);
|
||||
// <FS:CR> Aurora Sim
|
||||
//F32 our_comp = getComposition()->getValueScaled((F32)x, 255.f);
|
||||
//F32 adj_comp = regionp->getComposition()->getValueScaled((F32)x, y - 256.f);
|
||||
F32 our_comp = getComposition()->getValueScaled((F32)x, mWidth-1.f);
|
||||
F32 adj_comp = regionp->getComposition()->getValueScaled((F32)x, y - regionp->getWidth());
|
||||
// <FS:CR> Aurora Sim
|
||||
while (llabs(our_comp - adj_comp) >= 1.f)
|
||||
{
|
||||
if (our_comp > adj_comp)
|
||||
@@ -1651,6 +1699,9 @@ void LLViewerRegionImpl::buildCapabilityNames(LLSD& capabilityNames)
|
||||
capabilityNames.append("CustomMenuAction");
|
||||
capabilityNames.append("DispatchRegionInfo");
|
||||
capabilityNames.append("EnvironmentSettings");
|
||||
// <FS:CR> Aurora Sim
|
||||
capabilityNames.append("DispatchOpenRegionSettings");
|
||||
// </FS:CR> Aurora Sim
|
||||
capabilityNames.append("EstateChangeInfo");
|
||||
capabilityNames.append("EventQueueGet");
|
||||
capabilityNames.append("FetchLib2");
|
||||
|
||||
Reference in New Issue
Block a user