diff options
author | aap <aap@papnet.eu> | 2020-12-24 09:41:35 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-12-24 09:41:35 +0100 |
commit | 70a279febc63e5ed76c319d0c7f59ebea3cf744a (patch) | |
tree | b55f398f012b6dd016ee7a966584090be57fc12d /src/extras | |
parent | Merge branch 'master' of github.com:GTAmodding/re3 (diff) | |
download | re3-70a279febc63e5ed76c319d0c7f59ebea3cf744a.tar re3-70a279febc63e5ed76c319d0c7f59ebea3cf744a.tar.gz re3-70a279febc63e5ed76c319d0c7f59ebea3cf744a.tar.bz2 re3-70a279febc63e5ed76c319d0c7f59ebea3cf744a.tar.lz re3-70a279febc63e5ed76c319d0c7f59ebea3cf744a.tar.xz re3-70a279febc63e5ed76c319d0c7f59ebea3cf744a.tar.zst re3-70a279febc63e5ed76c319d0c7f59ebea3cf744a.zip |
Diffstat (limited to 'src/extras')
-rw-r--r-- | src/extras/screendroplets.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/extras/screendroplets.cpp b/src/extras/screendroplets.cpp index 3f91a754..54866bea 100644 --- a/src/extras/screendroplets.cpp +++ b/src/extras/screendroplets.cpp @@ -79,8 +79,10 @@ ScreenDroplets::Initialise(void) void ScreenDroplets::InitDraw(void) { - if(CustomPipes::neoTxd) - ms_maskTex = CustomPipes::neoTxd->find("dropmask"); + if(CustomPipes::neoTxd == nil) + return; + + ms_maskTex = CustomPipes::neoTxd->find("dropmask"); ms_screenTex = RwTextureCreate(nil); RwTextureSetFilterMode(ms_screenTex, rwFILTERLINEAR); @@ -136,6 +138,10 @@ ScreenDroplets::Shutdown(void) void ScreenDroplets::Process(void) { + // no need to do anything if we can't render + if(CustomPipes::neoTxd == nil) + return; + ProcessCameraMovement(); SprayDrops(); ProcessMoving(); @@ -173,6 +179,9 @@ ScreenDroplets::Render(void) { ScreenDrop *drop; + if(CustomPipes::neoTxd == nil) + return; + DefinedState(); RwRenderStateSet(rwRENDERSTATETEXTURERASTER, RwTextureGetRaster(ms_maskTex)); RwRenderStateSet(rwRENDERSTATEFOGENABLE, FALSE); |