From a7a69d291f474047fbadba9c4639c3a9652d0070 Mon Sep 17 00:00:00 2001 From: Diavolo Date: Tue, 1 Feb 2022 15:24:20 +0100 Subject: [PATCH] =?UTF-8?q?Im=F0=9F=85=B1=EF=B8=8Frove?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Components/Modules/Bots.cpp | 4 +--- src/Components/Modules/Bots.hpp | 4 +--- src/Utils/Utils.cpp | 4 ++-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/Components/Modules/Bots.cpp b/src/Components/Modules/Bots.cpp index 8d342b5a..30cec1f1 100644 --- a/src/Components/Modules/Bots.cpp +++ b/src/Components/Modules/Bots.cpp @@ -35,7 +35,7 @@ namespace Components { "leanright", Game::usercmdButtonBits::CMD_BUTTON_LEAN_RIGHT }, { "ads", Game::usercmdButtonBits::CMD_BUTTON_ADS }, { "holdbreath", Game::usercmdButtonBits::CMD_BUTTON_BREATH }, - { "use", Bots::USE }, + { "use", Game::usercmdButtonBits::CMD_BUTTON_USE_RELOAD | Game::usercmdButtonBits::CMD_BUTTON_ACTIVATE }, { "0", Bots::NUM_0 }, { "1", Bots::NUM_1 }, { "2", Bots::NUM_2 }, @@ -262,8 +262,6 @@ namespace Components ucmd.rightmove = g_botai[entnum].right; ucmd.weapon = g_botai[entnum].weapon; - cl->deltaMessage = cl->netchan.outgoingSequence - 1; - Game::SV_ClientThink(cl, &ucmd); } diff --git a/src/Components/Modules/Bots.hpp b/src/Components/Modules/Bots.hpp index cc6c2dd2..8391e584 100644 --- a/src/Components/Modules/Bots.hpp +++ b/src/Components/Modules/Bots.hpp @@ -18,9 +18,7 @@ namespace Components NUM_6 = 0x400000, NUM_7 = 0x800000, NUM_8 = 0x1000000, - NUM_9 = 0x2000000, - - USE = NUM_0 | NUM_1 + NUM_9 = 0x2000000 }; private: diff --git a/src/Utils/Utils.cpp b/src/Utils/Utils.cpp index 71d0af14..27d72c49 100644 --- a/src/Utils/Utils.cpp +++ b/src/Utils/Utils.cpp @@ -107,12 +107,12 @@ namespace Utils void SetEnvironment() { wchar_t exeName[512]; - GetModuleFileName(GetModuleHandle(nullptr), exeName, sizeof(exeName) / 2); + GetModuleFileNameW(GetModuleHandleW(nullptr), exeName, sizeof(exeName) / sizeof(wchar_t)); wchar_t* exeBaseName = wcsrchr(exeName, L'\\'); exeBaseName[0] = L'\0'; - SetCurrentDirectory(exeName); + SetCurrentDirectoryW(exeName); } HMODULE GetNTDLL()