Merge branch 'future' of git://github.com/siana/SingularityViewer.git into BatchIndexing

Conflicts:
	indra/newview/hippopanelgrids.cpp
	indra/newview/llstartup.cpp
	indra/newview/llsurface.cpp
	indra/newview/llviewermessage.cpp
	indra/newview/llviewerparceloverlay.cpp
	indra/newview/llviewertexturelist.cpp
	indra/newview/llworld.cpp
This commit is contained in:
Shyotl
2011-09-09 16:53:12 -05:00
84 changed files with 2142 additions and 808 deletions

View File

@@ -176,6 +176,7 @@ 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);
@@ -299,7 +300,7 @@ void LLSurface::initTextures()
mWaterObjp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, mRegionp);
gPipeline.createObject(mWaterObjp);
LLVector3d water_pos_global = from_region_handle(mRegionp->getHandle());
water_pos_global += LLVector3d(128.0, 128.0, DEFAULT_WATER_HEIGHT);
water_pos_global += LLVector3d(mRegionp->getWidth()/2, mRegionp->getWidth()/2, DEFAULT_WATER_HEIGHT);
mWaterObjp->setPositionGlobal(water_pos_global);
}
}
@@ -329,8 +330,8 @@ void LLSurface::setOriginGlobal(const LLVector3d &origin_global)
// Hack!
if (mWaterObjp.notNull() && mWaterObjp->mDrawable.notNull())
{
const F64 x = origin_global.mdV[VX] + 128.0;
const F64 y = origin_global.mdV[VY] + 128.0;
const F64 x = origin_global.mdV[VX] + (F64)mRegionp->getWidth()/2;
const F64 y = origin_global.mdV[VY] + (F64)mRegionp->getWidth()/2;
const F64 z = mWaterObjp->getPositionGlobal().mdV[VZ];
LLVector3d water_origin_global(x, y, z);
@@ -691,14 +692,22 @@ void LLSurface::decompressDCTPatch(LLBitPack &bitpack, LLGroupHeader *gopp, BOOL
while (1)
{
decode_patch_header(bitpack, &ph);
decode_patch_header(bitpack, &ph, b_large_patch);
if (ph.quant_wbits == END_OF_PATCHES)
{
break;
}
i = ph.patchids >> 5;
j = ph.patchids & 0x1F;
if (b_large_patch)
{
i = ph.patchids >> 16; //x
j = ph.patchids & 0xFFFF; //y
}
else
{
i = ph.patchids >> 5; //x
j = ph.patchids & 0x1F; //y
}
if ((i >= mPatchesPerEdge) || (j >= mPatchesPerEdge))
{