From e59fe36ccae2d61a5a4240fc1e9dc44408c84b03 Mon Sep 17 00:00:00 2001 From: Anarky Date: Wed, 14 Jul 2021 21:16:52 +0200 Subject: [PATCH] Disable motion blur during cutscenes --- src/animation/CutsceneMgr.cpp | 7 +++++++ src/animation/CutsceneMgr.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/animation/CutsceneMgr.cpp b/src/animation/CutsceneMgr.cpp index 83c4dbcb..0b792b5f 100644 --- a/src/animation/CutsceneMgr.cpp +++ b/src/animation/CutsceneMgr.cpp @@ -20,6 +20,7 @@ #include "RpAnimBlend.h" #include "ModelIndices.h" #include "TempColModels.h" +#include "postfx.h" const struct { const char *szTrackName; @@ -129,6 +130,7 @@ CAnimBlendAssocGroup CCutsceneMgr::ms_cutsceneAssociations; CVector CCutsceneMgr::ms_cutsceneOffset; float CCutsceneMgr::ms_cutsceneTimer; uint32 CCutsceneMgr::ms_cutsceneLoadStatus; +bool CCutsceneMgr::ms_blurSetting; RpAtomic * CalculateBoundingSphereRadiusCB(RpAtomic *atomic, void *data) @@ -232,6 +234,10 @@ CCutsceneMgr::LoadCutsceneData(const char *szCutsceneName) pPlayerPed->m_fCurrentStamina = pPlayerPed->m_fMaxStamina; CPad::GetPad(0)->SetDisablePlayerControls(PLAYERCONTROL_CUTSCENE); CWorld::Players[CWorld::PlayerInFocus].MakePlayerSafe(true); + + // save blur state and disable it + ms_blurSetting = CPostFX::MotionBlurOn; + CPostFX::MotionBlurOn = false; } void @@ -363,6 +369,7 @@ CCutsceneMgr::DeleteCutsceneData(void) TheCamera.SetWideScreenOff(); ms_running = false; ms_loaded = false; + CPostFX::MotionBlurOn = ms_blurSetting; FindPlayerPed()->bIsVisible = true; CPad::GetPad(0)->SetEnablePlayerControls(PLAYERCONTROL_CUTSCENE); diff --git a/src/animation/CutsceneMgr.h b/src/animation/CutsceneMgr.h index bfdcdb57..96175b77 100644 --- a/src/animation/CutsceneMgr.h +++ b/src/animation/CutsceneMgr.h @@ -16,6 +16,7 @@ class CCutsceneMgr static bool ms_loaded; static bool ms_animLoaded; static bool ms_useLodMultiplier; + static bool ms_blurSetting; static char ms_cutsceneName[CUTSCENENAMESIZE]; static CAnimBlendAssocGroup ms_cutsceneAssociations; -- 2.45.2