i found this bug when i was building canals...
i have made an animated gif to put all the screenshots in one image
canal bug - easy money
Moderator: OpenTTD Developers
canal bug - easy money
- Attachments
-
- canals-bug.gif (79.04 KiB) Viewed 2220 times
-
- Tycoon
- Posts: 14275
- Joined: 09 Jan 2003 08:37
I don't exactly know how to fix this bug, but I have found the problem. The problem is that with a peninsula like that, the upper tiles of the lock overlap eachother. On a dry run everything goes well because there is nothing built, so execution is started.
Lock 1 is built. When in DC_EXEC Lock2 is trying to build, it obviously cannot, and returns CMD_ERROR. CMD_ERROR is not caught in DC_EXEC (only with assert), and thus if you ignore it, you get the amoun of money that is CMD_ERROR.
The solution would be to first build lock1, and only after it is built checking lock2, and if possible building it. So not checking both in advance.
Lock 1 is built. When in DC_EXEC Lock2 is trying to build, it obviously cannot, and returns CMD_ERROR. CMD_ERROR is not caught in DC_EXEC (only with assert), and thus if you ignore it, you get the amoun of money that is CMD_ERROR.
The solution would be to first build lock1, and only after it is built checking lock2, and if possible building it. So not checking both in advance.
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
Who is online
Users browsing this forum: Ahrefs [Bot], Amazon [Bot] and 10 guests