NetworkCompanyIsPassworded should return false in single player mode

This commit is contained in:
Jonathan G Rennison
2022-11-17 00:42:34 +00:00
parent 1e769d050f
commit e92aaade42

View File

@@ -231,7 +231,7 @@ std::string GenerateCompanyPasswordHash(const std::string &password, const std::
*/
bool NetworkCompanyIsPassworded(CompanyID company_id)
{
return company_id < MAX_COMPANIES && HasBit(_network_company_passworded, company_id);
return _networking && company_id < MAX_COMPANIES && HasBit(_network_company_passworded, company_id);
}
/* This puts a text-message to the console, or in the future, the chat-box,