fixed inner-name used instead of player-name when GP challenge is unlocked

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@2767 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2008-12-24 16:40:09 +00:00
parent 3fb5ac5a98
commit 727079c330

View File

@ -24,6 +24,7 @@
#include "track.hpp" #include "track.hpp"
#include "karts/kart_properties_manager.hpp" #include "karts/kart_properties_manager.hpp"
#include "karts/kart_properties.hpp" #include "karts/kart_properties.hpp"
#include "grand_prix_manager.hpp"
#if defined(WIN32) && !defined(__CYGWIN__) #if defined(WIN32) && !defined(__CYGWIN__)
# define snprintf _snprintf # define snprintf _snprintf
@ -130,8 +131,11 @@ const std::string Challenge::getUnlockedMessage() const
snprintf(message, 127, _("New game mode\n'%s'\nnow available"), m_feature[n].user_name.c_str() ); snprintf(message, 127, _("New game mode\n'%s'\nnow available"), m_feature[n].user_name.c_str() );
break; break;
case UNLOCK_GP: case UNLOCK_GP:
snprintf(message, 127, _("New Grand Prix '%s'\nnow available"), m_feature[n].name.c_str() ); {
std::string gp_user_name = grand_prix_manager->getGrandPrix(m_feature[n].name)->getName();
snprintf(message, 127, _("New Grand Prix '%s'\nnow available"), gp_user_name.c_str() );
break; break;
}
case UNLOCK_DIFFICULTY: case UNLOCK_DIFFICULTY:
snprintf(message, 127, _("New difficulty\n'%s'\nnow available"), m_feature[n].user_name.c_str() ); snprintf(message, 127, _("New difficulty\n'%s'\nnow available"), m_feature[n].user_name.c_str() );
break; break;