git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12977 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2013-06-25 23:44:57 +00:00
parent ec15e46c88
commit 901bde8db3
2 changed files with 4 additions and 1 deletions

View File

@ -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;

View File

@ -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