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 cl**** (simware.h) of r2454 :

Quote

   // find out the category ...
   bool is_p****enger() 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 ;)