From bac1aa36400e430c5ac582e1cab8539ac01ab174 Mon Sep 17 00:00:00 2001 From: nullifiedcat Date: Sat, 21 Jan 2017 21:10:42 +0300 Subject: [PATCH] b1g clean screenshots --- cathook/src/globals.cpp | 1 + cathook/src/globals.h | 1 + cathook/src/hooks/PaintTraverse.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/cathook/src/globals.cpp b/cathook/src/globals.cpp index 2fc98149..b7aa1022 100644 --- a/cathook/src/globals.cpp +++ b/cathook/src/globals.cpp @@ -32,6 +32,7 @@ void GlobalSettings::Init() { this->bShowAntiAim = CREATE_CV(CV_SWITCH, "thirdperson_angles", "1", "Real angles in thirdperson"); this->bThirdperson = CREATE_CV(CV_SWITCH, "thirdperson", "0", "Thirdperson"); this->bNoVisuals = CREATE_CV(CV_SWITCH, "novisuals", "0", "Disable visuals"); + this->bCleanScreenshots = CREATE_CV(CV_SWITCH, "clean_screenshot", "1", "Clean screenshots"); this->bThirdperson->m_pConVar->InstallChangeCallback(ThirdpersonCallback); bInvalid = true; } diff --git a/cathook/src/globals.h b/cathook/src/globals.h index 7970b8f9..d5dba2c4 100644 --- a/cathook/src/globals.h +++ b/cathook/src/globals.h @@ -32,6 +32,7 @@ public: CatVar* bShowAntiAim; CatVar* bThirdperson; CatVar* bNoVisuals; + CatVar* bCleanScreenshots; Vector last_angles; bool bInvalid; }; diff --git a/cathook/src/hooks/PaintTraverse.cpp b/cathook/src/hooks/PaintTraverse.cpp index 967c2604..283d9aec 100644 --- a/cathook/src/hooks/PaintTraverse.cpp +++ b/cathook/src/hooks/PaintTraverse.cpp @@ -62,6 +62,7 @@ void PaintTraverse_hook(void* p, unsigned int vp, bool fr, bool ar) { if (g_Settings.bNoVisuals->GetBool()) { return; } + if (g_Settings.bCleanScreenshots->GetBool() && interfaces::engineClient->IsTakingScreenshot()) return; if (!draw::width || !draw::height) { interfaces::engineClient->GetScreenSize(draw::width, draw::height);