2015-05-15 03:36:57 +02:00
|
|
|
|
|
|
|
#include "net_setconvar.h"
|
2015-06-25 05:59:39 +02:00
|
|
|
#include "base/bitfile.h"
|
2015-05-15 03:36:57 +02:00
|
|
|
|
|
|
|
namespace NetHandlers
|
|
|
|
{
|
|
|
|
using cvar_t = NetMsg::Net_SetConVar::cvar_t;
|
|
|
|
|
2015-06-19 02:23:26 +02:00
|
|
|
bool Net_SetConVar_BitRead_Internal(BitRead& bitbuf, SourceGameContext& context, NetMsg::Net_SetConVar* data)
|
2015-05-15 03:36:57 +02:00
|
|
|
{
|
2015-05-28 04:51:30 +02:00
|
|
|
data->cvars.resize(bitbuf.ReadByte());
|
2015-05-15 03:36:57 +02:00
|
|
|
for (cvar_t& cvar : data->cvars)
|
|
|
|
{
|
|
|
|
bitbuf.ReadString(cvar.name, sizeof(cvar.name));
|
|
|
|
bitbuf.ReadString(cvar.value, sizeof(cvar.value));
|
2021-05-01 18:38:37 +02:00
|
|
|
//printf("%s -> %s\n", cvar.name, cvar.value);
|
2015-05-15 03:36:57 +02:00
|
|
|
}
|
|
|
|
return !bitbuf.IsOverflowed();
|
|
|
|
}
|
|
|
|
}
|