* Send a command to the client to execute. * @param cp The command to send. */
| 656 | * @param cp The command to send. |
| 657 | */ |
| 658 | NetworkRecvStatus ServerNetworkGameSocketHandler::SendCommand(const CommandPacket &cp) |
| 659 | { |
| 660 | Debug(net, 9, "client[{}] SendCommand(): cmd={}", this->client_id, cp.cmd); |
| 661 | |
| 662 | auto p = std::make_unique<Packet>(this, PACKET_SERVER_COMMAND); |
| 663 | |
| 664 | this->NetworkGameSocketHandler::SendCommand(*p, cp); |
| 665 | p->Send_uint32(cp.frame); |
| 666 | p->Send_bool (cp.my_cmd); |
| 667 | |
| 668 | this->SendPacket(std::move(p)); |
| 669 | return NETWORK_RECV_STATUS_OKAY; |
| 670 | } |
| 671 | |
| 672 | /** |
| 673 | * Send a chat message. |
no test coverage detected