summaryrefslogtreecommitdiffstats
path: root/src/render
diff options
context:
space:
mode:
authorerorcun <erayorcunus@gmail.com>2019-11-27 22:25:03 +0100
committerGitHub <noreply@github.com>2019-11-27 22:25:03 +0100
commit37a7c48e6302fae23d2e9a51cf129efbb48dfb3e (patch)
treeb198bf9d9e39b16748dc815562f0c385215af54d /src/render
parentMerge pull request #273 from erorcun/erorcun (diff)
parentShadow/blood fade and scale fix (diff)
downloadre3-37a7c48e6302fae23d2e9a51cf129efbb48dfb3e.tar
re3-37a7c48e6302fae23d2e9a51cf129efbb48dfb3e.tar.gz
re3-37a7c48e6302fae23d2e9a51cf129efbb48dfb3e.tar.bz2
re3-37a7c48e6302fae23d2e9a51cf129efbb48dfb3e.tar.lz
re3-37a7c48e6302fae23d2e9a51cf129efbb48dfb3e.tar.xz
re3-37a7c48e6302fae23d2e9a51cf129efbb48dfb3e.tar.zst
re3-37a7c48e6302fae23d2e9a51cf129efbb48dfb3e.zip
Diffstat (limited to 'src/render')
-rw-r--r--src/render/Shadows.cpp4
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,