(svn r9352) -Codechange: Use cargo class to determine if an aircraft should carry mail
authorpeter1138
Mon, 19 Mar 2007 20:54:13 +0000
changeset 6666 88f1598fafb3
parent 6665 4abb76844cac
child 6667 437af4c23305
(svn r9352) -Codechange: Use cargo class to determine if an aircraft should carry mail
src/aircraft_cmd.cpp
--- a/src/aircraft_cmd.cpp	Mon Mar 19 18:37:23 2007 +0000
+++ b/src/aircraft_cmd.cpp	Mon Mar 19 20:54:13 2007 +0000
@@ -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 @@
 		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);