Fix assert failure in DoStartupNewCompany when called from AfterLoadGame

This commit is contained in:
Jonathan G Rennison
2020-12-29 20:52:53 +00:00
parent e8d811d472
commit 5721790c5d
4 changed files with 22 additions and 10 deletions

View File

@@ -60,4 +60,16 @@ int CompanyServiceInterval(const Company *c, VehicleType type);
CompanyID GetDefaultLocalCompany();
/**
* List of flags for DoStartupNewCompany.
*/
enum DoStartupNewCompanyFlag {
DSNC_NONE = 0x000, ///< no flag is set
DSNC_AI = 0x001, ///< start an AI company
DSNC_DURING_LOAD = 0x002, ///< the save is currently being loaded, do not perform operations which require that loading has completed
};
DECLARE_ENUM_AS_BIT_SET(DoStartupNewCompanyFlag)
Company *DoStartupNewCompany(DoStartupNewCompanyFlag flags, CompanyID company = INVALID_COMPANY);
#endif /* COMPANY_FUNC_H */