From 0295d00db1f67211fed1dbff1c14cbd31ded68a6 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Thu, 5 Aug 2004 20:03:03 +0000 Subject: [PATCH] Fix radar values being calculated for non-fixed trail entries; the Trail::GetRadarValues case didn't handle BEST, caprice, and m_bRandomize. Catalog.xml writing is still too slow (eg. for "Tournamix 4 Sample.crs"). --- stepmania/src/Course.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/stepmania/src/Course.cpp b/stepmania/src/Course.cpp index e4bc66bbf2..e6e7584e7a 100644 --- a/stepmania/src/Course.cpp +++ b/stepmania/src/Course.cpp @@ -881,6 +881,17 @@ bool Course::GetTrailUnsorted( StepsType st, CourseDifficulty cd, Trail &trail ) trail.m_vEntries.push_back( te ); } + /* Hack: If any entry was non-FIXED, or m_bRandomize is set, then radar values + * for this trail will be meaningless as they'll change every time. Pre-cache + * empty data. XXX: How can we do this cleanly, without propagating lots of + * otherwise unnecessary data (course entry types, m_bRandomize) to Trail, or + * storing a Course pointer in Trail (yuck)? */ + if( !AllSongsAreFixed() || m_bRandomize ) + { + trail.m_bRadarValuesCached = true; + trail.m_CachedRadarValues = RadarValues(); + } + /* If we have a manually-entered meter for this difficulty, use it. */ if( m_iCustomMeter[cd] != -1 ) trail.m_iSpecifiedMeter = m_iCustomMeter[cd];