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

Method sendChatMessage

src/OpenLoco/src/Network/NetworkClient.cpp:324–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322}
323
324void NetworkClient::sendChatMessage(std::string_view message)
325{
326 if (_serverConnection != nullptr)
327 {
328 SendChatMessage packet;
329 packet.length = static_cast<uint16_t>(message.size() + 1);
330 std::memcpy(packet.text, message.data(), message.size());
331 _serverConnection->sendPacket(packet);
332 }
333}
334
335void NetworkClient::sendGameCommand(CompanyId company, const OpenLoco::GameCommands::registers& regs)
336{

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
dataMethod · 0.45
sendPacketMethod · 0.45

Tested by

no test coverage detected