Skip to content
Snippets Groups Projects
Commit 3be18ddc authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Allow instant transition between above and below water

parent 0f1a59a7
No related branches found
No related tags found
No related merge requests found
......@@ -121,18 +121,7 @@ void LLViewerCamera::updateCameraLocation(const LLVector3 &center,
mLastPointOfInterest = point_of_interest;
LLViewerRegion * regp = gAgent.getRegion();
F32 water_height = (NULL != regp) ? regp->getWaterHeight() : 0.f;
LLVector3 origin = center;
if (origin.mV[2] > water_height)
{
origin.mV[2] = llmax(origin.mV[2], water_height+0.20f);
}
else
{
origin.mV[2] = llmin(origin.mV[2], water_height-0.20f);
}
setOriginAndLookAt(origin, up_direction, point_of_interest);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment