Fixed errors with SendConVarValue on CS:GO (bug 5638, r=asherkin).
This commit is contained in:
parent
b46f2d1527
commit
e487007960
@ -1437,10 +1437,13 @@ static cell_t SendConVarValue(IPluginContext *pContext, const cell_t *params)
|
||||
|
||||
cvar->set_name(pConVar->GetName());
|
||||
cvar->set_value(value);
|
||||
|
||||
int msgsize = msg.ByteSize();
|
||||
|
||||
buffer.WriteVarInt32(net_SetConVar);
|
||||
buffer.WriteVarInt32(msg.ByteSize());
|
||||
buffer.WriteVarInt32(msgsize);
|
||||
msg.SerializeWithCachedSizesToArray( (uint8 *)( buffer.GetBasePointer() + buffer.GetNumBytesWritten() ) );
|
||||
buffer.SeekToBit( ( buffer.GetNumBytesWritten() + msgsize ) * 8 );
|
||||
#else
|
||||
buffer.WriteUBitLong(NET_SETCONVAR, NETMSG_BITS);
|
||||
buffer.WriteByte(1);
|
||||
|
Loading…
Reference in New Issue
Block a user