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").
This commit is contained in:
Glenn Maynard
2004-08-05 20:03:03 +00:00
parent 124eab74ed
commit 0295d00db1
+11
View File
@@ -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];