The International Simutrans Forum

Simutrans Extended => Simutrans-Extended bug reports => Simutrans-Extended development => Simutrans-Extended closed bug reports => Topic started by: ӔO on August 29, 2013, 02:00:50 AM

Title: [11.9] Under certain conditions, building tunnels will pay money
Post by: ӔO on August 29, 2013, 02:00:50 AM
Fairly simple to reproduce.

1. make a really long and flat map, say 2048x16.
2. dig down short edges so that a tunnel can be built
3. build the more expensive maglev tunnel from end to end
4. You should now have positive income equal to the build cost of that tunnel

Destroying the tunnel will deduct a lot more than usual.

I haven't noticed it with other tunnels, so I think it might be some kind of integer overflow.
Title: Re: [11.9] Under certain conditions, building tunnels will pay money
Post by: jamespetts on August 29, 2013, 10:08:00 AM
I think that it is probably an integer overflow, too. Is this situation ever likely to arise in a real game...?
Title: Re: [11.9] Under certain conditions, building tunnels will pay money
Post by: ӔO on August 29, 2013, 11:53:33 AM
it is exploitable, to an extent.

The amount of interest earned off of the profits is roughly 1/10 of the maintenance of the tunnel, so it can take a while for all the money to be drained.
The best use I can think of is paying for a small construction project with a separate company, so that it's free to an existing company.
Title: Re: [11.9] Under certain conditions, building tunnels will pay money
Post by: Vladki on August 29, 2013, 03:23:53 PM
Very similar bug used to be in TTD - building a bridge across the map earned you a huge amount of money :)
Title: Re: [11.9] Under certain conditions, building tunnels will pay money
Post by: jamespetts on September 01, 2013, 03:36:57 PM
Found and fixed on the 11.x branch.