Fix soccer mode crash
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/christmas@12297 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
a05e26bf05
commit
5fedffcb75
@ -16,8 +16,8 @@
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
#ifndef THREE_STRIKES_HPP
|
||||
#define THREE_STRIKES_HPP
|
||||
#ifndef SOCCER_WORLD_HPP
|
||||
#define SOCCER_WORLD_HPP
|
||||
|
||||
#include "modes/world_with_rank.hpp"
|
||||
#include "states_screens/race_gui_base.hpp"
|
||||
@ -80,7 +80,7 @@ public:
|
||||
|
||||
|
||||
void updateKartRanks();
|
||||
}; // SoccerWorlds
|
||||
}; // SoccerWorld
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include "modes/standard_race.hpp"
|
||||
#include "modes/world.hpp"
|
||||
#include "modes/three_strikes_battle.hpp"
|
||||
#include "modes/soccer_world.hpp"
|
||||
#include "network/network_manager.hpp"
|
||||
#include "states_screens/grand_prix_lose.hpp"
|
||||
#include "states_screens/grand_prix_win.hpp"
|
||||
@ -390,6 +391,8 @@ void RaceManager::startNextRace()
|
||||
World::setWorld(new StandardRace());
|
||||
else if(m_minor_mode==MINOR_MODE_3_STRIKES)
|
||||
World::setWorld(new ThreeStrikesBattle());
|
||||
else if(m_minor_mode==MINOR_MODE_SOCCER)
|
||||
World::setWorld(new SoccerWorld());
|
||||
else if(m_minor_mode==MINOR_MODE_OVERWORLD)
|
||||
World::setWorld(new OverWorld());
|
||||
else if(m_minor_mode==MINOR_MODE_CUTSCENE)
|
||||
|
@ -806,8 +806,10 @@ void RaceGUIBase::drawGlobalPlayerIcons(int bottom_margin)
|
||||
//x,y is the target position
|
||||
int lap = info.lap;
|
||||
|
||||
// In battle mode there is no distance along track etc.
|
||||
if(race_manager->getMinorMode()==RaceManager::MINOR_MODE_3_STRIKES)
|
||||
// In battle mode and soccer mode there is no distance along track etc.
|
||||
const RaceManager::MinorRaceModeType minor_mode = race_manager->getMinorMode();
|
||||
if( minor_mode==RaceManager::MINOR_MODE_3_STRIKES ||
|
||||
minor_mode==RaceManager::MINOR_MODE_SOCCER)
|
||||
{
|
||||
x = x_base;
|
||||
y = previous_y+ICON_PLAYER_WIDTH+2;
|
||||
|
Loading…
Reference in New Issue
Block a user