mirror of https://github.com/OpenTTD/OpenTTD
Merge 4c7ea26238
into a46a3a97f3
commit
c571a0653c
|
@ -1991,6 +1991,8 @@ static bool IsWholeTrainInsideDepot(const Train *v)
|
||||||
*/
|
*/
|
||||||
void ReverseTrainDirection(Train *v)
|
void ReverseTrainDirection(Train *v)
|
||||||
{
|
{
|
||||||
|
//DEBUG(driver, 1, "Reversing train %d on tile %d", v->index, v->tile);
|
||||||
|
|
||||||
if (IsRailDepotTile(v->tile)) {
|
if (IsRailDepotTile(v->tile)) {
|
||||||
if (IsWholeTrainInsideDepot(v)) return;
|
if (IsWholeTrainInsideDepot(v)) return;
|
||||||
InvalidateWindowData(WC_VEHICLE_DEPOT, v->tile);
|
InvalidateWindowData(WC_VEHICLE_DEPOT, v->tile);
|
||||||
|
@ -3884,6 +3886,9 @@ static TileIndex TrainApproachingCrossingTile(const Train *v)
|
||||||
*/
|
*/
|
||||||
static bool TrainCheckIfLineEnds(Train *v, bool reverse)
|
static bool TrainCheckIfLineEnds(Train *v, bool reverse)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (v->flags.Test(VehicleRailFlag::Reversing)) return false;
|
||||||
|
|
||||||
/* First, handle broken down train */
|
/* First, handle broken down train */
|
||||||
|
|
||||||
int t = v->breakdown_ctr;
|
int t = v->breakdown_ctr;
|
||||||
|
@ -3933,6 +3938,7 @@ static bool TrainCheckIfLineEnds(Train *v, bool reverse)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static bool TrainLocoHandler(Train *v, bool mode)
|
static bool TrainLocoHandler(Train *v, bool mode)
|
||||||
{
|
{
|
||||||
/* train has crashed? */
|
/* train has crashed? */
|
||||||
|
|
Loading…
Reference in New Issue