Loading

Bankrupt before Infrastru

  1. Index: src/economy.cpp
  2. ===================================================================
  3. --- src/economy.cpp (revision 27657)
  4. +++ src/economy.cpp (working copy)
  5. @@ -654,10 +654,17 @@
  6.   */
  7.  static void CompaniesGenStatistics()
  8.  {
  9. +   Company *c;
  10. +
  11. +   /* Check for bankruptcy each month before infrastructure
  12. +    * costs to prevent false bankrupts for AIs. */
  13. +   FOR_ALL_COMPANIES(c) {
  14. +       CompanyCheckBankrupt(c);
  15. +   }
  16. +
  17.     Station *st;
  18.  
  19.     Backup<CompanyByte> cur_company(_current_company, FILE_LINE);
  20. -   Company *c;
  21.  
  22.     if (!_settings_game.economy.infrastructure_maintenance) {
  23.         FOR_ALL_STATIONS(st) {
  24. @@ -688,11 +695,6 @@
  25.     }
  26.     cur_company.Restore();
  27.  
  28. -   /* Check for bankruptcy each month */
  29. -   FOR_ALL_COMPANIES(c) {
  30. -       CompanyCheckBankrupt(c);
  31. -   }
  32. -
  33.     /* Only run the economic statics and update company stats every 3rd month (1st of quarter). */
  34.     if (!HasBit(1 << 0 | 1 << 3 | 1 << 6 | 1 << 9, _cur_month)) return;

Comments