Fix bug #557 by deactivating challenge orbs when the player doesn't have enough points for them
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10719 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -87,7 +87,9 @@ void OverWorld::onFirePressed(Controller* who)
|
||||
Vec3 kart_xyz = getKart(0)->getXYZ();
|
||||
for (unsigned int n=0; n<challenges.size(); n++)
|
||||
{
|
||||
if ((kart_xyz - Vec3(challenges[n].m_position)).length2_2d() < 20)
|
||||
if (challenges[n].m_force_field.m_is_locked) continue;
|
||||
|
||||
if ((kart_xyz - Vec3(challenges[n].m_position)).length2_2d() < CHALLENGE_DISTANCE_SQUARED)
|
||||
{
|
||||
core::rect<s32> pos(15,
|
||||
10,
|
||||
|
||||
@@ -338,7 +338,9 @@ void RaceGUIOverworld::drawGlobalMiniMap()
|
||||
// ---- Draw nearby challenge if any
|
||||
for (unsigned int n=0; n<challenges.size(); n++)
|
||||
{
|
||||
if ((kart_xyz - Vec3(challenges[n].m_position)).length2_2d() < 20)
|
||||
if (challenges[n].m_force_field.m_is_locked) continue;
|
||||
|
||||
if ((kart_xyz - Vec3(challenges[n].m_position)).length2_2d() < CHALLENGE_DISTANCE_SQUARED)
|
||||
{
|
||||
core::rect<s32> pos(15,
|
||||
10,
|
||||
|
||||
@@ -36,6 +36,9 @@ class Material;
|
||||
class RaceSetup;
|
||||
class ChallengeData;
|
||||
|
||||
/** Distance (squared) at which a challenge orb "activates" */
|
||||
const int CHALLENGE_DISTANCE_SQUARED = 20;
|
||||
|
||||
/**
|
||||
* \brief Handles the in-race GUI (messages, mini-map, rankings, timer, etc...)
|
||||
* \ingroup states_screens
|
||||
|
||||
Reference in New Issue
Block a user