some debug code to try to fix an elusive bug on IRC
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@3049 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
1534881cdf
commit
8ef09afb6c
@ -52,7 +52,7 @@ public:
|
||||
const std::string& getDescription () const { return m_description; }
|
||||
const std::string& getItemStyle () const { return m_item_style; }
|
||||
const std::string& getFilename () const { return m_filename; }
|
||||
const std::string& getTrack(size_t track_index) const { assert(track_index < m_tracks.size());
|
||||
const std::string& getTrack(size_t track_index) const { assert(track_index >= 0); assert(track_index < m_tracks.size());
|
||||
return m_tracks[track_index]; }
|
||||
const std::vector<std::string>& getTracks() const {return m_tracks; }
|
||||
const std::vector<int>& getLaps() const {return m_laps; }
|
||||
|
@ -89,14 +89,11 @@ TrackSel::TrackSel()
|
||||
m_offset = 0;
|
||||
switchGroup();
|
||||
m_current_track = -1;
|
||||
printf("checking for previous track : %s (%i chars)\n" , user_config->m_last_track.c_str(), user_config->m_last_track.size() );
|
||||
for(unsigned int i=0; i<m_index_avail_tracks.size(); i++)
|
||||
{
|
||||
printf("testing against track %i : %i\n",i,m_index_avail_tracks[i]);
|
||||
printf("name=%s\n", track_manager->getTrack(m_index_avail_tracks[i])->getIdent().c_str());
|
||||
assert(i < m_index_avail_tracks.size());
|
||||
if(user_config->m_last_track.size() > 0 &&
|
||||
track_manager->getTrack(m_index_avail_tracks[i])->getIdent()==
|
||||
assert( m_index_avail_tracks[i] >= 0);
|
||||
if(track_manager->getTrack(m_index_avail_tracks[i])->getIdent()==
|
||||
user_config->m_last_track)
|
||||
{
|
||||
m_offset = i-m_max_entries/2;
|
||||
@ -175,6 +172,7 @@ void TrackSel::switchGroup()
|
||||
{
|
||||
if(!unlock_manager->isLocked(track_manager->getTrack(tracks[i])->getIdent()))
|
||||
{
|
||||
printf("Adding track %i, id %i\n", i ,tracks[i]);
|
||||
m_index_avail_tracks.push_back(tracks[i]);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user