Add whether the vehicle is non-front to the vehicle pool pointer tag

Add iteration filters which check this
This commit is contained in:
Jonathan G Rennison
2024-02-25 14:49:31 +00:00
parent 05e237f8d1
commit 93bf033107
23 changed files with 145 additions and 81 deletions

View File

@@ -731,7 +731,7 @@ void SettingsDisableElrail(int32_t new_value)
}
/* Fix the total power and acceleration for trains */
for (Train *t : Train::Iterate()) {
for (Train *t : Train::IterateFrontOnly()) {
/* power and acceleration is cached only for front engines */
if (t->IsFrontEngine()) {
t->ConsistChanged(CCF_TRACK);