From 401c9a3aa838d71409e264b0165c488cda385df0 Mon Sep 17 00:00:00 2001 From: ifBars <114284668+ifBars@users.noreply.github.com> Date: Fri, 27 Oct 2023 19:09:16 -0600 Subject: [PATCH] Improve isFlashed flag - Improvement upon the player is flashed flag by using the FlashOverlayAlpha to check if their vision is still blocked or not (provides a more consistent notice of if the player is flashed) --- memory-external/classes/auto_updater.cpp | 6 +++--- memory-external/classes/auto_updater.hpp | 2 +- memory-external/hacks/hack.hpp | 4 ++-- offsets/offsets.json | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/memory-external/classes/auto_updater.cpp b/memory-external/classes/auto_updater.cpp index d2baa7a..2578589 100644 --- a/memory-external/classes/auto_updater.cpp +++ b/memory-external/classes/auto_updater.cpp @@ -213,8 +213,8 @@ namespace updater { offsets::m_vecAbsOrigin = data["m_vecAbsOrigin"]; if (data["m_pGameSceneNode"].is_number()) offsets::m_pGameSceneNode = data["m_pGameSceneNode"]; - if (data["m_flFlashDuration"].is_number()) - offsets::m_flFlashDuration = data["m_flFlashDuration"]; + if (data["m_flFlashOverlayAlpha"].is_number()) + offsets::m_flFlashOverlayAlpha = data["m_flFlashOverlayAlpha"]; if (data["m_bIsDefusing"].is_number()) offsets::m_bIsDefusing = data["m_bIsDefusing"]; if (data["m_szName"].is_number()) @@ -256,7 +256,7 @@ namespace updater { data["m_iAccount"] = offsets::m_iAccount; data["m_vecAbsOrigin"] = offsets::m_vecAbsOrigin; data["m_pGameSceneNode"] = offsets::m_pGameSceneNode; - data["m_flFlashDuration"] = offsets::m_flFlashDuration; + data["m_flFlashOverlayAlpha"] = offsets::m_flFlashOverlayAlpha; data["m_bIsDefusing"] = offsets::m_bIsDefusing; data["m_szName"] = offsets::m_szName; data["m_pClippingWeapon"] = offsets::m_pClippingWeapon; diff --git a/memory-external/classes/auto_updater.hpp b/memory-external/classes/auto_updater.hpp index 51af8f2..8060724 100644 --- a/memory-external/classes/auto_updater.hpp +++ b/memory-external/classes/auto_updater.hpp @@ -47,7 +47,7 @@ namespace updater { inline std::ptrdiff_t m_iAccount = 0x40; inline std::ptrdiff_t m_vecAbsOrigin = 0xC8; inline std::ptrdiff_t m_pGameSceneNode = 0x310; - inline std::ptrdiff_t m_flFlashDuration = 0x1450; + inline std::ptrdiff_t m_flFlashOverlayAlpha = 0x1444; inline std::ptrdiff_t m_bIsDefusing = 0x1390; inline std::ptrdiff_t m_szName = 0xC18; inline std::ptrdiff_t m_pClippingWeapon = 0x1290; diff --git a/memory-external/hacks/hack.hpp b/memory-external/hacks/hack.hpp index 6225c61..6ec98a6 100644 --- a/memory-external/hacks/hack.hpp +++ b/memory-external/hacks/hack.hpp @@ -271,8 +271,8 @@ namespace hack { 10 ); - float flashDuration = process->read(pCSPlayerPawn + updater::offsets::m_flFlashDuration); - if (flashDuration > 0.1) + float flashAlpha = process->read(pCSPlayerPawn + updater::offsets::m_flFlashOverlayAlpha); + if (flashAlpha > 100) { render::RenderText( g::hdcBuffer, diff --git a/offsets/offsets.json b/offsets/offsets.json index 3ea9dac..b4c5268 100644 --- a/offsets/offsets.json +++ b/offsets/offsets.json @@ -12,7 +12,7 @@ "m_iAccount": 64, "m_vecAbsOrigin": 200, "m_pGameSceneNode": 784, - "m_flFlashDuration": 5200, + "m_flFlashOverlayAlpha": 5188, "m_bIsDefusing": 5008, "m_szName": 3096, "m_pClippingWeapon": 4752,