MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / SendMove

Method SendMove

src/network/network_server.cpp:798–808  ·  view source on GitHub ↗

* Tell that a client moved to another company. * @param client_id The client that moved. * @param company_id The company the client moved to. */

Source from the content-addressed store, hash-verified

796 * @param company_id The company the client moved to.
797 */
798NetworkRecvStatus ServerNetworkGameSocketHandler::SendMove(ClientID client_id, CompanyID company_id)
799{
800 Debug(net, 9, "client[{}] SendMove(): client_id={}", this->client_id, client_id);
801
802 auto p = std::make_unique<Packet>(this, PACKET_SERVER_MOVE);
803
804 p->Send_uint32(client_id);
805 p->Send_uint8(company_id);
806 this->SendPacket(std::move(p));
807 return NETWORK_RECV_STATUS_OKAY;
808}
809
810/** Send an update about the max company/spectator counts. */
811NetworkRecvStatus ServerNetworkGameSocketHandler::SendConfigUpdate()

Callers 1

NetworkServerDoMoveFunction · 0.45

Calls 3

Send_uint32Method · 0.80
Send_uint8Method · 0.45
SendPacketMethod · 0.45

Tested by

no test coverage detected