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

Method OnClickCompanyJoin

src/network/network_gui.cpp:1570–1578  ·  view source on GitHub ↗

* Join button on a Company is clicked. * @param w The instance of this window. * @param pt The point where this button was clicked. * @param company_id The company this button was assigned to. */

Source from the content-addressed store, hash-verified

1568 * @param company_id The company this button was assigned to.
1569 */
1570 static void OnClickCompanyJoin([[maybe_unused]] NetworkClientListWindow *w, [[maybe_unused]] Point pt, CompanyID company_id)
1571 {
1572 if (_network_server) {
1573 NetworkServerDoMove(CLIENT_ID_SERVER, company_id);
1574 MarkWholeScreenDirty();
1575 } else {
1576 NetworkClientRequestMove(company_id);
1577 }
1578 }
1579
1580 /**
1581 * Create new company button is clicked.

Callers

nothing calls this directly

Calls 3

NetworkServerDoMoveFunction · 0.85
MarkWholeScreenDirtyFunction · 0.85
NetworkClientRequestMoveFunction · 0.85

Tested by

no test coverage detected