Added support for reverse mode in history files.
This commit is contained in:
parent
2a56cc6241
commit
4f4a1c0373
@ -269,7 +269,17 @@ void History::Load()
|
||||
Log::fatal("History", "No difficulty found in history file.");
|
||||
race_manager->setDifficulty((RaceManager::Difficulty)n);
|
||||
|
||||
|
||||
// Optional (not supported in older history files): include reverse
|
||||
fgets(s, 1023, fd);
|
||||
char r;
|
||||
if (!sscanf(s, "reverse: %c", &r) != 1)
|
||||
{
|
||||
fgets(s, 1023, fd);
|
||||
race_manager->setReverseTrack(r == 'y');
|
||||
}
|
||||
|
||||
|
||||
if(sscanf(s, "track: %1023s",s1)!=1)
|
||||
Log::warn("History", "Track not found in history file.");
|
||||
race_manager->setTrack(s1);
|
||||
|
Loading…
Reference in New Issue
Block a user