summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-03-19 20:54:13 +0000
committerpeter1138 <peter1138@openttd.org>2007-03-19 20:54:13 +0000
commitb08c8dcb6a891d7c7530f326ce72b514935ae52e (patch)
tree11f660e1035aebb1f10c61f5cac4b3a1bb32aaad /src
parentbeb21139c3318d722173ec442660240734a3e362 (diff)
downloadopenttd-b08c8dcb6a891d7c7530f326ce72b514935ae52e.tar.xz
(svn r9352) -Codechange: Use cargo class to determine if an aircraft should carry mail
Diffstat (limited to 'src')
-rw-r--r--src/aircraft_cmd.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index 74ab23e66..624c0afe9 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -30,6 +30,7 @@
#include "newgrf_sound.h"
#include "date.h"
#include "spritecache.h"
+#include "cargotype.h"
/** this maps the terminal to its corresponding state and block flag
* currently set for 10 terms, 4 helipads */
@@ -647,7 +648,7 @@ int32 CmdRefitAircraft(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
v->cargo_cap = pass;
Vehicle *u = v->next;
- uint mail = new_cid != CT_PASSENGERS ? 0 : avi->mail_capacity;
+ uint mail = IsCargoInClass(new_cid, CC_PASSENGERS) ? avi->mail_capacity : 0;
u->cargo_cap = mail;
if (v->cargo_type == new_cid) {
v->cargo_count = min(pass, v->cargo_count);