From c42b1f1cce77117f9642f2dc317d435ec3c17869 Mon Sep 17 00:00:00 2001 From: MisterY52 <11368116+MisterY52@users.noreply.github.com> Date: Tue, 6 Oct 2020 23:01:50 +0200 Subject: [PATCH] Fix --- apex_dma/apex_dma.cpp | 4 ++-- apex_dma/offsets.h | 2 +- apex_guest/Client/Client/overlay.cpp | 10 ++++++---- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/apex_dma/apex_dma.cpp b/apex_dma/apex_dma.cpp index 6ab5561..57f700b 100644 --- a/apex_dma/apex_dma.cpp +++ b/apex_dma/apex_dma.cpp @@ -218,7 +218,7 @@ void DoActions(WinProcess& mem) case 1: if (spectators > 0) { - if(!player_glow && Target.isGlowing()) + if(Target.isGlowing()) { Target.disableGlow(mem); } @@ -228,7 +228,7 @@ void DoActions(WinProcess& mem) case 2: if (spectators+allied_spectators > 0) { - if(!player_glow && Target.isGlowing()) + if(Target.isGlowing()) { Target.disableGlow(mem); } diff --git a/apex_dma/offsets.h b/apex_dma/offsets.h index bc74a93..2237a73 100644 --- a/apex_dma/offsets.h +++ b/apex_dma/offsets.h @@ -28,7 +28,7 @@ #define OFFSET_BULLET_SPEED 0x1e0c #define OFFSET_BULLET_SCALE 0x1e14 -#define OFFSET_ITEM_GLOW 0x2A8 +#define OFFSET_ITEM_GLOW 0x2A8 //m_highlightFunctionBits #define OFFSET_GLOW_T1 0x262 //16256 = enabled, 0 = disabled #define OFFSET_GLOW_T2 0x2c4 //1193322764 = enabled, 0 = disabled diff --git a/apex_guest/Client/Client/overlay.cpp b/apex_guest/Client/Client/overlay.cpp index 116663c..28992a7 100644 --- a/apex_guest/Client/Client/overlay.cpp +++ b/apex_guest/Client/Client/overlay.cpp @@ -226,12 +226,14 @@ void Overlay::ClickThrough(bool v) if (v) { nv_edit = nv_default_in_game | WS_VISIBLE; - SetWindowLong(overlayHWND, GWL_EXSTYLE, nv_ex_edit); + if (GetWindowLong(overlayHWND, GWL_EXSTYLE) != nv_ex_edit) + SetWindowLong(overlayHWND, GWL_EXSTYLE, nv_ex_edit); } else { nv_edit = nv_default | WS_VISIBLE; - SetWindowLong(overlayHWND, GWL_EXSTYLE, nv_ex_edit_menu); + if (GetWindowLong(overlayHWND, GWL_EXSTYLE) != nv_ex_edit_menu) + SetWindowLong(overlayHWND, GWL_EXSTYLE, nv_ex_edit_menu); } } @@ -288,14 +290,14 @@ DWORD Overlay::CreateOverlay() { if (GetWindowLong(overlayHWND, GWL_STYLE) != nv_edit) SetWindowLong(overlayHWND, GWL_STYLE, nv_edit); - if (GetWindowLong(overlayHWND, GWL_EXSTYLE) != nv_ex_edit) - SetWindowLong(overlayHWND, GWL_EXSTYLE, nv_ex_edit); if (show_menu) { ClickThrough(false); } else { + if (GetWindowLong(overlayHWND, GWL_EXSTYLE) != nv_ex_edit) + SetWindowLong(overlayHWND, GWL_EXSTYLE, nv_ex_edit); ClickThrough(true); } }