mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-16 00:12:51 +00:00
(svn r1633) -Fix: [1040119] Flood and wagons in depot
This commit is contained in:
parent
aa5f513d4c
commit
59e099149c
@ -2630,6 +2630,10 @@ void Train_Tick(Vehicle *v)
|
|||||||
// make sure vehicle wasn't deleted.
|
// make sure vehicle wasn't deleted.
|
||||||
if (v->type == VEH_Train && v->subtype == TS_Front_Engine)
|
if (v->type == VEH_Train && v->subtype == TS_Front_Engine)
|
||||||
TrainLocoHandler(v, true);
|
TrainLocoHandler(v, true);
|
||||||
|
} else if (v->subtype == TS_Free_Car && HASBITS(v->vehstatus, VS_CRASHED)) {
|
||||||
|
// Delete flooded standalone wagon
|
||||||
|
if (++v->u.rail.crash_anim_pos >= 4400)
|
||||||
|
DeleteVehicle(v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -587,7 +587,7 @@ static void FloodVehicle(Vehicle *v)
|
|||||||
else if (v->type == VEH_Train) {
|
else if (v->type == VEH_Train) {
|
||||||
v = GetFirstVehicleInChain(v);
|
v = GetFirstVehicleInChain(v);
|
||||||
u = v;
|
u = v;
|
||||||
pass = 4; // driver
|
if (v->subtype == TS_Front_Engine) pass = 4; // driver
|
||||||
|
|
||||||
// crash all wagons, and count passangers
|
// crash all wagons, and count passangers
|
||||||
BEGIN_ENUM_WAGONS(v)
|
BEGIN_ENUM_WAGONS(v)
|
||||||
|
Loading…
Reference in New Issue
Block a user