RenderPedCB from VC

This commit is contained in:
aap 2020-05-11 22:24:53 +02:00
parent 95920d54f2
commit 70a8234dad

View File

@ -557,12 +557,16 @@ RpAtomic*
CVisibilityPlugins::RenderPedCB(RpAtomic *atomic) CVisibilityPlugins::RenderPedCB(RpAtomic *atomic)
{ {
int32 alpha; int32 alpha;
RwV3d cam2atm;
alpha = GetClumpAlpha(RpAtomicGetClump(atomic)); RwV3dSub(&cam2atm, &RwFrameGetLTM(RpAtomicGetFrame(atomic))->pos, ms_pCameraPosn);
if(alpha == 255) if(RwV3dDotProduct(&cam2atm, &cam2atm) < ms_pedLod1Dist){
AtomicDefaultRenderCallBack(atomic); alpha = GetClumpAlpha(RpAtomicGetClump(atomic));
else if(alpha == 255)
RenderAlphaAtomic(atomic, alpha); AtomicDefaultRenderCallBack(atomic);
else
RenderAlphaAtomic(atomic, alpha);
}
return atomic; return atomic;
} }