Fix bug that overworld would remember position when switching player
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11957 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -682,6 +682,11 @@ public:
|
||||
m_kart_last_position_on_overworld = pos;
|
||||
}
|
||||
// ------------------------------------------------------------------------
|
||||
void clearKartLastPositionOnOverworld()
|
||||
{
|
||||
m_have_kart_last_position_on_overworld = false;
|
||||
}
|
||||
// ------------------------------------------------------------------------
|
||||
Vec3 getKartLastPositionOnOverworld()
|
||||
{
|
||||
return m_kart_last_position_on_overworld;
|
||||
|
||||
@@ -191,6 +191,7 @@ void OptionsScreenPlayers::eventCallback(Widget* widget, const std::string& name
|
||||
else if (name == "playername")
|
||||
{
|
||||
UserConfigParams::m_default_player = L"";
|
||||
race_manager->clearKartLastPositionOnOverworld();
|
||||
StateManager::get()->pushScreen(StoryModeLobbyScreen::getInstance());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user