45 void *
operator new(
size_t nSize) {
46 return PoolMemAlloc(
static_cast<int>(nSize),
"StartGamePkt", 0);
54 void operator delete(
void *pBlock) {
82 return "StartGamePkt";
Stream of raw bytes, the base of the memory, file, and network streams.
Definition binstream.h:22
InternalPacket(unsigned char nFlags=0, int nReceiver=kUnset)
Construct a packet from an unset sender.
Definition internalpacket.h:33
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
static constexpr unsigned char kFlagGuaranteed
Bit of mFlags that NetTransport::Send() turns into its guaranteed delivery bit.
Definition packet.h:28
static constexpr int kAllPeers
Value of mReceiver that addresses every peer.
Definition packet.h:19
Text output stream.
Definition prnstream.h:16
Message * Clone() override
Produce a heap copy of this packet.
Definition startgamepkt.h:63
void restoreGuts(BinStream &stream) override
Read the time and the seed.
const char * GetName() const override
Report this packet's class name.
Definition startgamepkt.h:81
static Message * New()
Produce a default-constructed packet on the heap.
float GetTime() const
Definition startgamepkt.h:123
void SetTime(float fTime)
Definition startgamepkt.h:128
void SetSeed(int nSeed)
Definition startgamepkt.h:118
void PrintExtra(PrnStream &stream) const override
Write the sender, the receiver, the time, and the seed.
StartGamePkt()
Construct a packet for every peer with no time and no seed.
Definition startgamepkt.h:27
int GetSeed() const
Definition startgamepkt.h:113
void saveGuts(BinStream &stream) const override
Write the time and the seed.
int Type() override
Report this packet's registered identity.
Definition startgamepkt.h:72
void * PoolMemAlloc(int nSize, const char *pszTag, int nAlign)
Allocate a block from the pool heaps and bill it to a tag.
void PoolMemFree(void *pBlock)
Return a block PoolMemAlloc() handed out to the pool heap that owns it.
int g_nStartGamePktType
Identity that StartGamePkt::Type() reports.