mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r15248) -Fix [FS#2561]: we require v->cur_speed to be zero for wagons and non-front engines
This commit is contained in:
parent
3d21639d5b
commit
3964b2dd8c
@ -274,8 +274,15 @@ void AfterLoadVehicles(bool part_of_load)
|
||||
}
|
||||
|
||||
/* Stop non-front engines */
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
if (v->type == VEH_TRAIN && IsTrainEngine(v) && !IsFrontEngine(v)) v->vehstatus |= VS_STOPPED;
|
||||
if (CheckSavegameVersion(112)) {
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
if (v->type == VEH_TRAIN && !IsFrontEngine(v)) {
|
||||
if (IsTrainEngine(v)) v->vehstatus |= VS_STOPPED;
|
||||
/* cur_speed is now relevant for non-front parts - nonzero breaks
|
||||
* moving-wagons-inside-depot- and autoreplace- code */
|
||||
v->cur_speed = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
|
Loading…
Reference in New Issue
Block a user