Im🅱️rove

This commit is contained in:
Diavolo 2022-02-01 15:24:20 +01:00
parent 137a8c3f3a
commit a7a69d291f
No known key found for this signature in database
GPG Key ID: FA77F074E98D98A5
3 changed files with 4 additions and 8 deletions

View File

@ -35,7 +35,7 @@ namespace Components
{ "leanright", Game::usercmdButtonBits::CMD_BUTTON_LEAN_RIGHT }, { "leanright", Game::usercmdButtonBits::CMD_BUTTON_LEAN_RIGHT },
{ "ads", Game::usercmdButtonBits::CMD_BUTTON_ADS }, { "ads", Game::usercmdButtonBits::CMD_BUTTON_ADS },
{ "holdbreath", Game::usercmdButtonBits::CMD_BUTTON_BREATH }, { "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 }, { "0", Bots::NUM_0 },
{ "1", Bots::NUM_1 }, { "1", Bots::NUM_1 },
{ "2", Bots::NUM_2 }, { "2", Bots::NUM_2 },
@ -262,8 +262,6 @@ namespace Components
ucmd.rightmove = g_botai[entnum].right; ucmd.rightmove = g_botai[entnum].right;
ucmd.weapon = g_botai[entnum].weapon; ucmd.weapon = g_botai[entnum].weapon;
cl->deltaMessage = cl->netchan.outgoingSequence - 1;
Game::SV_ClientThink(cl, &ucmd); Game::SV_ClientThink(cl, &ucmd);
} }

View File

@ -18,9 +18,7 @@ namespace Components
NUM_6 = 0x400000, NUM_6 = 0x400000,
NUM_7 = 0x800000, NUM_7 = 0x800000,
NUM_8 = 0x1000000, NUM_8 = 0x1000000,
NUM_9 = 0x2000000, NUM_9 = 0x2000000
USE = NUM_0 | NUM_1
}; };
private: private:

View File

@ -107,12 +107,12 @@ namespace Utils
void SetEnvironment() void SetEnvironment()
{ {
wchar_t exeName[512]; 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'\\'); wchar_t* exeBaseName = wcsrchr(exeName, L'\\');
exeBaseName[0] = L'\0'; exeBaseName[0] = L'\0';
SetCurrentDirectory(exeName); SetCurrentDirectoryW(exeName);
} }
HMODULE GetNTDLL() HMODULE GetNTDLL()