diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-05-08 14:34:21 +0300 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-05-08 14:34:21 +0300 |
commit | e0b3418e65a81ed986507c186ba5f2e2eae1cb30 (patch) | |
tree | e823ae1a2404e1991187a1ceaf7ce505b897c32e /src/render/WaterLevel.cpp | |
parent | a8f1505517f1baf061fe6b545906eaed09f851b8 (diff) |
Fix water UV on high FPS and inverted free camera
Diffstat (limited to 'src/render/WaterLevel.cpp')
-rw-r--r-- | src/render/WaterLevel.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
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 ) |