mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-30 18:09:09 +00:00
(svn r2541) -Feature: Modified IsCompatibleRail so that an engine can move on more
than one railtype (like Diesel engines on electrified rail). -Codechange: Use IsCompatibleRail where it should be used
This commit is contained in:
@@ -160,7 +160,7 @@ static void engine_drawing_loop(int *x, int *y, int *pos, int *sel,
|
||||
const Engine *e = GetEngine(i);
|
||||
const RailVehicleInfo *rvi = RailVehInfo(i);
|
||||
|
||||
if (e->railtype != railtype || !(rvi->flags & RVI_WAGON) != is_engine ||
|
||||
if (!IsCompatibleRail(railtype, e->railtype) || !(rvi->flags & RVI_WAGON) != is_engine ||
|
||||
!HASBIT(e->player_avail, _local_player))
|
||||
continue;
|
||||
|
||||
@@ -192,7 +192,7 @@ static void NewRailVehicleWndProc(Window *w, WindowEvent *e)
|
||||
|
||||
for (i = 0; i < NUM_TRAIN_ENGINES; i++) {
|
||||
const Engine *e = GetEngine(i);
|
||||
if (e->railtype == railtype
|
||||
if (IsCompatibleRail(railtype, e->railtype)
|
||||
&& HASBIT(e->player_avail, _local_player))
|
||||
count++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user