Fixed time-trial mode - no more boxes will be added to the track.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4275 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2009-12-10 02:10:19 +00:00
parent 81eeb36edb
commit 68ceea8619
4 changed files with 9 additions and 8 deletions

View File

@ -96,7 +96,7 @@ public:
virtual bool raceHasLaps(){ return true; }
virtual void newLap(unsigned int kart_index);
virtual bool enableBonusBoxes(){ return true; }
virtual bool haveBonusBoxes(){ return true; }
/** Called by the race result GUI at the end of the race to know the final order
(fill in the 'order' array) */

View File

@ -25,13 +25,15 @@
#include "modes/world.hpp"
#include "states_screens/race_gui.hpp"
struct BattleInfo
{
int m_lives;
};
class ThreeStrikesBattle : public World
{
private:
struct BattleInfo
{
int m_lives;
};
RaceGUI::KartIconDisplayInfo* m_kart_display_info;
/** This vector contains an 'BattleInfo' struct for every kart in the race.
@ -53,7 +55,6 @@ public:
virtual void enterRaceOverState(const bool delay=false);
//virtual void getDefaultCollectibles(int& collectible_type, int& amount);
//virtual bool enableBonusBoxes();
virtual bool useFastMusicNearEnd() const { return false; }
virtual RaceGUI::KartIconDisplayInfo* getKartsDisplayInfo();
virtual bool raceHasLaps(){ return false; }

View File

@ -164,7 +164,7 @@ public:
/** Called to determine whether this race mode uses bonus boxes.
*/
virtual bool enableBonusBoxes(){ return true; }
virtual bool haveBonusBoxes(){ return true; }
/** Each game mode should have a unique identifier. Override
* this method in child classes to provide it.

View File

@ -867,7 +867,7 @@ void Track::itemCommand(const Vec3 &xyz, Item::ItemType type,
{
// Some modes (e.g. time trial) don't have any bonus boxes
if(type==Item::ITEM_BONUS_BOX &&
!RaceManager::getWorld()->enableBonusBoxes())
!RaceManager::getWorld()->haveBonusBoxes())
return;
Vec3 loc(xyz);