OpenTTD Source 20250312-master-gcdcc6b491d
CommandPacket Struct Reference

Everything we need to know about a command to be able to execute it. More...

#include <network_internal.h>

Data Fields

CompanyID company = CompanyID::Invalid()
 company that is executing the command
 
uint32_t frame = 0
 the frame in which this packet is executed
 
bool my_cmd = false
 did the command originate from "me"
 
Commands cmd {}
 command being executed.
 
StringID err_msg {}
 string ID of error message to use.
 
CommandCallbackcallback = nullptr
 any callback function executed upon successful completion of the command.
 
CommandDataBuffer data {}
 command parameters.
 

Detailed Description

Everything we need to know about a command to be able to execute it.

Definition at line 95 of file network_internal.h.

Field Documentation

◆ callback

CommandCallback* CommandPacket::callback = nullptr

any callback function executed upon successful completion of the command.

Definition at line 102 of file network_internal.h.

Referenced by DistributeCommandPacket(), NetworkSendCommand(), NetworkSyncCommandQueue(), NetworkGameSocketHandler::ReceiveCommand(), and NetworkGameSocketHandler::SendCommand().

◆ cmd

◆ company

◆ data

◆ err_msg

StringID CommandPacket::err_msg {}

◆ frame

◆ my_cmd

bool CommandPacket::my_cmd = false

The documentation for this struct was generated from the following file: