parent
5d538cf53c
commit
a5fb18c06b
@ -38,14 +38,6 @@ namespace big::math
|
|||||||
return (float)distance_between_vectors(plyr_coords, cam_coords);
|
return (float)distance_between_vectors(plyr_coords, cam_coords);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline float calculate_distance_from_game_cam(rage::fvector4 player_position)
|
|
||||||
{
|
|
||||||
const Vector3 plyr_coords = {player_position.x, player_position.y, player_position.z};
|
|
||||||
const Vector3 cam_coords = g_pointers->m_gta.m_get_gameplay_cam_coords();
|
|
||||||
|
|
||||||
return (float)distance_between_vectors(plyr_coords, cam_coords);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline Vector3 raycast_coords(Vector3 coord, Vector3 rot, Entity ignore)
|
inline Vector3 raycast_coords(Vector3 coord, Vector3 rot, Entity ignore)
|
||||||
{
|
{
|
||||||
BOOL hit;
|
BOOL hit;
|
||||||
|
@ -21,26 +21,10 @@ namespace big
|
|||||||
|
|
||||||
void esp::draw_player(const player_ptr& plyr, ImDrawList* const draw_list)
|
void esp::draw_player(const player_ptr& plyr, ImDrawList* const draw_list)
|
||||||
{
|
{
|
||||||
if (!plyr->is_valid() || !plyr->get_ped() || !plyr->get_ped()->m_navigation || !plyr->get_ped()->m_model_info)
|
if (!plyr->is_valid() || !plyr->get_ped() || !plyr->get_ped()->m_navigation)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
rage::fvector4 player_pos;
|
auto& player_pos = *plyr->get_ped()->m_navigation->get_position();
|
||||||
|
|
||||||
if (plyr->get_ped()->m_model_info->m_hash == RAGE_JOAAT("mp_m_freemode_01") || plyr->get_ped()->m_model_info->m_hash == RAGE_JOAAT("mp_f_freemode_01"))
|
|
||||||
{
|
|
||||||
if (!g_pointers->m_gta.m_get_ped_bone(plyr->get_ped(), player_pos, PedBones::SKEL_Pelvis))
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (plyr->get_ped()->GetNavigation() == nullptr)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (auto navigation_pos = plyr->get_ped()->GetNavigation()->get_position())
|
|
||||||
player_pos = {navigation_pos->x, navigation_pos->y, navigation_pos->z, 0};
|
|
||||||
else
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
float screen_x, screen_y;
|
float screen_x, screen_y;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user