resonance 1.0.1
Loading...
Searching...
No Matches
scallplayersinfopacket.h
Go to the documentation of this file.
1#pragma once
2
3#include <iostream>
4#include <vector>
5
7
8class IBStream;
9class OBStream;
10
26public:
34 int mPid;
41 std::vector<int> mTracks;
42 };
43
54 static Message *New();
55
63 virtual Message *Clone();
64
72 virtual int Type();
73
81 virtual const char *GetName() const;
82
91 virtual void PrintExtra(std::ostream &stream) const;
92
101 virtual void saveGuts(OBStream &stream) const;
102
111 virtual void restoreGuts(IBStream &stream);
112
122 void AddPlayerInfo(const PlayerInfoEntry &entry);
123
124private:
125 std::vector<PlayerInfoEntry> mPlayers; // +0x14
126};
127
Input half of the byte stream interface.
Definition ibstream.h:36
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:41
Output half of the byte stream interface.
Definition obstream.h:25
Network packet the game sends between game systems.
Definition scallplayersinfopacket.h:25
virtual void restoreGuts(IBStream &stream)
Read the fields back in the order saveGuts() wrote them, resizing both levels of vector to the counts...
virtual void saveGuts(OBStream &stream) const
Write the Packet words, the entry count, and for every entry its two words, its track count,...
virtual void PrintExtra(std::ostream &stream) const
Write every entry to a diagnostic stream as pid:, the identifier, tracks:, the track numbers in par...
static Message * New()
Produce a packet with no entries on the heap.
void AddPlayerInfo(const PlayerInfoEntry &entry)
Append a copy of one entry.
virtual const char * GetName() const
Report this packet's class name.
virtual int Type()
Report this packet's registered identity.
virtual Message * Clone()
Produce a heap copy of this packet.
ToAllOtherNetManagersPacket()
Route the packet with the pair 2 and 0.
Definition toallothernetmanagerspacket.h:21
int g_nSCAllPlayersInfoPacketType
Identity that SCAllPlayersInfoPacket::Type() reports.
One player's entry, from the 0x14-byte stride the copy constructor divides by.
Definition scallplayersinfopacket.h:33
int mClientId
Transferred but not printed.
Definition scallplayersinfopacket.h:40
std::vector< int > mTracks
Definition scallplayersinfopacket.h:41
int mPid
Definition scallplayersinfopacket.h:34