2015-05-15 03:36:57 +02:00
|
|
|
|
|
|
|
#include "svc_print.h"
|
2015-06-14 22:15:08 +02:00
|
|
|
#include "sourcesdk/bitbuf.h"
|
2015-05-15 03:36:57 +02:00
|
|
|
|
|
|
|
namespace NetHandlers
|
|
|
|
{
|
|
|
|
bool SVC_Print_BitRead_Internal(bf_read& bitbuf, SourceGameContext& context, NetMsg::SVC_Print* data)
|
|
|
|
{
|
|
|
|
bitbuf.ReadString(data->text, sizeof(data->text));
|
|
|
|
return !bitbuf.IsOverflowed();
|
|
|
|
}
|
|
|
|
|
2015-05-15 08:49:51 +02:00
|
|
|
bool SVC_Print_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::SVC_Print* data)
|
2015-05-15 03:36:57 +02:00
|
|
|
{
|
|
|
|
bitbuf.WriteString(data->text);
|
|
|
|
return !bitbuf.IsOverflowed();
|
|
|
|
}
|
|
|
|
|
|
|
|
bool SVC_Print_JsonRead_Internal(JsonRead& jsonbuf, SourceGameContext& context, NetMsg::SVC_Print* data)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-05-15 08:49:51 +02:00
|
|
|
bool SVC_Print_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::SVC_Print* data)
|
2015-05-15 03:36:57 +02:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SVC_Print_ToString_Internal(std::ostringstream& out, NetMsg::SVC_Print* data)
|
|
|
|
{
|
|
|
|
out << "svc_Print: \"" << data->text << '"';
|
|
|
|
}
|
|
|
|
}
|