| 172 | } |
| 173 | |
| 174 | void 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 | |
| 182 | void ClientData::scale_up_step(const NetworkingObjects::NetObjTemporaryPtr<ClientData>& o, World& world) { |
| 183 | o->gridSize++; |
nothing calls this directly
no test coverage detected