2015-05-15 03:36:57 +02:00
|
|
|
|
|
|
|
#include "svc_prefetch.h"
|
2015-06-25 05:59:39 +02:00
|
|
|
#include "base/bitfile.h"
|
2016-04-28 04:31:33 +02:00
|
|
|
#include "game/sourcecontext.h"
|
2015-05-15 03:36:57 +02:00
|
|
|
#include "netcontants.h"
|
|
|
|
|
|
|
|
namespace NetHandlers
|
|
|
|
{
|
2015-06-19 02:23:26 +02:00
|
|
|
bool SVC_Prefetch_BitRead_Internal(BitRead& bitbuf, SourceGameContext& context, NetMsg::SVC_Prefetch* data)
|
2015-05-15 03:36:57 +02:00
|
|
|
{
|
|
|
|
data->type = NetMsg::SVC_Prefetch::SOUND;
|
2015-05-15 07:24:24 +02:00
|
|
|
if (context.protocol > 23)
|
|
|
|
{
|
|
|
|
data->soundIndex = bitbuf.ReadUBitLong(MAX_SOUND_INDEX_BITS);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
data->soundIndex = bitbuf.ReadUBitLong(MAX_SOUND_INDEX_BITS_OLD);
|
|
|
|
}
|
2015-05-15 03:36:57 +02:00
|
|
|
return !bitbuf.IsOverflowed();
|
|
|
|
}
|
|
|
|
}
|