In soccer mode the same end camera as in 3 strikes battle

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@13699 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
deveee 2013-09-16 17:37:07 +00:00
parent 829656d1d7
commit 82590c791d
3 changed files with 10 additions and 5 deletions

View File

@ -94,7 +94,8 @@ AIBaseController::AIBaseController(AbstractKart *kart,
m_ai_properties = m_ai_properties =
m_kart->getKartProperties()->getAIPropertiesForDifficulty(); m_kart->getKartProperties()->getAIPropertiesForDifficulty();
if(race_manager->getMinorMode()!=RaceManager::MINOR_MODE_3_STRIKES) if(race_manager->getMinorMode()!=RaceManager::MINOR_MODE_3_STRIKES &&
race_manager->getMinorMode()!=RaceManager::MINOR_MODE_SOCCER)
{ {
m_world = dynamic_cast<LinearWorld*>(World::getWorld()); m_world = dynamic_cast<LinearWorld*>(World::getWorld());
m_track = m_world->getTrack(); m_track = m_world->getTrack();

View File

@ -56,7 +56,8 @@ EndController::EndController(AbstractKart *kart, StateManager::ActivePlayer *pla
: AIBaseController(kart, player) : AIBaseController(kart, player)
{ {
m_previous_controller = prev_controller; m_previous_controller = prev_controller;
if(race_manager->getMinorMode()!=RaceManager::MINOR_MODE_3_STRIKES) if(race_manager->getMinorMode()!=RaceManager::MINOR_MODE_3_STRIKES &&
race_manager->getMinorMode()!=RaceManager::MINOR_MODE_SOCCER)
{ {
// Overwrite the random selected default path from AIBaseController // Overwrite the random selected default path from AIBaseController
// with a path that always picks the first branch (i.e. it follows // with a path that always picks the first branch (i.e. it follows
@ -131,7 +132,8 @@ void EndController::reset()
m_track_node = QuadGraph::UNKNOWN_SECTOR; m_track_node = QuadGraph::UNKNOWN_SECTOR;
// In battle mode there is no quad graph, so nothing to do in this case // In battle mode there is no quad graph, so nothing to do in this case
if(race_manager->getMinorMode()!=RaceManager::MINOR_MODE_3_STRIKES) if(race_manager->getMinorMode()!=RaceManager::MINOR_MODE_3_STRIKES &&
race_manager->getMinorMode()!=RaceManager::MINOR_MODE_SOCCER)
{ {
QuadGraph::get()->findRoadSector(m_kart->getXYZ(), &m_track_node); QuadGraph::get()->findRoadSector(m_kart->getXYZ(), &m_track_node);
@ -181,7 +183,8 @@ void EndController::update(float dt)
AIBaseController::update(dt); AIBaseController::update(dt);
// In case of battle mode: don't do anything // In case of battle mode: don't do anything
if(race_manager->getMinorMode()==RaceManager::MINOR_MODE_3_STRIKES) if(race_manager->getMinorMode()==RaceManager::MINOR_MODE_3_STRIKES ||
race_manager->getMinorMode()==RaceManager::MINOR_MODE_SOCCER)
{ {
m_controls->m_accel = 0.0f; m_controls->m_accel = 0.0f;
// Brake while we are still driving forwards (if we keep // Brake while we are still driving forwards (if we keep

View File

@ -840,7 +840,8 @@ void Kart::finishedRace(float time)
this, 2.0f); this, 2.0f);
} }
} }
else if (race_manager->getMinorMode() == RaceManager::MINOR_MODE_3_STRIKES) else if (race_manager->getMinorMode() == RaceManager::MINOR_MODE_3_STRIKES ||
race_manager->getMinorMode() == RaceManager::MINOR_MODE_SOCCER)
{ {
setController(new EndController(this, m_controller->getPlayer(), setController(new EndController(this, m_controller->getPlayer(),
m_controller)); m_controller));