Ensure that cached decel values of free wagon chain heads are zeroed
This commit is contained in:
@@ -349,6 +349,9 @@ void Train::ConsistChanged(ConsistChangeFlags allowed_changes)
|
||||
InvalidateWindowData(WC_VEHICLE_REFIT, this->index, VIWD_CONSIST_CHANGED);
|
||||
InvalidateWindowData(WC_VEHICLE_ORDERS, this->index, VIWD_CONSIST_CHANGED);
|
||||
InvalidateNewGRFInspectWindow(GSF_TRAINS, this->index);
|
||||
} else {
|
||||
this->tcache.cached_deceleration = 0;
|
||||
this->tcache.cached_uncapped_decel = 0;
|
||||
}
|
||||
if (allowed_changes & CCF_LENGTH) {
|
||||
for (Train *u = this->Next(); u != nullptr; u = u->Next()) {
|
||||
|
Reference in New Issue
Block a user