News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

Player receives money by building railway signals

Started by eipi, September 15, 2013, 12:23:33 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

eipi

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.

Dwachs

Parsley, sage, rosemary, and maggikraut.