News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

Ware Type Check in ware_t

Started by knightly, May 10, 2009, 05:07:17 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

knightly

In ware_t class (simware.h) of r2454 :

Quote

   // find out the category ...
   bool is_passenger() const {  return index==0; }
   bool is_mail() const {  return index==1; }
   bool is_freight() const {  return index>2; }


I suppose the expression in blue should be index>=2?

gerw

No, index 2 is warenbauer_t::nichts (english: nothing). That is the good, that engines can transport ;)

Thank you for posting your doubts.

knightly

Thanks a lot for your swift clarification, gerw ;)