diff options
author | aap <aap@papnet.eu> | 2020-11-04 16:22:15 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-11-04 16:22:15 +0100 |
commit | 244b91ee80217ed220338c7cb0e4e98cc9fe085a (patch) | |
tree | fd07b4777ea92102f2b022244dafab360c31d4b6 /src/vehicles/Boat.cpp | |
parent | forget ifdef (diff) | |
download | re3-244b91ee80217ed220338c7cb0e4e98cc9fe085a.tar re3-244b91ee80217ed220338c7cb0e4e98cc9fe085a.tar.gz re3-244b91ee80217ed220338c7cb0e4e98cc9fe085a.tar.bz2 re3-244b91ee80217ed220338c7cb0e4e98cc9fe085a.tar.lz re3-244b91ee80217ed220338c7cb0e4e98cc9fe085a.tar.xz re3-244b91ee80217ed220338c7cb0e4e98cc9fe085a.tar.zst re3-244b91ee80217ed220338c7cb0e4e98cc9fe085a.zip |
Diffstat (limited to '')
-rw-r--r-- | src/vehicles/Boat.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/vehicles/Boat.cpp b/src/vehicles/Boat.cpp index 8b5de929..bf42f2a8 100644 --- a/src/vehicles/Boat.cpp +++ b/src/vehicles/Boat.cpp @@ -1,5 +1,6 @@ #include "common.h" +#include "main.h" #include "General.h" #include "Timecycle.h" #include "Weather.h" @@ -1100,6 +1101,15 @@ CBoat::Render() m_nSetPieceExtendedRangeTime = CTimer::GetTimeInMilliseconds() + 3000; if (!CVehicle::bWheelsOnlyCheat) CEntity::Render(); +#ifdef NEW_RENDERER + if(!gbNewRenderer) +#endif + RenderWaterOutPolys(); // not separate function in VC +} + +void +CBoat::RenderWaterOutPolys(void) +{ if(GetModelIndex() == MI_SKIMMER) return; KeepWaterOutIndices[0] = 0; @@ -1178,11 +1188,16 @@ CBoat::Render() KeepWaterOutVertices[2].v = 1.0f; KeepWaterOutVertices[3].u = 1.0f; KeepWaterOutVertices[3].v = 1.0f; +#ifdef NEW_RENDERER + if(!gbNewRenderer) +#endif +{ RwRenderStateSet(rwRENDERSTATETEXTURERASTER, gpWaterRaster); RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE); RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)FALSE); RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDZERO); RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDONE); +} if (!CVehicle::bWheelsOnlyCheat && RwIm3DTransform(KeepWaterOutVertices, 4, GetMatrix().m_attachment, rwIM3D_VERTEXUV)) { RwIm3DRenderIndexedPrimitive(rwPRIMTYPETRILIST, KeepWaterOutIndices, 6); RwIm3DEnd(); @@ -1209,10 +1224,15 @@ CBoat::Render() RwIm3DEnd(); } } +#ifdef NEW_RENDERER + if(!gbNewRenderer) +#endif +{ RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)TRUE); RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA); RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA); } +} void CBoat::Teleport(CVector v) |