Fix mispredicted stop location when through-loading
When using realistic braking and skipped train parts have different lengths.
This commit is contained in:
@@ -672,8 +672,8 @@ int PredictStationStoppingLocation(const Train *v, const Order *order, int stati
|
||||
}
|
||||
if (skip) {
|
||||
for (const Train *part = u; part != nullptr; part = part->HasArticulatedPart() ? part->GetNextArticulatedPart() : nullptr) {
|
||||
overhang -= u->gcache.cached_veh_length;
|
||||
adjust += u->gcache.cached_veh_length;
|
||||
overhang -= part->gcache.cached_veh_length;
|
||||
adjust += part->gcache.cached_veh_length;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user