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

Method DownloadContentInfo

src/network/network_content.cpp:792–800  ·  view source on GitHub ↗

* Download information of a given Content ID if not already tried * @param cid the ID to try */

Source from the content-addressed store, hash-verified

790 * @param cid the ID to try
791 */
792void ClientNetworkContentSocketHandler::DownloadContentInfo(ContentID cid)
793{
794 /* When we tried to download it already, don't try again */
795 if (std::ranges::find(this->requested, cid) != this->requested.end()) return;
796
797 this->requested.push_back(cid);
798 this->queued.push_back(cid);
799 _request_queue_timeout.Reset();
800}
801
802/**
803 * Send a content request for queued content info download.

Callers 1

CheckDependencyStateMethod · 0.95

Calls 4

push_backMethod · 0.80
findFunction · 0.50
endMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected