mirror of https://github.com/OpenTTD/OpenTTD
Compare commits
3 Commits
20f938eefe
...
d07473f768
Author | SHA1 | Date |
---|---|---|
|
d07473f768 | |
|
4c7ea26238 | |
|
e46456d605 |
|
@ -1982,6 +1982,8 @@ static bool IsWholeTrainInsideDepot(const Train *v)
|
|||
*/
|
||||
void ReverseTrainDirection(Train *v)
|
||||
{
|
||||
//DEBUG(driver, 1, "Reversing train %d on tile %d", v->index, v->tile);
|
||||
|
||||
if (IsRailDepotTile(v->tile)) {
|
||||
if (IsWholeTrainInsideDepot(v)) return;
|
||||
InvalidateWindowData(WC_VEHICLE_DEPOT, v->tile);
|
||||
|
@ -3875,6 +3877,9 @@ static TileIndex TrainApproachingCrossingTile(const Train *v)
|
|||
*/
|
||||
static bool TrainCheckIfLineEnds(Train *v, bool reverse)
|
||||
{
|
||||
|
||||
if (v->flags.Test(VehicleRailFlag::Reversing)) return false;
|
||||
|
||||
/* First, handle broken down train */
|
||||
|
||||
int t = v->breakdown_ctr;
|
||||
|
@ -3924,6 +3929,7 @@ static bool TrainCheckIfLineEnds(Train *v, bool reverse)
|
|||
}
|
||||
|
||||
|
||||
|
||||
static bool TrainLocoHandler(Train *v, bool mode)
|
||||
{
|
||||
/* train has crashed? */
|
||||
|
|
Loading…
Reference in New Issue