mirror of https://github.com/OpenTTD/OpenTTD
(svn r1935) Missing braces; while here turn the ifs into a single switch
parent
a747e2bb97
commit
a4a09e73d5
22
train_cmd.c
22
train_cmd.c
|
@ -2640,12 +2640,22 @@ static void DeleteLastWagon(Vehicle *v)
|
||||||
if (endtile == INVALID_TILE) // tunnel is busy (error returned)
|
if (endtile == INVALID_TILE) // tunnel is busy (error returned)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ((v->direction == 1) || (v->direction == 5) )
|
switch (v->direction) {
|
||||||
SetSignalsOnBothDir(v->tile, 0);
|
case 1:
|
||||||
SetSignalsOnBothDir(endtile, 0);
|
case 5:
|
||||||
if ((v->direction == 3) || (v->direction == 7) )
|
SetSignalsOnBothDir(v->tile, 0);
|
||||||
SetSignalsOnBothDir(v->tile, 1);
|
SetSignalsOnBothDir(endtile, 0);
|
||||||
SetSignalsOnBothDir(endtile, 1);
|
break;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
case 7:
|
||||||
|
SetSignalsOnBothDir(v->tile, 1);
|
||||||
|
SetSignalsOnBothDir(endtile, 1);
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue