Remove bubblegum in soccer mode as suggested by auria
This commit is contained in:
parent
3674815e03
commit
e8adf7f051
@ -101,6 +101,8 @@
|
||||
w-multi=" 0 30 30 100 60 0 0 0 0 0" />
|
||||
<battle w="10 30 60 0 0 10 30 0 0 0"
|
||||
w-multi=" 0 0 5 0 0 0 0 0 0 0" />
|
||||
<soccer w=" 0 30 60 0 0 10 30 0 0 0"
|
||||
w-multi=" 0 0 5 0 0 0 0 0 0 0" />
|
||||
<tuto w=" 0 0 0 0 0 0 0 0 0 0"
|
||||
w-multi=" 0 0 100 0 0 0 0 0 0 0" />
|
||||
|
||||
|
@ -136,6 +136,7 @@ void PowerupManager::loadAllPowerups()
|
||||
loadWeights(*root, "end33", POSITION_END33 );
|
||||
loadWeights(*root, "last" , POSITION_LAST );
|
||||
loadWeights(*root, "battle" , POSITION_BATTLE_MODE);
|
||||
loadWeights(*root, "soccer" , POSITION_SOCCER_MODE);
|
||||
loadWeights(*root, "tuto", POSITION_TUTORIAL_MODE);
|
||||
|
||||
delete root;
|
||||
@ -273,7 +274,8 @@ void PowerupManager::updateWeightsForRace(unsigned int num_karts)
|
||||
{
|
||||
m_position_to_class.clear();
|
||||
// In battle mode no positions exist, so use only position 1
|
||||
unsigned int end_position = (race_manager->isBattleMode()) ? 1 : num_karts;
|
||||
unsigned int end_position = (race_manager->isBattleMode() ||
|
||||
race_manager->isSoccerMode()) ? 1 : num_karts;
|
||||
for(unsigned int position =1; position <= end_position; position++)
|
||||
{
|
||||
// Set up the mapping of position to position class:
|
||||
@ -322,6 +324,7 @@ PowerupManager::PositionClass
|
||||
unsigned int position)
|
||||
{
|
||||
if(race_manager->isBattleMode()) return POSITION_BATTLE_MODE;
|
||||
if(race_manager->isSoccerMode()) return POSITION_SOCCER_MODE;
|
||||
if(race_manager->isTutorialMode()) return POSITION_TUTORIAL_MODE;
|
||||
if(position==1) return POSITION_FIRST;
|
||||
if(position==num_karts) return POSITION_LAST;
|
||||
@ -354,6 +357,7 @@ PowerupManager::PowerupType PowerupManager::getRandomPowerup(unsigned int pos,
|
||||
// Positions start with 1, while the index starts with 0 - so subtract 1
|
||||
PositionClass pos_class =
|
||||
(race_manager->isBattleMode() ? POSITION_BATTLE_MODE :
|
||||
race_manager->isSoccerMode() ? POSITION_SOCCER_MODE :
|
||||
(race_manager->isTutorialMode() ? POSITION_TUTORIAL_MODE :
|
||||
m_position_to_class[pos-1]));
|
||||
|
||||
|
@ -96,6 +96,7 @@ public:
|
||||
POSITION_END33,
|
||||
POSITION_LAST,
|
||||
POSITION_BATTLE_MODE,
|
||||
POSITION_SOCCER_MODE,
|
||||
POSITION_TUTORIAL_MODE,
|
||||
POSITION_COUNT};
|
||||
|
||||
|
@ -611,10 +611,21 @@ public:
|
||||
const int id = (int)m_minor_mode;
|
||||
// This uses the numerical id of the mode, see the macros
|
||||
// LINEAR_RACE and BATTLE_ARENA above for exact meaning.
|
||||
if (id >= 2000) return true;
|
||||
if (id >= 2000 && id != 2001) return true;
|
||||
else return false;
|
||||
} // isBattleMode
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
/** \brief Returns true if the current mode is a soccer mode. */
|
||||
bool isSoccerMode()
|
||||
{
|
||||
const int id = (int)m_minor_mode;
|
||||
// This uses the numerical id of the mode, see the macros
|
||||
// LINEAR_RACE and BATTLE_ARENA above for exact meaning.
|
||||
if (id == 2001) return true;
|
||||
else return false;
|
||||
} // isSoccerMode
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
bool isTutorialMode()
|
||||
{
|
||||
@ -624,7 +635,7 @@ public:
|
||||
/** \brief Returns true if the current mode has laps. */
|
||||
bool modeHasLaps()
|
||||
{
|
||||
if (isBattleMode()) return false;
|
||||
if (isBattleMode() || isSoccerMode()) return false;
|
||||
const int id = (int)m_minor_mode;
|
||||
// See meaning of IDs above
|
||||
const int answer = (id-1000)/100;
|
||||
|
Loading…
x
Reference in New Issue
Block a user