mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
Cleanup: Remove questionable syntax in GetOrderCmdFromTile
This commit is contained in:
parent
234f1007f7
commit
21ec3e5531
@ -395,11 +395,13 @@ static Order GetOrderCmdFromTile(const Vehicle *v, TileIndex tile)
|
|||||||
|
|
||||||
if (st->owner == _local_company || st->owner == OWNER_NONE) {
|
if (st->owner == _local_company || st->owner == OWNER_NONE) {
|
||||||
byte facil;
|
byte facil;
|
||||||
(facil = FACIL_DOCK, v->type == VEH_SHIP) ||
|
switch (v->type) {
|
||||||
(facil = FACIL_TRAIN, v->type == VEH_TRAIN) ||
|
case VEH_SHIP: facil = FACIL_DOCK; break;
|
||||||
(facil = FACIL_AIRPORT, v->type == VEH_AIRCRAFT) ||
|
case VEH_TRAIN: facil = FACIL_TRAIN; break;
|
||||||
(facil = FACIL_BUS_STOP, v->type == VEH_ROAD && RoadVehicle::From(v)->IsBus()) ||
|
case VEH_AIRCRAFT: facil = FACIL_AIRPORT; break;
|
||||||
(facil = FACIL_TRUCK_STOP, 1);
|
case VEH_ROAD: facil = RoadVehicle::From(v)->IsBus() ? FACIL_BUS_STOP : FACIL_TRUCK_STOP; break;
|
||||||
|
default: NOT_REACHED();
|
||||||
|
}
|
||||||
if (st->facilities & facil) {
|
if (st->facilities & facil) {
|
||||||
order.MakeGoToStation(st_index);
|
order.MakeGoToStation(st_index);
|
||||||
if (_ctrl_pressed) order.SetLoadType(OLF_FULL_LOAD_ANY);
|
if (_ctrl_pressed) order.SetLoadType(OLF_FULL_LOAD_ANY);
|
||||||
|
Loading…
Reference in New Issue
Block a user