MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / NetworkCanJoinCompany

Function NetworkCanJoinCompany

src/network/network.cpp:143–147  ·  view source on GitHub ↗

* Returns whether the given company can be joined by this client. * @param company_id The id of the company. * @return \c true when this company is allowed to join, otherwise \c false. */

Source from the content-addressed store, hash-verified

141 * @return \c true when this company is allowed to join, otherwise \c false.
142 */
143bool NetworkCanJoinCompany(CompanyID company_id)
144{
145 NetworkClientInfo *info = NetworkClientInfo::GetByClientID(_network_own_client_id);
146 return info != nullptr && info->CanJoinCompany(company_id);
147}
148
149/**
150 * Return the client state given it's client-identifier

Callers 2

OnPaintMethod · 0.85

Calls 1

CanJoinCompanyMethod · 0.80

Tested by

no test coverage detected