MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / processFullState

Method processFullState

src/OpenLoco/src/Network/NetworkClient.cpp:262–271  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260}
261
262void NetworkClient::processFullState(std::span<uint8_t const> fullData)
263{
264 auto* extra = reinterpret_cast<const ExtraState*>(fullData.data() + fullData.size() - sizeof(ExtraState));
265 _localGameCommandIndex = extra->gameCommandIndex;
266 _localTick = extra->tick;
267 updateLocalTick();
268
269 BinaryStream bs(fullData.data(), fullData.size() - sizeof(ExtraState));
270 S5::importSaveToGameState(bs, S5::LoadFlags::none);
271}
272
273void NetworkClient::receiveChatMessagePacket(const ReceiveChatMessage& packet)
274{

Callers

nothing calls this directly

Calls 3

importSaveToGameStateFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected