From 3a75bff65fce7a5c507e060a16124679ee1b6d20 Mon Sep 17 00:00:00 2001 From: Silent Date: Sat, 30 Mar 2019 12:51:38 +0100 Subject: [PATCH] Correct Z write for rendering weapons and muzzleflashes (fixes both in fact) --- SilentPatchSA/SilentPatchSA.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SilentPatchSA/SilentPatchSA.cpp b/SilentPatchSA/SilentPatchSA.cpp index 9c2f6f6..4300962 100644 --- a/SilentPatchSA/SilentPatchSA.cpp +++ b/SilentPatchSA/SilentPatchSA.cpp @@ -409,9 +409,11 @@ void RenderWeaponPedsForPC() { RwScopedRenderState vertexAlpha(rwRENDERSTATEVERTEXALPHAENABLE); RwScopedRenderState zWrite(rwRENDERSTATEZWRITEENABLE); + RwScopedRenderState fogEnable(rwRENDERSTATEFOGENABLE); RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, reinterpret_cast(TRUE)); - RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, FALSE); + RwRenderStateSet(rwRENDERSTATEZWRITEENABLE, reinterpret_cast(TRUE)); + RwRenderStateSet(rwRENDERSTATEFOGENABLE, reinterpret_cast(TRUE)); const bool renderWeapon = IgnoresWeaponPedsForPCFix();