Patch by StephenIRC to fix input when starting with -N

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3707 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2009-07-08 00:46:47 +00:00
parent 1b6d075346
commit c5afb804c3

View File

@ -25,6 +25,9 @@
#include "config/user_config.hpp"
#include "config/stk_config.hpp"
#include "graphics/scene.hpp"
#include "gui/kart_selection.hpp"
#include "input/device_manager.hpp"
#include "input/input_manager.hpp"
#include "karts/kart_properties_manager.hpp"
#include "modes/follow_the_leader.hpp"
#include "modes/standard_race.hpp"
@ -182,6 +185,11 @@ void RaceManager::computeRandomKartList()
*/
void RaceManager::startNew()
{
if(UserConfigParams::m_no_start_screen == true)
{
InputDevice* device = input_manager->getDeviceList()->getLatestUsedDevice();
StateManager::setPlayer0Device(device);
}
if(m_major_mode==MAJOR_MODE_GRAND_PRIX) // GP: get tracks and laps from grand prix
{
m_tracks = m_grand_prix.getTracks();