players.c
changeset 4023 b65af90447d2
parent 4000 bab1ebc37da0
child 4077 d3022f976946
--- a/players.c	Wed Jun 14 09:52:50 2006 +0000
+++ b/players.c	Wed Jun 14 11:05:30 2006 +0000
@@ -738,7 +738,8 @@
 					return CMD_ERROR;
 
 				// make sure that we do not replace a plane with a helicopter or vise versa
-				if (GetEngine(new_engine_type)->type == VEH_Aircraft && HASBIT(AircraftVehInfo(old_engine_type)->subtype, 0) != HASBIT(AircraftVehInfo(new_engine_type)->subtype, 0))
+				if (GetEngine(new_engine_type)->type == VEH_Aircraft &&
+						(AircraftVehInfo(old_engine_type)->subtype & AIR_CTOL) != (AircraftVehInfo(new_engine_type)->subtype & AIR_CTOL))
 					return CMD_ERROR;
 
 				// make sure that the player can actually buy the new engine