diff options
author | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-06-25 17:29:38 +0200 |
---|---|---|
committer | erorcun <erorcunerorcun@hotmail.com.tr> | 2021-06-25 17:29:38 +0200 |
commit | 9382e86d38bf6fd4460bced0a76d7ca73bb3a31d (patch) | |
tree | 33be7fc3ec5ae51b273682431a49d5938718419c | |
parent | Update invite link (diff) | |
download | re3-9382e86d38bf6fd4460bced0a76d7ca73bb3a31d.tar re3-9382e86d38bf6fd4460bced0a76d7ca73bb3a31d.tar.gz re3-9382e86d38bf6fd4460bced0a76d7ca73bb3a31d.tar.bz2 re3-9382e86d38bf6fd4460bced0a76d7ca73bb3a31d.tar.lz re3-9382e86d38bf6fd4460bced0a76d7ca73bb3a31d.tar.xz re3-9382e86d38bf6fd4460bced0a76d7ca73bb3a31d.tar.zst re3-9382e86d38bf6fd4460bced0a76d7ca73bb3a31d.zip |
Diffstat (limited to '')
-rw-r--r-- | src/render/Particle.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
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 ) |