FIRE-1347: Once again render void water at height of the sim the avatar's in, to match LL's viewer.

Tonya Souther 2012-08-19 15:43:57 -05:00
parent ab0b85e2ac
commit c8fda8cb39
1 changed files with 6 additions and 3 deletions

View File

@ -883,6 +883,9 @@ void LLWorld::updateWaterObjects()
}
mHoleWaterObjects.clear();
// Use the water height of the region we're on for areas where there is no region
F32 water_height = gAgent.getRegion()->getWaterHeight();
// Now, get a list of the holes
S32 x, y;
for (x = min_x; x <= max_x; x += rwidth)
@ -891,12 +894,12 @@ void LLWorld::updateWaterObjects()
{
U64 region_handle = to_region_handle(x, y);
if (!getRegionFromHandle(region_handle))
{
{ // No region at that area, so make water
LLVOWater* waterp = (LLVOWater *)gObjectList.createObjectViewer(LLViewerObject::LL_VO_WATER, gAgent.getRegion());
waterp->setUseTexture(FALSE);
waterp->setPositionGlobal(LLVector3d(x + rwidth/2,
y + rwidth/2,
256.f+DEFAULT_WATER_HEIGHT));
256.f + water_height));
waterp->setScale(LLVector3((F32)rwidth, (F32)rwidth, 512.f));
gPipeline.createObject(waterp);
mHoleWaterObjects.push_back(waterp);
@ -953,7 +956,7 @@ void LLWorld::updateWaterObjects()
}
waterp->setRegion(gAgent.getRegion());
LLVector3d water_pos(water_center_x, water_center_y, 256.f+DEFAULT_WATER_HEIGHT) ;
LLVector3d water_pos(water_center_x, water_center_y, 256.f + water_height) ;
LLVector3 water_scale((F32) dim[0], (F32) dim[1], 512.f);
//stretch out to horizon