Check Bankruptcy Before Infrastructure Costs patch

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
xarick
Transport Coordinator
Transport Coordinator
Posts: 341
Joined: 26 Feb 2015 00:52

Check Bankruptcy Before Infrastructure Costs patch

Post by xarick »

This patch is aimed to prevent very profitable AIs from triggering a bankrupt warning, due to working very close to the loan limit right before entering the new month.

The monthly calculation for infrastructure costs was being done before doing the bankruptcy check. This patch swaps the checking order so that the infrastrucure costs are done after the bankruptcy check. This will avoid many false AI bankrupts.

There is, of course, an impact for human controlled companies as well, but I'm not too sure yet if it's going to adversedly impact competitive games.
Attachments
Check Bankruptcy Before Infrastructure Costs v1 r27657.patch
(924 Bytes) Downloaded 117 times
Formerly known as Samu
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 27 guests