Removed errant waypoint icons in get_objective_location. (#3509)

This commit is contained in:
gir489 2024-08-03 12:19:43 -04:00 committed by GitHub
parent d93fb733ca
commit 0ea9fabf69
7 changed files with 1121 additions and 700 deletions

View File

@ -10,7 +10,7 @@ namespace big
virtual void on_tick() override virtual void on_tick() override
{ {
teleport::to_blip((int)BlipIcons::Waypoint); teleport::to_blip((int)BlipIcons::RADAR_WAYPOINT);
} }
}; };

View File

@ -52,7 +52,7 @@ namespace big
else if (current_destination == AutoDriveDestination::WAYPOINT) else if (current_destination == AutoDriveDestination::WAYPOINT)
{ {
to_waypoint = true; to_waypoint = true;
does_waypoint_exist = blip::get_blip_location(waypoint, (int)BlipIcons::Waypoint); does_waypoint_exist = blip::get_blip_location(waypoint, (int)BlipIcons::RADAR_WAYPOINT);
} }
if (does_waypoint_exist if (does_waypoint_exist

View File

@ -13,7 +13,7 @@ namespace big
{ {
Vector3 location; Vector3 location;
if (blip::get_blip_location(location, (int)BlipIcons::Waypoint)) if (blip::get_blip_location(location, (int)BlipIcons::RADAR_WAYPOINT))
{ {
int color[3] = {0, 0, 0}; int color[3] = {0, 0, 0};

File diff suppressed because it is too large Load Diff

View File

@ -50,19 +50,17 @@ namespace big::blip
bool get_objective_location(Vector3& location) bool get_objective_location(Vector3& location)
{ {
if (get_objective_location_iteration(location, {BlipIcons::Circle}, {BlipColors::YellowMission, BlipColors::YellowMission2, BlipColors::Mission})) if (get_objective_location_iteration(location, {BlipIcons::RADAR_LEVEL}, {BlipColors::YellowMission, BlipColors::YellowMission2, BlipColors::Mission}))
return true; return true;
if (get_objective_location_iteration(location, {BlipIcons::RaceFinish}, {BlipColors::None})) if (get_objective_location_iteration(location, {BlipIcons::RADAR_RACEFLAG}, {BlipColors::None}))
return true; return true;
if (get_objective_location_iteration(location, {BlipIcons::Circle}, {BlipColors::Green, BlipColors::Blue})) if (get_objective_location_iteration(location, {BlipIcons::RADAR_LEVEL}, {BlipColors::Green, BlipColors::Blue}))
return true;
if (get_objective_location_iteration(location, {BlipIcons::CrateDrop}))
return true; return true;
auto blip_icons = {0, 1, 2, 143, 144, 145, 146, 280, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 535, 536, 537, 538, 539, 540, 541, 542}; static const auto blip_icons = {BlipIcons::RADAR_OBJECTIVE_BLUE, BlipIcons::RADAR_OBJECTIVE_GREEN, BlipIcons::RADAR_OBJECTIVE_RED, BlipIcons::RADAR_OBJECTIVE_YELLOW, BlipIcons::RADAR_CRATEDROP, BlipIcons::RADAR_TARGET_A, BlipIcons::RADAR_TARGET_B, BlipIcons::RADAR_TARGET_C, BlipIcons::RADAR_TARGET_D, BlipIcons::RADAR_TARGET_E, BlipIcons::RADAR_TARGET_F, BlipIcons::RADAR_TARGET_G, BlipIcons::RADAR_TARGET_H, BlipIcons::RADAR_SM_CARGO, BlipIcons::RADAR_BAT_CARGO, BlipIcons::RADAR_DEAD_DROP_PACKAGE};
for (const auto& icon : blip_icons) for (const auto icon : blip_icons)
{ {
if (get_blip_location_from_offset(location, icon)) if (get_blip_location_from_offset(location, (int)icon))
return true; return true;
} }

View File

@ -169,7 +169,7 @@ namespace big::teleport
if (!blip::get_blip_location(location, sprite, color)) if (!blip::get_blip_location(location, sprite, color))
return false; return false;
if (sprite == (int)BlipIcons::Waypoint) if (sprite == (int)BlipIcons::RADAR_WAYPOINT)
entity::load_ground_at_3dcoord(location); entity::load_ground_at_3dcoord(location);
to_coords(location); to_coords(location);
@ -193,7 +193,7 @@ namespace big::teleport
inline bool to_waypoint() inline bool to_waypoint()
{ {
if (!to_blip((int)BlipIcons::Waypoint)) if (!to_blip((int)BlipIcons::RADAR_WAYPOINT))
{ {
g_notification_service.push_warning("TELEPORT"_T.data(), "TELEPORT_NO_WAYPOINT_SET"_T.data()); g_notification_service.push_warning("TELEPORT"_T.data(), "TELEPORT_NO_WAYPOINT_SET"_T.data());

View File

@ -18,7 +18,7 @@ namespace big
ImGui::SameLine(); ImGui::SameLine();
components::button("VIEW_PLAYER_TELEPORT_YOUR_WAYPOINT"_T, [] { components::button("VIEW_PLAYER_TELEPORT_YOUR_WAYPOINT"_T, [] {
Vector3 location; Vector3 location;
if (blip::get_blip_location(location, (int)BlipIcons::Waypoint)) if (blip::get_blip_location(location, (int)BlipIcons::RADAR_WAYPOINT))
entity::load_ground_at_3dcoord(location), teleport::teleport_player_to_coords(g_player_service->get_selected(), location); entity::load_ground_at_3dcoord(location), teleport::teleport_player_to_coords(g_player_service->get_selected(), location);
}); });