Netmessage cleanup
This commit is contained in:
parent
bbf100a5c7
commit
6a40e771af
@ -8,7 +8,7 @@ namespace NetHandlers
|
||||
|
||||
bool Net_SetConVar_BitRead_Internal(bf_read& bitbuf, SourceGameContext& context, NetMsg::Net_SetConVar* data)
|
||||
{
|
||||
data->cvars.resize(bitbuf.ReadUBitLong(8));
|
||||
data->cvars.resize(bitbuf.ReadByte());
|
||||
for (cvar_t& cvar : data->cvars)
|
||||
{
|
||||
bitbuf.ReadString(cvar.name, sizeof(cvar.name));
|
||||
@ -19,7 +19,7 @@ namespace NetHandlers
|
||||
|
||||
bool Net_SetConVar_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::Net_SetConVar* data)
|
||||
{
|
||||
bitbuf.WriteUBitLong(data->cvars.size(), 8);
|
||||
bitbuf.WriteByte(data->cvars.size());
|
||||
for (cvar_t& cvar : data->cvars)
|
||||
{
|
||||
bitbuf.WriteString(cvar.name);
|
||||
|
@ -6,16 +6,16 @@ namespace NetHandlers
|
||||
{
|
||||
bool Net_SignonState_BitRead_Internal(bf_read& bitbuf, SourceGameContext& context, NetMsg::Net_SignonState* data)
|
||||
{
|
||||
data->signonState = bitbuf.ReadUBitLong(8);
|
||||
data->spawnCount = bitbuf.ReadUBitLong(32);
|
||||
data->signonState = bitbuf.ReadByte();
|
||||
data->spawnCount = bitbuf.ReadLong();
|
||||
//assert(signonState >= SIGNONSTATE_NONE && signonState <= SIGNONSTATE_CHANGELEVEL);
|
||||
return !bitbuf.IsOverflowed();
|
||||
}
|
||||
|
||||
bool Net_SignonState_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::Net_SignonState* data)
|
||||
{
|
||||
bitbuf.WriteUBitLong(data->signonState, 8);
|
||||
bitbuf.WriteUBitLong(data->spawnCount, 32);
|
||||
bitbuf.WriteByte(data->signonState);
|
||||
bitbuf.WriteLong(data->spawnCount);
|
||||
return !bitbuf.IsOverflowed();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user