Feat ptr cache continued (#1227)

This commit is contained in:
Quentin E. / iDeath
2023-04-14 18:54:07 +02:00
committed by GitHub
parent be5bb50c87
commit 74c3931209
134 changed files with 2490 additions and 1624 deletions

View File

@ -21,7 +21,7 @@ namespace big
ImGui::SetNextItemWidth(300.f);
components::input_text_with_hint("PLAYER"_T, "SEARCH"_T, search, sizeof(search), ImGuiInputTextFlags_None);
if (ImGui::ListBoxHeader("###players", {180, static_cast<float>(*g_pointers->m_resolution_y - 400 - 38 * 4)}))
if (ImGui::ListBoxHeader("###players", {180, static_cast<float>(*g_pointers->m_gta.m_resolution_y - 400 - 38 * 4)}))
{
auto& item_arr = g_player_database_service->get_players();
if (item_arr.size() > 0)
@ -78,7 +78,7 @@ namespace big
if (auto selected = g_player_database_service->get_selected())
{
ImGui::SameLine();
if (ImGui::BeginChild("###selected_player", {500, static_cast<float>(*g_pointers->m_resolution_y - 388 - 38 * 4)}, false, ImGuiWindowFlags_NoBackground))
if (ImGui::BeginChild("###selected_player", {500, static_cast<float>(*g_pointers->m_gta.m_resolution_y - 388 - 38 * 4)}, false, ImGuiWindowFlags_NoBackground))
{
if (ImGui::InputText("NAME"_T.data(), name_buf, sizeof(name_buf)))
{

View File

@ -35,13 +35,13 @@ namespace big
components::input_text("SESSION_INFO"_T, base64, sizeof(base64));
components::button("JOIN_SESSION_INFO"_T, [] {
rage::rlSessionInfo info;
g_pointers->m_decode_session_info(&info, base64, nullptr);
g_pointers->m_gta.m_decode_session_info(&info, base64, nullptr);
session::join_session(info);
});
ImGui::SameLine();
components::button("COPY_SESSION_INFO"_T, [] {
char buf[0x100]{};
g_pointers->m_encode_session_info(&gta_util::get_network()->m_game_session.m_rline_session.m_session_info, buf, 0xA9, nullptr);
g_pointers->m_gta.m_encode_session_info(&gta_util::get_network()->m_game_session.m_rline_session.m_session_info, buf, 0xA9, nullptr);
ImGui::SetClipboardText(buf);
});
@ -62,8 +62,8 @@ namespace big
{
for (const auto& region_type : regions)
{
components::selectable(region_type.name, *g_pointers->m_region_code == region_type.id, [&region_type] {
*g_pointers->m_region_code = region_type.id;
components::selectable(region_type.name, *g_pointers->m_gta.m_region_code == region_type.id, [&region_type] {
*g_pointers->m_gta.m_region_code = region_type.id;
});
}
ImGui::EndListBox();
@ -94,7 +94,7 @@ namespace big
components::button("SEND"_T, [] {
if (const auto net_game_player = gta_util::get_network_player_mgr()->m_local_net_player; net_game_player)
{
if (g_hooking->get_original<hooks::send_chat_message>()(*g_pointers->m_send_chat_ptr,
if (g_hooking->get_original<hooks::send_chat_message>()(*g_pointers->m_gta.m_send_chat_ptr,
net_game_player->get_net_data(),
msg,
g.session.is_team))

View File

@ -23,7 +23,7 @@ namespace big
ImGui::SetNextItemWidth(300.f);
if (ImGui::ListBoxHeader("###sessions", {300, static_cast<float>(*g_pointers->m_resolution_y - 400 - 38 * 4)}))
if (ImGui::ListBoxHeader("###sessions", {300, static_cast<float>(*g_pointers->m_gta.m_resolution_y - 400 - 38 * 4)}))
{
if (g_matchmaking_service->get_num_found_sessions())
{
@ -37,7 +37,7 @@ namespace big
if (components::selectable(std::to_string(session.info.m_session_token), i == selected_session_idx))
{
selected_session_idx = i;
g_pointers->m_encode_session_info(&session.info, session_info, 0x7D, nullptr);
g_pointers->m_gta.m_encode_session_info(&session.info, session_info, 0x7D, nullptr);
}
if (ImGui::IsItemHovered())
@ -62,7 +62,7 @@ namespace big
if (selected_session_idx != -1)
{
ImGui::SameLine();
if (ImGui::BeginChild("###selected_session", {300, static_cast<float>(*g_pointers->m_resolution_y - 388 - 38 * 4)}, false, ImGuiWindowFlags_NoBackground))
if (ImGui::BeginChild("###selected_session", {300, static_cast<float>(*g_pointers->m_gta.m_resolution_y - 388 - 38 * 4)}, false, ImGuiWindowFlags_NoBackground))
{
auto& session = g_matchmaking_service->get_found_sessions()[selected_session_idx];

View File

@ -36,7 +36,7 @@ namespace big
ImGui::SameLine();
if (ImGui::InputInt("###rank", &g.spoofing.rank))
{
*g_pointers->m_force_player_card_refresh = true;
*g_pointers->m_gta.m_force_player_card_refresh = true;
}
}
@ -46,7 +46,7 @@ namespace big
ImGui::SameLine();
if (ImGui::InputFloat("###kd_ratio", &g.spoofing.kd_ratio))
{
*g_pointers->m_force_player_card_refresh = true;
*g_pointers->m_gta.m_force_player_card_refresh = true;
}
}
@ -56,7 +56,7 @@ namespace big
ImGui::SameLine();
if (ImGui::Combo("###badsport_select", &g.spoofing.badsport_type, "Clean Player\0Dirty Player\0Bad Sport"))
{
*g_pointers->m_force_player_card_refresh = true;
*g_pointers->m_gta.m_force_player_card_refresh = true;
}
}