Replace TrainCache::cached_tilt with a flags field

This commit is contained in:
Jonathan G Rennison
2021-04-15 18:30:10 +01:00
parent 555861510f
commit b514d29db1
6 changed files with 19 additions and 12 deletions

View File

@@ -330,7 +330,7 @@ static void CheckCurveLookAhead(const Train *v, TrainReservationLookAhead *looka
const RailtypeInfo *rti = GetRailTypeInfo(rt);
max_speed += (max_speed / 2) * rti->curve_speed;
if (v->tcache.cached_tilt) {
if (v->tcache.cached_tflags & TCF_TILT) {
/* Apply max_speed bonus of 20% for a tilting train */
max_speed += max_speed / 5;
}