Fixed aimbot trying to aim at peds inside our current vehicle. (#3443)
This commit is contained in:
parent
519c1305de
commit
187ac86535
@ -144,8 +144,9 @@ namespace big
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto is_not_a_player_and_we_target_only_players = g_aimbot_only_on_player.is_enabled() && !ped->m_player_info;
|
const bool is_not_a_player_and_we_target_only_players = g_aimbot_only_on_player.is_enabled() && !ped->m_player_info;
|
||||||
if (is_not_a_player_and_we_target_only_players)
|
const bool we_in_the_same_vehicle = self::veh != 0 && ped->m_vehicle == g_player_service->get_self()->get_current_vehicle();
|
||||||
|
if (is_not_a_player_and_we_target_only_players || we_in_the_same_vehicle)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -30,8 +30,12 @@ namespace big
|
|||||||
if (ped_ptr == nullptr)
|
if (ped_ptr == nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (g.weapons.aimbot.only_on_player && !ped_ptr->m_player_info)
|
const bool trace_hit_non_player = g.weapons.aimbot.only_on_player && !ped_ptr->m_player_info;
|
||||||
|
const bool we_in_the_same_vehicle = self::veh != 0 && ped_ptr->m_vehicle == g_player_service->get_self()->get_current_vehicle();
|
||||||
|
if (trace_hit_non_player || we_in_the_same_vehicle)
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (g.weapons.aimbot.exclude_friends && ped_ptr->m_player_info)
|
if (g.weapons.aimbot.exclude_friends && ped_ptr->m_player_info)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user