From 20f7e8ff6dd85eac7d27353b3c73648b10335db1 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 14 Jan 2019 22:59:44 +0100 Subject: [PATCH] racing:: display scores/ghosts for racing even if racing is not yet on --- racing.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/racing.cpp b/racing.cpp index 9318e7bb..c6f37291 100644 --- a/racing.cpp +++ b/racing.cpp @@ -815,16 +815,24 @@ string racetimeformat(int t) { } void track_chooser(string new_track) { + cmode = 0; + gamescreen(2); dialog::init(XLAT("Racing")); map landmap; + + dynamicval so(shmup::on, true); + dynamicval ro(racing::on, true); char let = 'a'; for(eLand l: race_lands) { - auto& gh = race_ghosts[make_pair(new_track, modecode())] [l]; + auto& ghs = race_ghosts[make_pair(new_track, modecode())]; const int LOST = 3600000; int best = LOST; - for(auto& gc: gh) best = min(best, gc.result); + if(ghs.count(l)) { + auto& gh = ghs[l]; + for(auto& gc: gh) best = min(best, gc.result); + } string s = (best == LOST) ? "" : racetimeformat(best); landmap[let] = l; dialog::addSelItem(XLAT1(linf[l].name), s, let++);