MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / send_chat_message

Method send_chat_message

src/ClientData.cpp:174–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174void ClientData::send_chat_message(const NetworkingObjects::NetObjTemporaryPtr<ClientData>& o, World& world, const std::string& chatMessage) {
175 if(o.get_obj_man()->is_server()) // Clients will receive the message when it returns from the server to ensure correct order
176 world.add_chat_message(o->displayName, chatMessage, Toolbar::ChatMessage::Type::NORMAL);
177 o.send_update_to_all(RELIABLE_COMMAND_CHANNEL, [&chatMessage](const NetObjTemporaryPtr<ClientData>& o, cereal::PortableBinaryOutputArchive & a) {
178 a(ClientDataCommand::SEND_CHAT_MESSAGE, chatMessage);
179 });
180}
181
182void ClientData::scale_up_step(const NetworkingObjects::NetObjTemporaryPtr<ClientData>& o, World& world) {
183 o->gridSize++;

Callers

nothing calls this directly

Calls 4

is_serverMethod · 0.80
add_chat_messageMethod · 0.80
get_obj_manMethod · 0.45
send_update_to_allMethod · 0.45

Tested by

no test coverage detected