diff options
author | aap <aap@papnet.eu> | 2020-05-25 20:36:18 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-05-25 20:36:23 +0200 |
commit | 3c3b1aadc0bfd3b8d58cc9dcc269d83f6a003235 (patch) | |
tree | d1e86b5e9fe98616c3bb83554381e681330b6b6e /src/render/Shadows.cpp | |
parent | 52644192e37bad31a3f88e2bc271619e265c7507 (diff) |
small fixes
Diffstat (limited to 'src/render/Shadows.cpp')
-rw-r--r-- | src/render/Shadows.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/render/Shadows.cpp b/src/render/Shadows.cpp index 69f9dce0..d07c302a 100644 --- a/src/render/Shadows.cpp +++ b/src/render/Shadows.cpp @@ -642,12 +642,12 @@ CShadows::StoreShadowForPole(CEntity *pPole, float fOffsetX, float fOffsetY, flo PolePos.y += fOffsetX * pPole->GetRight().y + fOffsetY * pPole->GetForward().y; PolePos.z += fOffsetZ; - PolePos.x += -CTimeCycle::GetSunPosition().x * (fPoleHeight / 2); - PolePos.y += -CTimeCycle::GetSunPosition().y * (fPoleHeight / 2); + PolePos.x += -CTimeCycle::GetSunDirection().x * (fPoleHeight / 2); + PolePos.y += -CTimeCycle::GetSunDirection().y * (fPoleHeight / 2); StoreStaticShadow((uintptr)pPole + nID + _TODOCONST(51), SHADOWTYPE_DARK, gpPostShadowTex, &PolePos, - -CTimeCycle::GetSunPosition().x * (fPoleHeight / 2), - -CTimeCycle::GetSunPosition().y * (fPoleHeight / 2), + -CTimeCycle::GetSunDirection().x * (fPoleHeight / 2), + -CTimeCycle::GetSunDirection().y * (fPoleHeight / 2), CTimeCycle::GetShadowSideX() * fPoleWidth, CTimeCycle::GetShadowSideY() * fPoleWidth, 2 * (int32)((pPole->GetUp().z - 0.5f) * CTimeCycle::GetShadowStrength() * 2.0f) / 3, |