Skip to content

Commit a5f1cca

Browse files
LLGurumarchcat
authored andcommitted
#1644 On-water property lines persist at water level
1 parent d8f0faf commit a5f1cca

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

indra/newview/llviewerparceloverlay.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ void LLViewerParcelOverlay::addPropertyLine(F32 start_x, F32 start_y, F32 dx, F3
581581
outside_y += dy * (dy - LINE_WIDTH);
582582

583583
// Middle part, full width
584-
const S32 GRID_STEP = S32( PARCEL_GRID_STEP_METERS );
584+
const S32 GRID_STEP = (S32)PARCEL_GRID_STEP_METERS;
585585
for (S32 i = 1; i < GRID_STEP; i++)
586586
{
587587
inside_z = land.resolveHeightRegion( inside_x, inside_y );
@@ -666,7 +666,9 @@ void LLViewerParcelOverlay::renderPropertyLines()
666666
return;
667667

668668
LLSurface& land = mRegion->getLand();
669-
F32 water_z = land.getWaterHeight() + 0.01f;
669+
670+
bool render_water = gPipeline.hasRenderType(LLPipeline::RENDER_TYPE_VOIDWATER);
671+
F32 water_z = render_water ? land.getWaterHeight() + 0.01f : 0;
670672

671673
LLGLSUIDefault gls_ui; // called from pipeline
672674
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);

0 commit comments

Comments
 (0)