diff options
| -rw-r--r-- | src/esp.cpp | 5 | ||||
| -rw-r--r-- | src/hl2h.cpp | 6 | ||||
| -rw-r--r-- | src/menu.cpp | 15 | ||||
| -rw-r--r-- | src/netvars.cpp | 8 |
4 files changed, 26 insertions, 8 deletions
diff --git a/src/esp.cpp b/src/esp.cpp index 5683704..7c3f1bc 100644 --- a/src/esp.cpp +++ b/src/esp.cpp | |||
| @@ -872,6 +872,11 @@ static float vec_dist(const Vector &a, const Vector &b) { | |||
| 872 | bool melee_weapon_active(void *local_ent) { | 872 | bool melee_weapon_active(void *local_ent) { |
| 873 | if (!local_ent) | 873 | if (!local_ent) |
| 874 | return false; | 874 | return false; |
| 875 | static bool enter_logged = false; | ||
| 876 | if (!enter_logged) { | ||
| 877 | enter_logged = true; | ||
| 878 | logf("melee: enter"); | ||
| 879 | } | ||
| 875 | int local = engine_get_local_player(); | 880 | int local = engine_get_local_player(); |
| 876 | if (g_iface.engineserver) | 881 | if (g_iface.engineserver) |
| 877 | resolve_server_netvars(); | 882 | resolve_server_netvars(); |
diff --git a/src/hl2h.cpp b/src/hl2h.cpp index 375cd5a..84f9d0d 100644 --- a/src/hl2h.cpp +++ b/src/hl2h.cpp | |||
| @@ -584,6 +584,7 @@ static void do_move(int seq, float frametime) { | |||
| 584 | aimbot_reset_lock(); | 584 | aimbot_reset_lock(); |
| 585 | silentaim_reset_lock(); | 585 | silentaim_reset_lock(); |
| 586 | fullbright_invalidate(); | 586 | fullbright_invalidate(); |
| 587 | logf("do_move: post-local"); | ||
| 587 | } | 588 | } |
| 588 | 589 | ||
| 589 | if (feature_active(FEAT_SPREAD)) { | 590 | if (feature_active(FEAT_SPREAD)) { |
| @@ -696,7 +697,12 @@ static void do_move(int seq, float frametime) { | |||
| 696 | if (jumpbug_apply(cmd, localIdx, ent, flags, vel, frametime)) | 697 | if (jumpbug_apply(cmd, localIdx, ent, flags, vel, frametime)) |
| 697 | note_modified(cmd, flags, vel); | 698 | note_modified(cmd, flags, vel); |
| 698 | 699 | ||
| 700 | static bool melee_logged = false; | ||
| 699 | bool melee = feature_active(FEAT_MELEE) && melee_weapon_active(ent); | 701 | bool melee = feature_active(FEAT_MELEE) && melee_weapon_active(ent); |
| 702 | if (!melee_logged) { | ||
| 703 | melee_logged = true; | ||
| 704 | logf("do_move: after melee check (crowbar=%d)", (int)melee); | ||
| 705 | } | ||
| 700 | 706 | ||
| 701 | if (!feature_active(FEAT_AIMBOT) || !feature_has_bind(FEAT_AIMBOT) || melee) | 707 | if (!feature_active(FEAT_AIMBOT) || !feature_has_bind(FEAT_AIMBOT) || melee) |
| 702 | aimbot_reset_lock(); | 708 | aimbot_reset_lock(); |
diff --git a/src/menu.cpp b/src/menu.cpp index 0c022e4..af1d2b8 100644 --- a/src/menu.cpp +++ b/src/menu.cpp | |||
| @@ -664,9 +664,24 @@ void draw_text_col(int x, int y, const char *text, int r, int g, int b) { | |||
| 664 | // (see hkdDrawPrintText hook in hl2h.cpp): we wrap our draws in | 664 | // (see hkdDrawPrintText hook in hl2h.cpp): we wrap our draws in |
| 665 | // PushMakeCurrent/PopMakeCurrent so they are submitted with a clean clip. | 665 | // PushMakeCurrent/PopMakeCurrent so they are submitted with a clean clip. |
| 666 | void outer_draw() { | 666 | void outer_draw() { |
| 667 | static bool outer_enter = false; | ||
| 668 | if (!outer_enter) { | ||
| 669 | outer_enter = true; | ||
| 670 | logf("outer_draw: enter"); | ||
| 671 | } | ||
| 667 | poll_keyboard(); | 672 | poll_keyboard(); |
| 668 | fullbright_update(); | 673 | fullbright_update(); |
| 674 | static bool fb_done = false; | ||
| 675 | if (!fb_done) { | ||
| 676 | fb_done = true; | ||
| 677 | logf("outer_draw: after fullbright"); | ||
| 678 | } | ||
| 669 | gui_handle_input(); | 679 | gui_handle_input(); |
| 680 | static bool gui_done = false; | ||
| 681 | if (!gui_done) { | ||
| 682 | gui_done = true; | ||
| 683 | logf("outer_draw: after gui input"); | ||
| 684 | } | ||
| 670 | // HL2H_DRAW_TEST=1 draws a probe rect without needing the GUI open | 685 | // HL2H_DRAW_TEST=1 draws a probe rect without needing the GUI open |
| 671 | static bool draw_test = getenv("HL2H_DRAW_TEST") != nullptr; | 686 | static bool draw_test = getenv("HL2H_DRAW_TEST") != nullptr; |
| 672 | bool esp_on = feature_active(FEAT_ESP); | 687 | bool esp_on = feature_active(FEAT_ESP); |
diff --git a/src/netvars.cpp b/src/netvars.cpp index 834aa2f..238af70 100644 --- a/src/netvars.cpp +++ b/src/netvars.cpp | |||
| @@ -92,14 +92,6 @@ static void collect_netvars(uintptr_t table, uintptr_t base_off, int depth) { | |||
| 92 | } else if (strcmp(pname2, "m_hActiveWeapon") == 0 && | 92 | } else if (strcmp(pname2, "m_hActiveWeapon") == 0 && |
| 93 | g_net.activeweapon < 0) { | 93 | g_net.activeweapon < 0) { |
| 94 | g_net.activeweapon = (int)(base_off + (uint32_t)poff); | 94 | g_net.activeweapon = (int)(base_off + (uint32_t)poff); |
| 95 | } else if (strcmp(pname2, "m_hOwnerEntity") == 0 && g_net.owner < 0) { | ||
| 96 | int off = (int)(base_off + (uint32_t)poff); | ||
| 97 | if (off > 0 && off < 0x2000) | ||
| 98 | g_net.owner = off; | ||
| 99 | } else if (strcmp(pname2, "m_hOwner") == 0 && g_net.weapon_owner < 0) { | ||
| 100 | int off = (int)(base_off + (uint32_t)poff); | ||
| 101 | if (off > 0 && off < 0x2000) | ||
| 102 | g_net.weapon_owner = off; | ||
| 103 | } else if (strcmp(pname2, "m_iTeamNum") == 0 && g_net.teamnum < 0) { | 95 | } else if (strcmp(pname2, "m_iTeamNum") == 0 && g_net.teamnum < 0) { |
| 104 | g_net.teamnum = (int)(base_off + (uint32_t)poff); | 96 | g_net.teamnum = (int)(base_off + (uint32_t)poff); |
| 105 | } else if (strcmp(pname2, "m_vecOrigin") == 0 && g_net.origin < 0) { | 97 | } else if (strcmp(pname2, "m_vecOrigin") == 0 && g_net.origin < 0) { |
