diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp index e98a650a..2fa27761 100644 --- a/src/hacks/Aimbot.cpp +++ b/src/hacks/Aimbot.cpp @@ -188,9 +188,12 @@ void CreateMove() return; #if ENABLE_VISUALS - static effect_chams::EffectChams Effectchams; - hacks::shared::esp::SetEntityColor(target_entity, colors::pink); - Effectchams.SetEntityColor(target_entity, colors::pink); + if (target_entity->m_Type() != ENTITY_PLAYER) + { + static effect_chams::EffectChams Effectchams; + hacks::shared::esp::SetEntityColor(target_entity, colors::pink); + Effectchams.SetEntityColor(target_entity, colors::pink); + } #endif // Attemt to auto-shoot diff --git a/src/hooks/GetFriendPersonaName.cpp b/src/hooks/GetFriendPersonaName.cpp index bb3cc961..ad61c2ca 100644 --- a/src/hooks/GetFriendPersonaName.cpp +++ b/src/hooks/GetFriendPersonaName.cpp @@ -139,7 +139,9 @@ DEFINE_HOOKED_METHOD(GetFriendPersonaName, const char *, ISteamFriends *this_, if ((*force_name).size() > 1 && steam_id == g_ISteamUser->GetSteamID()) { - return force_name.toString().c_str(); + auto new_name = force_name.toString(); + ReplaceString(new_name, "\\n", "\n"); + return new_name.c_str(); } return original::GetFriendPersonaName(this_, steam_id); } diff --git a/src/hooks/visual/SDL_GL_SwapWindow.cpp b/src/hooks/visual/SDL_GL_SwapWindow.cpp index 684115a3..ab098019 100644 --- a/src/hooks/visual/SDL_GL_SwapWindow.cpp +++ b/src/hooks/visual/SDL_GL_SwapWindow.cpp @@ -7,6 +7,7 @@ #include #include #include "HookedMethods.hpp" +#include "timer.hpp" #include static bool init{ false }; @@ -20,12 +21,17 @@ typedef SDL_bool (*SDL_GetWindowWMInfo_t)(SDL_Window *window, SDL_SysWMinfo *info); static SDL_GetWindowWMInfo_t GetWindowWMInfo = nullptr; static SDL_GLContext tf2_sdl = nullptr; - +Timer delay{}; namespace hooked_methods { DEFINE_HOOKED_METHOD(SDL_GL_SwapWindow, void, SDL_Window *window) { + if (!delay.check(2000)) + { + original::SDL_GL_SwapWindow(window); + return; + } if (!init_wminfo) { GetWindowWMInfo = *reinterpret_cast( diff --git a/src/visual/menu/GuiInterface.cpp b/src/visual/menu/GuiInterface.cpp index 56f1be2d..223fcb85 100755 --- a/src/visual/menu/GuiInterface.cpp +++ b/src/visual/menu/GuiInterface.cpp @@ -98,7 +98,7 @@ static void initPlayerlist() }); controller->setOpenSteamCallback([](unsigned steam) { CSteamID id{}; - id.SetFromUint64((0b1000100000000000000000001 << 32) | steam); + id.Set(steam, EUniverse::k_EUniversePublic, EAccountType::k_EAccountTypeIndividual); g_ISteamFriends->ActivateGameOverlayToUser("steamid", id); }); } @@ -169,7 +169,6 @@ bool gui::handleSdlEvent(SDL_Event *event) return true; } } - return zerokernel::Menu::instance->handleSdlEvent(event) && !zerokernel::Menu::instance->isInGame(); } diff --git a/src/visual/menu/menu/objects/input/Select.cpp b/src/visual/menu/menu/objects/input/Select.cpp index 75b700fc..6364f835 100755 --- a/src/visual/menu/menu/objects/input/Select.cpp +++ b/src/visual/menu/menu/objects/input/Select.cpp @@ -85,9 +85,7 @@ void zerokernel::Select::handleMessage(zerokernel::Message &msg, bool is_relayed) { if (variable && !is_relayed && msg.name == "OptionSelected") - { variable->fromString((std::string) msg.kv["value"]); - } BaseMenuObject::handleMessage(msg, is_relayed); }