summaryrefslogtreecommitdiff
path: root/players.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-06-14 11:05:30 +0000
committertron <tron@openttd.org>2006-06-14 11:05:30 +0000
commitd2f6cb9e2d26d8119bc59f5b8cfa52d20f7cd795 (patch)
treead23142e106dedc0fcb44dd7a183f059f36bbdb3 /players.c
parent17c15fab3efc4dfc7514bf89bbd9971abb178ea4 (diff)
downloadopenttd-d2f6cb9e2d26d8119bc59f5b8cfa52d20f7cd795.tar.xz
(svn r5262) Add symbolic names for the aircraft subtypes. not perfect, but better than raw numbers
Diffstat (limited to 'players.c')
-rw-r--r--players.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/players.c b/players.c
index 865688f5d..6a72c8c95 100644
--- a/players.c
+++ b/players.c
@@ -738,7 +738,8 @@ int32 CmdReplaceVehicle(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
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