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)
This commit is contained in:
@@ -213,8 +213,8 @@ namespace updater {
|
|||||||
offsets::m_vecAbsOrigin = data["m_vecAbsOrigin"];
|
offsets::m_vecAbsOrigin = data["m_vecAbsOrigin"];
|
||||||
if (data["m_pGameSceneNode"].is_number())
|
if (data["m_pGameSceneNode"].is_number())
|
||||||
offsets::m_pGameSceneNode = data["m_pGameSceneNode"];
|
offsets::m_pGameSceneNode = data["m_pGameSceneNode"];
|
||||||
if (data["m_flFlashDuration"].is_number())
|
if (data["m_flFlashOverlayAlpha"].is_number())
|
||||||
offsets::m_flFlashDuration = data["m_flFlashDuration"];
|
offsets::m_flFlashOverlayAlpha = data["m_flFlashOverlayAlpha"];
|
||||||
if (data["m_bIsDefusing"].is_number())
|
if (data["m_bIsDefusing"].is_number())
|
||||||
offsets::m_bIsDefusing = data["m_bIsDefusing"];
|
offsets::m_bIsDefusing = data["m_bIsDefusing"];
|
||||||
if (data["m_szName"].is_number())
|
if (data["m_szName"].is_number())
|
||||||
@@ -256,7 +256,7 @@ namespace updater {
|
|||||||
data["m_iAccount"] = offsets::m_iAccount;
|
data["m_iAccount"] = offsets::m_iAccount;
|
||||||
data["m_vecAbsOrigin"] = offsets::m_vecAbsOrigin;
|
data["m_vecAbsOrigin"] = offsets::m_vecAbsOrigin;
|
||||||
data["m_pGameSceneNode"] = offsets::m_pGameSceneNode;
|
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_bIsDefusing"] = offsets::m_bIsDefusing;
|
||||||
data["m_szName"] = offsets::m_szName;
|
data["m_szName"] = offsets::m_szName;
|
||||||
data["m_pClippingWeapon"] = offsets::m_pClippingWeapon;
|
data["m_pClippingWeapon"] = offsets::m_pClippingWeapon;
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ namespace updater {
|
|||||||
inline std::ptrdiff_t m_iAccount = 0x40;
|
inline std::ptrdiff_t m_iAccount = 0x40;
|
||||||
inline std::ptrdiff_t m_vecAbsOrigin = 0xC8;
|
inline std::ptrdiff_t m_vecAbsOrigin = 0xC8;
|
||||||
inline std::ptrdiff_t m_pGameSceneNode = 0x310;
|
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_bIsDefusing = 0x1390;
|
||||||
inline std::ptrdiff_t m_szName = 0xC18;
|
inline std::ptrdiff_t m_szName = 0xC18;
|
||||||
inline std::ptrdiff_t m_pClippingWeapon = 0x1290;
|
inline std::ptrdiff_t m_pClippingWeapon = 0x1290;
|
||||||
|
|||||||
@@ -271,8 +271,8 @@ namespace hack {
|
|||||||
10
|
10
|
||||||
);
|
);
|
||||||
|
|
||||||
float flashDuration = process->read<float>(pCSPlayerPawn + updater::offsets::m_flFlashDuration);
|
float flashAlpha = process->read<float>(pCSPlayerPawn + updater::offsets::m_flFlashOverlayAlpha);
|
||||||
if (flashDuration > 0.1)
|
if (flashAlpha > 100)
|
||||||
{
|
{
|
||||||
render::RenderText(
|
render::RenderText(
|
||||||
g::hdcBuffer,
|
g::hdcBuffer,
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
"m_iAccount": 64,
|
"m_iAccount": 64,
|
||||||
"m_vecAbsOrigin": 200,
|
"m_vecAbsOrigin": 200,
|
||||||
"m_pGameSceneNode": 784,
|
"m_pGameSceneNode": 784,
|
||||||
"m_flFlashDuration": 5200,
|
"m_flFlashOverlayAlpha": 5188,
|
||||||
"m_bIsDefusing": 5008,
|
"m_bIsDefusing": 5008,
|
||||||
"m_szName": 3096,
|
"m_szName": 3096,
|
||||||
"m_pClippingWeapon": 4752,
|
"m_pClippingWeapon": 4752,
|
||||||
|
|||||||
Reference in New Issue
Block a user