From e0b3418e65a81ed986507c186ba5f2e2eae1cb30 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Fri, 8 May 2020 14:34:21 +0300 Subject: Fix water UV on high FPS and inverted free camera --- src/render/WaterLevel.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/render/WaterLevel.cpp') diff --git a/src/render/WaterLevel.cpp b/src/render/WaterLevel.cpp index d7035ab1..e8e79f96 100644 --- a/src/render/WaterLevel.cpp +++ b/src/render/WaterLevel.cpp @@ -351,8 +351,13 @@ CWaterLevel::RenderWater() if ( !CTimer::GetIsPaused() ) { +#ifdef FIX_BUGS + TEXTURE_ADDU += (CGeneral::GetRandomNumberInRange(-0.0005f, 0.0005f) + windAddUV) * CTimer::GetTimeStepFix(); + TEXTURE_ADDV += (CGeneral::GetRandomNumberInRange(-0.0005f, 0.0005f) + windAddUV) * CTimer::GetTimeStepFix(); +#else TEXTURE_ADDU += CGeneral::GetRandomNumberInRange(-0.0005f, 0.0005f) + windAddUV; TEXTURE_ADDV += CGeneral::GetRandomNumberInRange(-0.0005f, 0.0005f) + windAddUV; +#endif } if ( TEXTURE_ADDU >= 1.0f ) -- cgit v1.2.3