diff options
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | src/render/Particle.cpp | 19 |
2 files changed, 18 insertions, 3 deletions
@@ -1,7 +1,7 @@ <img src="https://github.com/GTAmodding/re3/blob/miami/logo.png?raw=true" alt="reVC logo" width="200"> [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2FGTAmodding%2Fre3%2Fbadge%3Fref%3Dmiami&style=flat)](https://actions-badge.atrox.dev/GTAmodding/re3/goto?ref=miami) -<a href="https://discord.gg/ERYg58ttcE"><img src="https://img.shields.io/badge/discord-join-7289DA.svg?logo=discord&longCache=true&style=flat" /></a> +<a href="https://discord.gg/RFNbjsUMGg"><img src="https://img.shields.io/badge/discord-join-7289DA.svg?logo=discord&longCache=true&style=flat" /></a> ## Intro diff --git a/src/render/Particle.cpp b/src/render/Particle.cpp index 14b48243..334ceb57 100644 --- a/src/render/Particle.cpp +++ b/src/render/Particle.cpp @@ -1880,11 +1880,20 @@ void CParticle::Render() if ( canDraw && psystem->Flags & DRAWTOP2D ) { - float screenZ = (particle->m_vecPosition.z - CDraw::GetNearClipZ()) + float screenZ; +#ifdef FIX_BUGS + bool zIsZero = true; + if ( particle->m_vecPosition.z != 0.0f ) { +#endif + screenZ = (particle->m_vecPosition.z - CDraw::GetNearClipZ()) * (CSprite::GetFarScreenZ() - CSprite::GetNearScreenZ()) * CDraw::GetFarClipZ() / ( (CDraw::GetFarClipZ() - CDraw::GetNearClipZ()) * particle->m_vecPosition.z ) + CSprite::GetNearScreenZ(); +#ifdef FIX_BUGS + zIsZero = false; + } +#endif float stretchTexW; float stretchTexH; @@ -1900,6 +1909,9 @@ void CParticle::Render() stretchTexH = CGeneral::GetRandomNumberInRange(0.1f, 1.0f) * psystem->m_vecTextureStretch.y + 63.0f; } +#ifdef FIX_BUGS + if (!zIsZero) { +#endif if ( i == PARTICLE_WATERDROP ) { @@ -2001,7 +2013,10 @@ void CParticle::Render() canDraw = false; } - +#ifdef FIX_BUGS + } + if ( !(zIsZero && (i == PARTICLE_WATERDROP || i == PARTICLE_BLOODDROP || i == PARTICLE_HEATHAZE_IN_DIST || i == PARTICLE_HEATHAZE) ) ) +#endif if ( canDraw ) { if ( particle->m_nRotation != 0 ) |