summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2005-01-26 18:18:00 +0000
committerbjarni <bjarni@openttd.org>2005-01-26 18:18:00 +0000
commit3fb831b0ae7a3d44d0759d60fa3c25bdae1f595c (patch)
tree1435f3d3dd9395988e647da799d4ac120da6f071
parent60e59e186d1fa0853b227242fbca7ae997725214 (diff)
downloadopenttd-3fb831b0ae7a3d44d0759d60fa3c25bdae1f595c.tar.xz
(svn r1684) - Fix: [autoreplace] made sure that planes only show planes in replace GUI and helicopters only show helicopters
-rw-r--r--vehicle_gui.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vehicle_gui.c b/vehicle_gui.c
index f212e9b90..b75adf451 100644
--- a/vehicle_gui.c
+++ b/vehicle_gui.c
@@ -500,7 +500,7 @@ static void SetupScrollStuffForReplaceWindow(Window *w)
engine_id = AIRCRAFT_ENGINES_INDEX;
do {
if (HASBIT(e->player_avail, _local_player)) {
- if ( (subtype && AircraftVehInfo(engine_id)->subtype) || (!(subtype) && !AircraftVehInfo(engine_id)->subtype) ) {
+ if (HASBIT(subtype, 0) == HASBIT(AircraftVehInfo(engine_id)->subtype, 0)) {
count2++;
if (sel[1]==0) selected_id[1] = engine_id;
sel[1]--;
@@ -647,7 +647,7 @@ static void DrawEngineArrayInReplaceWindow(Window *w, int x, int y, int x2, int
}
sel[0]--;
}
- if ( ((subtype && AircraftVehInfo(engine_id)->subtype) || (!(subtype) && !AircraftVehInfo(engine_id)->subtype))
+ if ( (HASBIT(subtype, 0) == HASBIT(AircraftVehInfo(engine_id)->subtype, 0))
&& HASBIT(e->player_avail, _local_player) ) {
if (sel[1]==0) selected_id[1] = engine_id;
if (IS_INT_INSIDE(--pos2, -w->vscroll.cap, 0)) {