(svn r16559) -Codechange: introduce Company::IsValidAiID() and Company::IsValidHumanID(), don't use IsHumanCompany() where possible

This commit is contained in:
smatz
2009-06-10 22:05:01 +00:00
parent bc7e9514d2
commit bea3fe2b8b
14 changed files with 47 additions and 38 deletions

View File

@@ -990,7 +990,7 @@ static char *FormatString(char *buff, const char *str, int64 *argv, uint casei,
CompanyID company = (CompanyID)GetInt32(&argv);
/* Nothing is added for AI or inactive companies */
if (Company::IsValidID(company) && IsHumanCompany(company)) {
if (!Company::IsValidHumanID(company)) {
int64 args[1];
args[0] = company + 1;
buff = GetStringWithArgs(buff, STR_COMPANY_NUM, args, last);