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

Method OnConnect

src/bootstrap_gui.cpp:262–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260 }
261
262 void OnConnect(bool success) override
263 {
264 if (!success) {
265 UserError("Failed to connect to content server. Please acquire a graphics set for OpenTTD. See section 1.4 of README.md.");
266 /* _exit_game is used to break out of the outer video driver's MainLoop. */
267 _exit_game = true;
268 this->Close();
269 return;
270 }
271
272 /* Once connected, request the metadata. */
273 _network_content_client.RequestContentList(CONTENT_TYPE_BASE_GRAPHICS);
274 }
275
276 void OnReceiveContentInfo(const ContentInfo &ci) override
277 {

Callers

nothing calls this directly

Calls 2

CloseMethod · 0.95
RequestContentListMethod · 0.80

Tested by

no test coverage detected