diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-01-01 00:42:00 +0100 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-01-01 00:42:00 +0100 |
commit | 5b0cf80a76e49cee88e796bb8c4b53fd3ca8f3c5 (patch) | |
tree | 2e2bca559ef34473733d63a022c74a711c894830 /src/render/Shadows.cpp | |
parent | some not fully tested stuff (diff) | |
parent | making particleobject compile on vs2015 (diff) | |
download | re3-5b0cf80a76e49cee88e796bb8c4b53fd3ca8f3c5.tar re3-5b0cf80a76e49cee88e796bb8c4b53fd3ca8f3c5.tar.gz re3-5b0cf80a76e49cee88e796bb8c4b53fd3ca8f3c5.tar.bz2 re3-5b0cf80a76e49cee88e796bb8c4b53fd3ca8f3c5.tar.lz re3-5b0cf80a76e49cee88e796bb8c4b53fd3ca8f3c5.tar.xz re3-5b0cf80a76e49cee88e796bb8c4b53fd3ca8f3c5.tar.zst re3-5b0cf80a76e49cee88e796bb8c4b53fd3ca8f3c5.zip |
Diffstat (limited to 'src/render/Shadows.cpp')
-rw-r--r-- | src/render/Shadows.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/render/Shadows.cpp b/src/render/Shadows.cpp index 5b6bb976..1d100d4d 100644 --- a/src/render/Shadows.cpp +++ b/src/render/Shadows.cpp @@ -1516,11 +1516,11 @@ CShadows::UpdatePermanentShadows(void) aPermanentShadows[i].m_nType = SHADOWTYPE_NONE; else { - if ( timePassed >= (aPermanentShadows[i].m_nLifeTime*(1-(1/4))) ) + if ( timePassed >= (aPermanentShadows[i].m_nLifeTime * 3 / 4) ) { // timePassed == 0 -> 4 // timePassed == aPermanentShadows[i].m_nLifeTime -> 0 - float fMult = 1.0f - (timePassed - (aPermanentShadows[i].m_nLifeTime*(1-(1/4)))) / (aPermanentShadows[i].m_nLifeTime / 4); + float fMult = 1.0f - float(timePassed - (aPermanentShadows[i].m_nLifeTime * 3 / 4)) / (aPermanentShadows[i].m_nLifeTime / 4); StoreStaticShadow((uint32)&aPermanentShadows[i], aPermanentShadows[i].m_nType, |