diff --git a/src/Game.cpp b/src/Game.cpp index 5273fc3..7600889 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -221,7 +221,7 @@ void Game::FreeCam() Command(freecam::hped, false); Command(freecam::hped, false); - freecam::tmouseX = player->GetHeading(); + freecam::tmouseX = player->GetHeading() + 89.6f; freecam::tmouseY = 0; freecam::init_done = true; diff --git a/src/Menu.cpp b/src/Menu.cpp index fa74ec6..795ae46 100644 --- a/src/Menu.cpp +++ b/src/Menu.cpp @@ -52,11 +52,11 @@ Menu::Menu() hotkeys::aim_skin_changer.key1 = config.GetValue("hotkey.aim_skin_changer.key1", VK_RETURN); hotkeys::aim_skin_changer.key2 = config.GetValue("hotkey.aim_skin_changer.key2", VK_RETURN); - hotkeys::freecam.key1 = config.GetValue("hotkey.freecam.key1", VK_LMENU); - hotkeys::freecam.key2 = config.GetValue("hotkey.freecam.key2", VK_KEY_A); + hotkeys::freecam.key1 = config.GetValue("hotkey.freecam.key1", VK_F6); + hotkeys::freecam.key2 = config.GetValue("hotkey.freecam.key2", VK_F6); - hotkeys::quick_ss.key1 = config.GetValue("hotkey.quick_screenshot.key1", VK_LCONTROL); - hotkeys::quick_ss.key2 = config.GetValue("hotkey.quick_screenshot.key2", VK_KEY_S); + hotkeys::quick_ss.key1 = config.GetValue("hotkey.quick_screenshot.key1", VK_F5); + hotkeys::quick_ss.key2 = config.GetValue("hotkey.quick_screenshot.key2", VK_F5); hotkeys::quick_tp.key1 = config.GetValue("hotkey.quick_tp.key1", VK_KEY_X); hotkeys::quick_tp.key2 = config.GetValue("hotkey.quick_tp.key2", VK_KEY_Y); diff --git a/src/Ui.cpp b/src/Ui.cpp index 509f2af..59de81a 100644 --- a/src/Ui.cpp +++ b/src/Ui.cpp @@ -791,7 +791,7 @@ bool Ui::HotKey(const char* label, HotKeyData& key_data) { ImGui::PushStyleColor(ImGuiCol_Button, ImGui::GetStyle().Colors[ImGuiCol_ButtonActive]); - for (int key = 3; key != 90; ++key) + for (int key = 3; key != 135; ++key) { if (KeyPressed(key)) { @@ -800,7 +800,7 @@ bool Ui::HotKey(const char* label, HotKeyData& key_data) } } - for (int key = 90; key != 3; --key) + for (int key = 135; key != 3; --key) { if (KeyPressed(key)) { @@ -836,6 +836,7 @@ bool Ui::HotKey(const char* label, HotKeyData& key_data) { key_data.key1 = VK_NONE; key_data.key2 = VK_NONE; + state = true; } ImGui::SameLine(); @@ -852,7 +853,7 @@ bool Ui::HotKey(const char* label, HotKeyData& key_data) bool Ui::HotKeyPressed(HotKeyData& hotkey) { - if (CTimer::m_snTimeInMilliseconds - hotkey.timer > 250*CTimer::ms_fTimeScale) + if (CTimer::m_snTimeInMilliseconds - hotkey.timer > 150*CTimer::ms_fTimeScale) { hotkey.timer = CTimer::m_snTimeInMilliseconds; return current_hotkey == "" && KeyPressed(hotkey.key1) && KeyPressed(hotkey.key2); diff --git a/src/tests/Test.cpp b/src/tests/Test.cpp index da0141e..ed89a84 100644 --- a/src/tests/Test.cpp +++ b/src/tests/Test.cpp @@ -1,16 +1,25 @@ #include "plugin.h" -#include "CHud.h" using namespace plugin; +_asm +{ + xor ebx, ebx + cmp eax, ebx + jz short loc_6D1CFD + call _ZN10CGameLogic17IsCoopGameGoingOnEv ; CGameLogic::IsCoopGameGoingOn(void) + test al, al + jnz short loc_6D1CC4 +} + class Test { public: Test() { - Events::processScriptsEvent += [] + Events::initGameEvent += [] { - + patch::ReplaceFunctionCall(0x6D1C80); }; } } test;