comparison src/train_cmd.cpp @ 6334:e62882b1dbfc draft

(svn r9322) -Codechange: Use cargo class to count crash/flood victims
author peter1138 <peter1138@openttd.org>
date Mon, 19 Mar 2007 12:40:51 +0000
parents c0b713064125
children 96b1652c6011
comparison
equal deleted inserted replaced
6333:273ef908beb8 6334:e62882b1dbfc
2813 2813
2814 static uint CountPassengersInTrain(const Vehicle* v) 2814 static uint CountPassengersInTrain(const Vehicle* v)
2815 { 2815 {
2816 uint num = 0; 2816 uint num = 0;
2817 BEGIN_ENUM_WAGONS(v) 2817 BEGIN_ENUM_WAGONS(v)
2818 if (v->cargo_type == CT_PASSENGERS) num += v->cargo_count; 2818 if (IsCargoInClass(v->cargo_type, CC_PASSENGERS)) num += v->cargo_count;
2819 END_ENUM_WAGONS(v) 2819 END_ENUM_WAGONS(v)
2820 return num; 2820 return num;
2821 } 2821 }
2822 2822
2823 /* 2823 /*