(svn r5262) Add symbolic names for the aircraft subtypes. not perfect, but better than raw numbers

This commit is contained in:
tron
2006-06-14 11:05:30 +00:00
parent 17c15fab3e
commit d2f6cb9e2d
6 changed files with 19 additions and 11 deletions

View File

@@ -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