diff options
author | aap <aap@papnet.eu> | 2020-05-11 22:24:53 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-05-11 22:24:53 +0200 |
commit | 70a8234dad441b73c998ee11b2932071ce55c540 (patch) | |
tree | 2cd3d83b87f9eacf232cfe0756478392d8f70266 /src/rw/VisibilityPlugins.cpp | |
parent | random fixes (diff) | |
download | re3-70a8234dad441b73c998ee11b2932071ce55c540.tar re3-70a8234dad441b73c998ee11b2932071ce55c540.tar.gz re3-70a8234dad441b73c998ee11b2932071ce55c540.tar.bz2 re3-70a8234dad441b73c998ee11b2932071ce55c540.tar.lz re3-70a8234dad441b73c998ee11b2932071ce55c540.tar.xz re3-70a8234dad441b73c998ee11b2932071ce55c540.tar.zst re3-70a8234dad441b73c998ee11b2932071ce55c540.zip |
Diffstat (limited to 'src/rw/VisibilityPlugins.cpp')
-rw-r--r-- | src/rw/VisibilityPlugins.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/rw/VisibilityPlugins.cpp b/src/rw/VisibilityPlugins.cpp index 5184860b..46ec8ae2 100644 --- a/src/rw/VisibilityPlugins.cpp +++ b/src/rw/VisibilityPlugins.cpp @@ -557,12 +557,16 @@ RpAtomic* CVisibilityPlugins::RenderPedCB(RpAtomic *atomic) { int32 alpha; + RwV3d cam2atm; - alpha = GetClumpAlpha(RpAtomicGetClump(atomic)); - if(alpha == 255) - AtomicDefaultRenderCallBack(atomic); - else - RenderAlphaAtomic(atomic, alpha); + RwV3dSub(&cam2atm, &RwFrameGetLTM(RpAtomicGetFrame(atomic))->pos, ms_pCameraPosn); + if(RwV3dDotProduct(&cam2atm, &cam2atm) < ms_pedLod1Dist){ + alpha = GetClumpAlpha(RpAtomicGetClump(atomic)); + if(alpha == 255) + AtomicDefaultRenderCallBack(atomic); + else + RenderAlphaAtomic(atomic, alpha); + } return atomic; } |