mirror of
https://github.com/CookiePLMonster/SilentPatch.git
synced 2024-12-28 23:03:01 +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 )
|
||||
{
|
||||
RwScopedRenderState zWrite(rwRENDERSTATEZWRITEENABLE);
|
||||
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, FALSE);
|
||||
|
||||
SetGunFlashAlpha(false);
|
||||
RpAtomic* atomic = reinterpret_cast<RpAtomic*>(GetFirstObject(m_pMuzzleFlashFrame));
|
||||
RpAtomicRender( atomic );
|
||||
|
@ -99,6 +102,9 @@ void CPed::RenderWeapon(bool bWeapon, bool bMuzzleFlash, bool bForShadow)
|
|||
|
||||
if ( bMuzzleFlash && m_pMuzzleFlashFrame != nullptr )
|
||||
{
|
||||
RwScopedRenderState zWrite(rwRENDERSTATEZWRITEENABLE);
|
||||
RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, FALSE);
|
||||
|
||||
SetGunFlashAlpha(true);
|
||||
RpAtomic* atomic = reinterpret_cast<RpAtomic*>(GetFirstObject(m_pMuzzleFlashFrame));
|
||||
RpAtomicRender( atomic );
|
||||
|
|
Loading…
Reference in a new issue