diff --git a/src/states_screens/race_gui_overworld.cpp b/src/states_screens/race_gui_overworld.cpp index 438027052..3e3a5f2ba 100644 --- a/src/states_screens/race_gui_overworld.cpp +++ b/src/states_screens/race_gui_overworld.cpp @@ -437,7 +437,8 @@ void RaceGUIOverworld::drawGlobalMiniMap() if (challenges[n].m_challenge_id != "tutorial" && challenges[n].getForceField().m_is_locked) continue; - if ((kart_xyz - Vec3(challenges[n].m_position)).length2_2d() < CHALLENGE_DISTANCE_SQUARED) + if ((kart_xyz - Vec3(challenges[n].m_position)).length2_2d() < CHALLENGE_DISTANCE_SQUARED && + fabsf(kart_xyz[1] - challenges[n].m_position.Y) < CHALLENGE_HEIGHT) { m_close_to_a_challenge = true; diff --git a/src/states_screens/race_gui_overworld.hpp b/src/states_screens/race_gui_overworld.hpp index 426fa2970..039f27209 100644 --- a/src/states_screens/race_gui_overworld.hpp +++ b/src/states_screens/race_gui_overworld.hpp @@ -40,6 +40,8 @@ class RaceSetup; /** Distance (squared) at which a challenge orb "activates" */ const int CHALLENGE_DISTANCE_SQUARED = 20; +const int CHALLENGE_HEIGHT = 4; + /** * \brief Handles the in-race GUI (messages, mini-map, rankings, timer, etc...) * \ingroup states_screens