diff options
author | tron <tron@openttd.org> | 2006-06-14 11:05:30 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2006-06-14 11:05:30 +0000 |
commit | d2f6cb9e2d26d8119bc59f5b8cfa52d20f7cd795 (patch) | |
tree | ad23142e106dedc0fcb44dd7a183f059f36bbdb3 /players.c | |
parent | 17c15fab3efc4dfc7514bf89bbd9971abb178ea4 (diff) | |
download | openttd-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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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 |