diff options
author | aap <aap@papnet.eu> | 2021-01-05 11:12:48 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2021-01-05 11:12:48 +0100 |
commit | e6ef2f12dea9139c4fb303992c2d8f906e302a49 (patch) | |
tree | 951bd0b4534cf32cdb8c60b29e78898ee6efe2df /src/vehicles | |
parent | More audio fix (diff) | |
download | re3-e6ef2f12dea9139c4fb303992c2d8f906e302a49.tar re3-e6ef2f12dea9139c4fb303992c2d8f906e302a49.tar.gz re3-e6ef2f12dea9139c4fb303992c2d8f906e302a49.tar.bz2 re3-e6ef2f12dea9139c4fb303992c2d8f906e302a49.tar.lz re3-e6ef2f12dea9139c4fb303992c2d8f906e302a49.tar.xz re3-e6ef2f12dea9139c4fb303992c2d8f906e302a49.tar.zst re3-e6ef2f12dea9139c4fb303992c2d8f906e302a49.zip |
Diffstat (limited to 'src/vehicles')
-rw-r--r-- | src/vehicles/Boat.cpp | 20 | ||||
-rw-r--r-- | src/vehicles/Boat.h | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/vehicles/Boat.cpp b/src/vehicles/Boat.cpp index aba48bad..f2f80569 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 "HandlingMgr.h" @@ -719,6 +720,15 @@ CBoat::Render() ((CVehicleModelInfo*)CModelInfo::GetModelInfo(GetModelIndex()))->SetVehicleColour(m_currentColour1, m_currentColour2); if (!CVehicle::bWheelsOnlyCheat) CEntity::Render(); +#ifdef NEW_RENDERER + if(!gbNewRenderer) +#endif + RenderWaterOutPolys(); // not separate function in III +} + +void +CBoat::RenderWaterOutPolys(void) +{ KeepWaterOutIndices[0] = 0; KeepWaterOutIndices[1] = 2; KeepWaterOutIndices[2] = 1; @@ -758,19 +768,29 @@ 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(); } +#ifdef NEW_RENDERER + if(!gbNewRenderer) +#endif +{ RwRenderStateSet(rwRENDERSTATEFOGENABLE, (void*)TRUE); RwRenderStateSet(rwRENDERSTATESRCBLEND, (void*)rwBLENDSRCALPHA); RwRenderStateSet(rwRENDERSTATEDESTBLEND, (void*)rwBLENDINVSRCALPHA); } +} void CBoat::Teleport(CVector v) diff --git a/src/vehicles/Boat.h b/src/vehicles/Boat.h index 56aff264..157b4852 100644 --- a/src/vehicles/Boat.h +++ b/src/vehicles/Boat.h @@ -54,6 +54,7 @@ public: virtual bool IsComponentPresent(int32 component) { return true; } virtual void BlowUpCar(CEntity *ent); + void RenderWaterOutPolys(void); void ApplyWaterResistance(void); void SetupModelNodes(); void PruneWakeTrail(void); |