(svn r1684) - Fix: [autoreplace] made sure that planes only show planes in replace GUI and helicopters only show helicopters
authorbjarni
Wed, 26 Jan 2005 18:18:00 +0000
changeset 1182 45b34b97753c
parent 1181 6231b823d796
child 1183 a9273fb4d48e
(svn r1684) - Fix: [autoreplace] made sure that planes only show planes in replace GUI and helicopters only show helicopters
vehicle_gui.c
--- a/vehicle_gui.c	Wed Jan 26 18:17:50 2005 +0000
+++ b/vehicle_gui.c	Wed Jan 26 18:18:00 2005 +0000
@@ -500,7 +500,7 @@
 				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 @@
 						}
 						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)) {