feat(hotkey_service): disable on active chat (#651)
This commit is contained in:
parent
eb80ac54bd
commit
1cf0a34597
@ -3,7 +3,7 @@ include(FetchContent)
|
|||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
gtav_classes
|
gtav_classes
|
||||||
GIT_REPOSITORY https://github.com/Yimura/GTAV-Classes.git
|
GIT_REPOSITORY https://github.com/Yimura/GTAV-Classes.git
|
||||||
GIT_TAG 257115997e5ecea9fafbc820a746d9c6f5889e57
|
GIT_TAG 298907d8987862286512bc92cf97b022643315ce
|
||||||
GIT_PROGRESS TRUE
|
GIT_PROGRESS TRUE
|
||||||
CONFIGURE_COMMAND ""
|
CONFIGURE_COMMAND ""
|
||||||
BUILD_COMMAND ""
|
BUILD_COMMAND ""
|
||||||
|
@ -592,6 +592,11 @@ namespace big
|
|||||||
m_security = ptr.add(3).rip().as<rage::atSingleton<rage::RageSecurity>*>();
|
m_security = ptr.add(3).rip().as<rage::atSingleton<rage::RageSecurity>*>();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
main_batch.add("CD", "48 8B 05 ? ? ? ? 0F 45 DF", [this](memory::handle ptr)
|
||||||
|
{
|
||||||
|
m_chat_data = ptr.add(3).rip().as<ChatData**>();
|
||||||
|
});
|
||||||
|
|
||||||
auto mem_region = memory::module("GTA5.exe");
|
auto mem_region = memory::module("GTA5.exe");
|
||||||
main_batch.run(mem_region);
|
main_batch.run(mem_region);
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ class CCommunications;
|
|||||||
class FriendRegistry;
|
class FriendRegistry;
|
||||||
class CNetworkPlayerMgr;
|
class CNetworkPlayerMgr;
|
||||||
class Network;
|
class Network;
|
||||||
|
class ChatData;
|
||||||
|
|
||||||
namespace rage
|
namespace rage
|
||||||
{
|
{
|
||||||
@ -67,6 +68,7 @@ namespace big
|
|||||||
functions::multiplayer_chat_filter* m_multiplayer_chat_filter{};
|
functions::multiplayer_chat_filter* m_multiplayer_chat_filter{};
|
||||||
functions::write_player_game_state_data_node m_write_player_game_state_data_node{};
|
functions::write_player_game_state_data_node m_write_player_game_state_data_node{};
|
||||||
|
|
||||||
|
ChatData** m_chat_data;
|
||||||
FriendRegistry* m_friend_registry{};
|
FriendRegistry* m_friend_registry{};
|
||||||
|
|
||||||
functions::get_screen_coords_for_world_coords m_get_screen_coords_for_world_coords{};
|
functions::get_screen_coords_for_world_coords m_get_screen_coords_for_world_coords{};
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
#include "util/teleport.hpp"
|
#include "util/teleport.hpp"
|
||||||
#include "hotkey_functions.hpp"
|
#include "hotkey_functions.hpp"
|
||||||
|
|
||||||
|
#include "network/ChatData.hpp"
|
||||||
|
#include "pointers.hpp"
|
||||||
|
|
||||||
namespace big
|
namespace big
|
||||||
{
|
{
|
||||||
hotkey_service::hotkey_service()
|
hotkey_service::hotkey_service()
|
||||||
@ -50,6 +53,9 @@ namespace big
|
|||||||
|
|
||||||
void hotkey_service::wndproc(eKeyState state, key_t key)
|
void hotkey_service::wndproc(eKeyState state, key_t key)
|
||||||
{
|
{
|
||||||
|
if (const auto chat_data = *g_pointers->m_chat_data; chat_data && (chat_data->m_chat_open || chat_data->m_timer_two))
|
||||||
|
return;
|
||||||
|
|
||||||
if (state == eKeyState::RELEASE || state == eKeyState::DOWN)
|
if (state == eKeyState::RELEASE || state == eKeyState::DOWN)
|
||||||
{
|
{
|
||||||
auto &hotkey_map = m_hotkeys[state == eKeyState::RELEASE];
|
auto &hotkey_map = m_hotkeys[state == eKeyState::RELEASE];
|
||||||
|
Reference in New Issue
Block a user