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

Method OnReceiveContentInfo

src/bootstrap_gui.cpp:323–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321 }
322
323 void OnReceiveContentInfo(const ContentInfo &ci) override
324 {
325 if (this->downloading) return;
326
327 /* And once the metadata is received, start downloading it. */
328 _network_content_client.Select(ci.id);
329 _network_content_client.DownloadSelectedContent(this->total_files, this->total_bytes);
330 this->downloading = true;
331
332 EM_ASM({ if (window["openttd_bootstrap"]) openttd_bootstrap($0, $1); }, this->downloaded_bytes, this->total_bytes);
333 }
334
335 void OnDownloadProgress(const ContentInfo &, int bytes) override
336 {

Callers

nothing calls this directly

Calls 2

SelectMethod · 0.80

Tested by

no test coverage detected