The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: eipi on September 15, 2013, 12:23:33 PM

Title: Player receives money by building railway signals
Post by: eipi on September 15, 2013, 12:23:33 PM
When building railway signals, the player actually receives money instead of having to pay the costs for building. (tested with r6718)

In simwerkz.cc, line 4520+ there's this:


gr->obj_add(rs);
rs->laden_abschliessen(); // to make them visible
weg->count_sign();
spieler_t::book_construction_costs(sp, -besch->get_preis(), gr->get_pos().get_2d(), weg->get_waytype());


The problem is that besch->get_preis() now returns uint32, and when the minus operator is applied the result is still uint32, i.e. positive.
Patch attached.
Title: Re: Player receives money by building railway signals
Post by: Dwachs on September 15, 2013, 01:34:18 PM
Thank you! Nice catch! Incorporated in r6719.