diff options
Diffstat (limited to 'src/rw')
-rw-r--r-- | src/rw/RwHelper.cpp | 2 | ||||
-rw-r--r-- | src/rw/VisibilityPlugins.cpp | 19 | ||||
-rw-r--r-- | src/rw/VisibilityPlugins.h | 1 |
3 files changed, 22 insertions, 0 deletions
diff --git a/src/rw/RwHelper.cpp b/src/rw/RwHelper.cpp index ed618dd8..cb1d4ab5 100644 --- a/src/rw/RwHelper.cpp +++ b/src/rw/RwHelper.cpp @@ -13,6 +13,7 @@ RtCharset *debugCharset; bool gPS2alphaTest = 1; +#ifndef FINAL static bool charsetOpen; void OpenCharsetSafe() { @@ -20,6 +21,7 @@ void OpenCharsetSafe() RtCharsetOpen(); charsetOpen = true; } +#endif void CreateDebugFont() { diff --git a/src/rw/VisibilityPlugins.cpp b/src/rw/VisibilityPlugins.cpp index 14f68e52..93a478e5 100644 --- a/src/rw/VisibilityPlugins.cpp +++ b/src/rw/VisibilityPlugins.cpp @@ -218,6 +218,25 @@ CVisibilityPlugins::RenderAlphaAtomic(RpAtomic *atomic, int alpha) return atomic; } +//--MIAMI: done +RpAtomic* +CVisibilityPlugins::RenderWeaponCB(RpAtomic *atomic) +{ + RwMatrix *m; + RwV3d view; + float maxdist, distsq; + CSimpleModelInfo *mi; + + mi = GetAtomicModelInfo(atomic); + m = RwFrameGetLTM(RpAtomicGetFrame(atomic)); + RwV3dSub(&view, RwMatrixGetPos(m), ms_pCameraPosn); + maxdist = mi->GetLodDistance(0); + distsq = RwV3dDotProduct(&view, &view); + if(distsq < maxdist*maxdist) + AtomicDefaultRenderCallBack(atomic); + return atomic; +} + RpAtomic* CVisibilityPlugins::RenderFadingAtomic(RpAtomic *atomic, float camdist) { diff --git a/src/rw/VisibilityPlugins.h b/src/rw/VisibilityPlugins.h index b367d7ee..e2fc4d19 100644 --- a/src/rw/VisibilityPlugins.h +++ b/src/rw/VisibilityPlugins.h @@ -46,6 +46,7 @@ public: static RpAtomic *RenderWheelAtomicCB(RpAtomic *atomic); static RpAtomic *RenderObjNormalAtomic(RpAtomic *atomic); static RpAtomic *RenderAlphaAtomic(RpAtomic *atomic, int alpha); + static RpAtomic *RenderWeaponCB(RpAtomic *atomic); static RpAtomic *RenderFadingAtomic(RpAtomic *atm, float dist); static RpAtomic *RenderVehicleHiDetailCB(RpAtomic *atomic); |