MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / SaveForNetwork

Method SaveForNetwork

src/openrct2/network/NetworkBase.cpp:1510–1524  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1508 }
1509
1510 std::vector<uint8_t> NetworkBase::SaveForNetwork(const std::vector<const ObjectRepositoryItem*>& objects) const
1511 {
1512 std::vector<uint8_t> result;
1513 auto ms = MemoryStream();
1514 if (SaveMap(&ms, objects))
1515 {
1516 result.resize(ms.GetLength());
1517 std::memcpy(result.data(), ms.GetData(), result.size());
1518 }
1519 else
1520 {
1521 LOG_WARNING("Failed to export map.");
1522 }
1523 return result;
1524 }
1525
1526 void NetworkBase::Client_Send_CHAT(const char* text)
1527 {

Callers

nothing calls this directly

Calls 5

MemoryStreamClass · 0.85
GetLengthMethod · 0.45
dataMethod · 0.45
GetDataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected