mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-12-29 15:23:02 +05:00
Disable Z write for muzzleflash rendering
This commit is contained in:
parent
6fc792ed2d
commit
7ce4c99cb9
1 changed files with 6 additions and 0 deletions
|
@ -71,6 +71,9 @@ void CPed::RenderWeapon(bool bWeapon, bool bMuzzleFlash, bool bForShadow)
|
||||||
|
|
||||||
if ( bMuzzleFlash && m_pMuzzleFlashFrame != nullptr )
|
if ( bMuzzleFlash && m_pMuzzleFlashFrame != nullptr )
|
||||||
{
|
{
|
||||||
|
RwScopedRenderState zWrite(rwRENDERSTATEZWRITEENABLE);
|
||||||
|
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, FALSE);
|
||||||
|
|
||||||
SetGunFlashAlpha(false);
|
SetGunFlashAlpha(false);
|
||||||
RpAtomic* atomic = reinterpret_cast<RpAtomic*>(GetFirstObject(m_pMuzzleFlashFrame));
|
RpAtomic* atomic = reinterpret_cast<RpAtomic*>(GetFirstObject(m_pMuzzleFlashFrame));
|
||||||
RpAtomicRender( atomic );
|
RpAtomicRender( atomic );
|
||||||
|
@ -99,6 +102,9 @@ void CPed::RenderWeapon(bool bWeapon, bool bMuzzleFlash, bool bForShadow)
|
||||||
|
|
||||||
if ( bMuzzleFlash && m_pMuzzleFlashFrame != nullptr )
|
if ( bMuzzleFlash && m_pMuzzleFlashFrame != nullptr )
|
||||||
{
|
{
|
||||||
|
RwScopedRenderState zWrite(rwRENDERSTATEZWRITEENABLE);
|
||||||
|
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, FALSE);
|
||||||
|
|
||||||
SetGunFlashAlpha(true);
|
SetGunFlashAlpha(true);
|
||||||
RpAtomic* atomic = reinterpret_cast<RpAtomic*>(GetFirstObject(m_pMuzzleFlashFrame));
|
RpAtomic* atomic = reinterpret_cast<RpAtomic*>(GetFirstObject(m_pMuzzleFlashFrame));
|
||||||
RpAtomicRender( atomic );
|
RpAtomicRender( atomic );
|
||||||
|
|
Loading…
Reference in a new issue