The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: knightly on May 10, 2009, 05:07:17 PM

Title: Ware Type Check in ware_t
Post by: knightly on May 10, 2009, 05:07:17 PM
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?
Title: Re: Ware Type Check in ware_t
Post by: gerw on May 10, 2009, 05:43:06 PM
No, index 2 is warenbauer_t::nichts (english: nothing). That is the good, that engines can transport ;)

Thank you for posting your doubts.
Title: Re: Ware Type Check in ware_t
Post by: knightly on May 10, 2009, 05:48:04 PM
Thanks a lot for your swift clarification, gerw ;)