mirror of
https://github.com/GTAmodding/re3.git
synced 2025-10-11 05:00:35 +00:00
fixed boats for new renderer
This commit is contained in:
parent
e1279b01bc
commit
244b91ee80
6 changed files with 146 additions and 47 deletions
|
@ -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)
|
||||
|
|
|
@ -62,7 +62,8 @@ public:
|
|||
virtual void GetComponentWorldPosition(int32 component, CVector &pos);
|
||||
virtual bool IsComponentPresent(int32 component) { return true; }
|
||||
virtual void BlowUpCar(CEntity *ent);
|
||||
|
||||
|
||||
void RenderWaterOutPolys(void);
|
||||
void ApplyWaterResistance(void);
|
||||
void SetupModelNodes();
|
||||
void PruneWakeTrail(void);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue