comparison src/roadveh_cmd.cpp @ 6331:473dace658f4 draft

(svn r9303) -Codechange: Use cargo class when counting passengers in a road vehicle crash, and when loading aircraft.
author peter1138 <peter1138@openttd.org>
date Sun, 18 Mar 2007 22:32:05 +0000
parents 34db8eef99ef
children 96b1652c6011
comparison
equal deleted inserted replaced
6330:1838edf26c08 6331:473dace658f4
594 ClearSlot(v); 594 ClearSlot(v);
595 595
596 InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR); 596 InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
597 597
598 pass = 1; 598 pass = 1;
599 if (v->cargo_type == CT_PASSENGERS) pass += v->cargo_count; 599 if (IsCargoInClass(v->cargo_type, CC_PASSENGERS)) pass += v->cargo_count;
600 v->cargo_count = 0; 600 v->cargo_count = 0;
601 601
602 SetDParam(0, pass); 602 SetDParam(0, pass);
603 AddNewsItem( 603 AddNewsItem(
604 (pass == 1) ? 604 (pass == 1) ?