mirror of
https://github.com/GTAmodding/re3.git
synced 2021-02-19 17:49:54 +01:00
make screen droplets not crash without neo.txd
This commit is contained in:
parent
aefaa17a84
commit
450cd17d16
@ -79,8 +79,10 @@ ScreenDroplets::Initialise(void)
|
|||||||
void
|
void
|
||||||
ScreenDroplets::InitDraw(void)
|
ScreenDroplets::InitDraw(void)
|
||||||
{
|
{
|
||||||
if(CustomPipes::neoTxd)
|
if(CustomPipes::neoTxd == nil)
|
||||||
ms_maskTex = CustomPipes::neoTxd->find("dropmask");
|
return;
|
||||||
|
|
||||||
|
ms_maskTex = CustomPipes::neoTxd->find("dropmask");
|
||||||
|
|
||||||
ms_screenTex = RwTextureCreate(nil);
|
ms_screenTex = RwTextureCreate(nil);
|
||||||
RwTextureSetFilterMode(ms_screenTex, rwFILTERLINEAR);
|
RwTextureSetFilterMode(ms_screenTex, rwFILTERLINEAR);
|
||||||
@ -136,6 +138,10 @@ ScreenDroplets::Shutdown(void)
|
|||||||
void
|
void
|
||||||
ScreenDroplets::Process(void)
|
ScreenDroplets::Process(void)
|
||||||
{
|
{
|
||||||
|
// no need to do anything if we can't render
|
||||||
|
if(CustomPipes::neoTxd == nil)
|
||||||
|
return;
|
||||||
|
|
||||||
ProcessCameraMovement();
|
ProcessCameraMovement();
|
||||||
SprayDrops();
|
SprayDrops();
|
||||||
ProcessMoving();
|
ProcessMoving();
|
||||||
@ -173,6 +179,9 @@ ScreenDroplets::Render(void)
|
|||||||
{
|
{
|
||||||
ScreenDrop *drop;
|
ScreenDrop *drop;
|
||||||
|
|
||||||
|
if(CustomPipes::neoTxd == nil)
|
||||||
|
return;
|
||||||
|
|
||||||
DefinedState();
|
DefinedState();
|
||||||
RwRenderStateSet(rwRENDERSTATETEXTURERASTER, RwTextureGetRaster(ms_maskTex));
|
RwRenderStateSet(rwRENDERSTATETEXTURERASTER, RwTextureGetRaster(ms_maskTex));
|
||||||
RwRenderStateSet(rwRENDERSTATEFOGENABLE, FALSE);
|
RwRenderStateSet(rwRENDERSTATEFOGENABLE, FALSE);
|
||||||
|
Loading…
Reference in New Issue
Block a user