From 3d80d17a99463a73674c3a7519e2d00fd678c7fe Mon Sep 17 00:00:00 2001 From: Jordan Cristiano Date: Fri, 15 May 2015 02:49:51 -0400 Subject: [PATCH] Made NetHandler Write functions take a const SourceGameContext --- demboyz/netmessages/net_disconnect.cpp | 4 ++-- demboyz/netmessages/net_file.cpp | 4 ++-- demboyz/netmessages/net_nop.cpp | 4 ++-- demboyz/netmessages/net_setconvar.cpp | 4 ++-- demboyz/netmessages/net_signonstate.cpp | 4 ++-- demboyz/netmessages/net_stringcmd.cpp | 4 ++-- demboyz/netmessages/net_tick.cpp | 4 ++-- demboyz/netmessages/nethandlers.cpp | 8 ++++---- demboyz/netmessages/nethandlers.h | 12 ++++++------ demboyz/netmessages/svc_bspdecal.cpp | 4 ++-- demboyz/netmessages/svc_classinfo.cpp | 4 ++-- demboyz/netmessages/svc_createstringtable.cpp | 4 ++-- demboyz/netmessages/svc_crosshairangle.cpp | 4 ++-- demboyz/netmessages/svc_entitymessage.cpp | 4 ++-- demboyz/netmessages/svc_fixangle.cpp | 4 ++-- demboyz/netmessages/svc_gameevent.cpp | 4 ++-- demboyz/netmessages/svc_gameeventlist.cpp | 4 ++-- demboyz/netmessages/svc_getcvarvalue.cpp | 4 ++-- demboyz/netmessages/svc_hltv.cpp | 4 ++-- demboyz/netmessages/svc_menu.cpp | 4 ++-- demboyz/netmessages/svc_packetentities.cpp | 4 ++-- demboyz/netmessages/svc_prefetch.cpp | 4 ++-- demboyz/netmessages/svc_print.cpp | 4 ++-- demboyz/netmessages/svc_sendtable.cpp | 4 ++-- demboyz/netmessages/svc_serverinfo.cpp | 4 ++-- demboyz/netmessages/svc_setpause.cpp | 4 ++-- demboyz/netmessages/svc_setview.cpp | 4 ++-- demboyz/netmessages/svc_sounds.cpp | 4 ++-- demboyz/netmessages/svc_tempentities.cpp | 4 ++-- demboyz/netmessages/svc_terrainmod.cpp | 4 ++-- demboyz/netmessages/svc_updatestringtable.cpp | 4 ++-- demboyz/netmessages/svc_usermessage.cpp | 4 ++-- demboyz/netmessages/svc_voicedata.cpp | 4 ++-- demboyz/netmessages/svc_voiceinit.cpp | 4 ++-- 34 files changed, 74 insertions(+), 74 deletions(-) diff --git a/demboyz/netmessages/net_disconnect.cpp b/demboyz/netmessages/net_disconnect.cpp index 3a0cd0a..cc38580 100644 --- a/demboyz/netmessages/net_disconnect.cpp +++ b/demboyz/netmessages/net_disconnect.cpp @@ -10,7 +10,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool Net_Disconnect_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::Net_Disconnect* data) + bool Net_Disconnect_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::Net_Disconnect* data) { bitbuf.WriteString(data->message); return !bitbuf.IsOverflowed(); @@ -21,7 +21,7 @@ namespace NetHandlers return true; } - bool Net_Disconnect_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::Net_Disconnect* data) + bool Net_Disconnect_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::Net_Disconnect* data) { return true; } diff --git a/demboyz/netmessages/net_file.cpp b/demboyz/netmessages/net_file.cpp index dd5980f..06e9a23 100644 --- a/demboyz/netmessages/net_file.cpp +++ b/demboyz/netmessages/net_file.cpp @@ -12,7 +12,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool Net_File_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::Net_File* data) + bool Net_File_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::Net_File* data) { bitbuf.WriteUBitLong(data->transferID, 32); bitbuf.WriteString(data->filename); @@ -25,7 +25,7 @@ namespace NetHandlers return true; } - bool Net_File_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::Net_File* data) + bool Net_File_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::Net_File* data) { return true; } diff --git a/demboyz/netmessages/net_nop.cpp b/demboyz/netmessages/net_nop.cpp index 38c7dc1..6c1feb7 100644 --- a/demboyz/netmessages/net_nop.cpp +++ b/demboyz/netmessages/net_nop.cpp @@ -8,7 +8,7 @@ namespace NetHandlers return true; } - bool Net_NOP_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::Net_NOP* data) + bool Net_NOP_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::Net_NOP* data) { return true; } @@ -18,7 +18,7 @@ namespace NetHandlers return true; } - bool Net_NOP_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::Net_NOP* data) + bool Net_NOP_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::Net_NOP* data) { return true; } diff --git a/demboyz/netmessages/net_setconvar.cpp b/demboyz/netmessages/net_setconvar.cpp index 8c4e8af..8a61ac3 100644 --- a/demboyz/netmessages/net_setconvar.cpp +++ b/demboyz/netmessages/net_setconvar.cpp @@ -17,7 +17,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool Net_SetConVar_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::Net_SetConVar* data) + bool Net_SetConVar_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::Net_SetConVar* data) { bitbuf.WriteUBitLong(data->cvars.size(), 8); for (cvar_t& cvar : data->cvars) @@ -33,7 +33,7 @@ namespace NetHandlers return true; } - bool Net_SetConVar_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::Net_SetConVar* data) + bool Net_SetConVar_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::Net_SetConVar* data) { return true; } diff --git a/demboyz/netmessages/net_signonstate.cpp b/demboyz/netmessages/net_signonstate.cpp index 32599d8..d534b97 100644 --- a/demboyz/netmessages/net_signonstate.cpp +++ b/demboyz/netmessages/net_signonstate.cpp @@ -12,7 +12,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool Net_SignonState_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::Net_SignonState* data) + 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); @@ -24,7 +24,7 @@ namespace NetHandlers return true; } - bool Net_SignonState_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::Net_SignonState* data) + bool Net_SignonState_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::Net_SignonState* data) { return true; } diff --git a/demboyz/netmessages/net_stringcmd.cpp b/demboyz/netmessages/net_stringcmd.cpp index e29bfd0..01d5bd9 100644 --- a/demboyz/netmessages/net_stringcmd.cpp +++ b/demboyz/netmessages/net_stringcmd.cpp @@ -10,7 +10,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool Net_StringCmd_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::Net_StringCmd* data) + bool Net_StringCmd_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::Net_StringCmd* data) { bitbuf.WriteString(data->command); return !bitbuf.IsOverflowed(); @@ -21,7 +21,7 @@ namespace NetHandlers return true; } - bool Net_StringCmd_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::Net_StringCmd* data) + bool Net_StringCmd_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::Net_StringCmd* data) { return true; } diff --git a/demboyz/netmessages/net_tick.cpp b/demboyz/netmessages/net_tick.cpp index 63ed07a..e4559fc 100644 --- a/demboyz/netmessages/net_tick.cpp +++ b/demboyz/netmessages/net_tick.cpp @@ -12,7 +12,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool Net_Tick_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::Net_Tick* data) + bool Net_Tick_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::Net_Tick* data) { bitbuf.WriteUBitLong(data->tick, 32); bitbuf.WriteUBitLong(data->hostFrameTime, 16); @@ -25,7 +25,7 @@ namespace NetHandlers return true; } - bool Net_Tick_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::Net_Tick* data) + bool Net_Tick_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::Net_Tick* data) { return true; } diff --git a/demboyz/netmessages/nethandlers.cpp b/demboyz/netmessages/nethandlers.cpp index 60b9e8c..57eea8d 100644 --- a/demboyz/netmessages/nethandlers.cpp +++ b/demboyz/netmessages/nethandlers.cpp @@ -41,9 +41,9 @@ } typedef bool (*NetMsgBitReadFn)(bf_read& bitbuf, SourceGameContext& context, void* data); -typedef bool (*NetMsgBitWriteFn)(bf_write& bitbuf, SourceGameContext& context, void* data); +typedef bool (*NetMsgBitWriteFn)(bf_write& bitbuf, const SourceGameContext& context, void* data); typedef bool (*NetMsgJsonReadFn)(JsonRead& bitbuf, SourceGameContext& context, void* data); -typedef bool (*NetMsgJsonWriteFn)(JsonWrite& bitbuf, SourceGameContext& context, void* data); +typedef bool (*NetMsgJsonWriteFn)(JsonWrite& bitbuf, const SourceGameContext& context, void* data); typedef void (*NetMsgToStringFn)(std::ostringstream& out, void* data); bool NetHandlers::NetMsg_BitRead(uint32_t type, bf_read& bitbuf, SourceGameContext& context, void* data) @@ -52,7 +52,7 @@ bool NetHandlers::NetMsg_BitRead(uint32_t type, bf_read& bitbuf, SourceGameConte return netHandlers[type](bitbuf, context, data); } -bool NetHandlers::NetMsg_BitWrite(uint32_t type, bf_write& bitbuf, SourceGameContext& context, void* data) +bool NetHandlers::NetMsg_BitWrite(uint32_t type, bf_write& bitbuf, const SourceGameContext& context, void* data) { static const NetMsgBitWriteFn netHandlers[] = DECLARE_NET_HANDLER_ARRAY(BitWrite); return netHandlers[type](bitbuf, context, data); @@ -64,7 +64,7 @@ bool NetHandlers::NetMsg_JsonRead(uint32_t type, JsonRead& jsonbuf, SourceGameCo return netHandlers[type](jsonbuf, context, data); } -bool NetHandlers::NetMsg_JsonWrite(uint32_t type, JsonWrite& jsonbuf, SourceGameContext& context, void* data) +bool NetHandlers::NetMsg_JsonWrite(uint32_t type, JsonWrite& jsonbuf, const SourceGameContext& context, void* data) { static const NetMsgJsonWriteFn netHandlers[] = DECLARE_NET_HANDLER_ARRAY(JsonWrite); return netHandlers[type](jsonbuf, context, data); diff --git a/demboyz/netmessages/nethandlers.h b/demboyz/netmessages/nethandlers.h index 5cbf5bf..2abeffa 100644 --- a/demboyz/netmessages/nethandlers.h +++ b/demboyz/netmessages/nethandlers.h @@ -22,15 +22,15 @@ struct SourceGameContext namespace NetHandlers \ { \ bool msgname##_BitRead_Internal(bf_read& bitbuf, SourceGameContext& context, NetMsg::##msgname* data); \ - bool msgname##_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::##msgname* data); \ + bool msgname##_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::##msgname* data); \ bool msgname##_JsonRead_Internal(JsonRead& jsonbuf, SourceGameContext& context, NetMsg::##msgname* data); \ - bool msgname##_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::##msgname* data); \ + bool msgname##_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::##msgname* data); \ void msgname##_ToString_Internal(std::ostringstream& out, NetMsg::##msgname* data); \ inline bool msgname##_BitRead(bf_read& bitbuf, SourceGameContext& context, void* data) \ { \ return msgname##_BitRead_Internal(bitbuf, context, reinterpret_cast(data)); \ } \ - inline bool msgname##_BitWrite(bf_write& bitbuf, SourceGameContext& context, void* data) \ + inline bool msgname##_BitWrite(bf_write& bitbuf, const SourceGameContext& context, void* data) \ { \ return msgname##_BitWrite_Internal(bitbuf, context, reinterpret_cast(data)); \ } \ @@ -38,7 +38,7 @@ struct SourceGameContext { \ return msgname##_JsonRead_Internal(jsonbuf, context, reinterpret_cast(data)); \ } \ - inline bool msgname##_JsonWrite(JsonWrite& jsonbuf, SourceGameContext& context, void* data) \ + inline bool msgname##_JsonWrite(JsonWrite& jsonbuf, const SourceGameContext& context, void* data) \ { \ return msgname##_JsonWrite_Internal(jsonbuf, context, reinterpret_cast(data)); \ } \ @@ -51,8 +51,8 @@ struct SourceGameContext namespace NetHandlers { bool NetMsg_BitRead(uint32_t type, bf_read& bitbuf, SourceGameContext& context, void* data); - bool NetMsg_BitWrite(uint32_t type, bf_write& bitbuf, SourceGameContext& context, void* data); + bool NetMsg_BitWrite(uint32_t type, bf_write& bitbuf, const SourceGameContext& context, void* data); bool NetMsg_JsonRead(uint32_t type, JsonRead& jsonbuf, SourceGameContext& context, void* data); - bool NetMsg_JsonWrite(uint32_t type, JsonWrite& jsonbuf, SourceGameContext& context, void* data); + bool NetMsg_JsonWrite(uint32_t type, JsonWrite& jsonbuf, const SourceGameContext& context, void* data); void NetMsg_ToString(uint32_t type, std::ostringstream& out, void* data); } diff --git a/demboyz/netmessages/svc_bspdecal.cpp b/demboyz/netmessages/svc_bspdecal.cpp index 0d47ade..9143aa3 100644 --- a/demboyz/netmessages/svc_bspdecal.cpp +++ b/demboyz/netmessages/svc_bspdecal.cpp @@ -23,7 +23,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool SVC_BSPDecal_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::SVC_BSPDecal* data) + bool SVC_BSPDecal_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::SVC_BSPDecal* data) { bitbuf.WriteBitVec3Coord(data->position); bitbuf.WriteUBitLong(data->decalTextureIndex, MAX_DECAL_INDEX_BITS); @@ -46,7 +46,7 @@ namespace NetHandlers return true; } - bool SVC_BSPDecal_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::SVC_BSPDecal* data) + bool SVC_BSPDecal_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::SVC_BSPDecal* data) { return true; } diff --git a/demboyz/netmessages/svc_classinfo.cpp b/demboyz/netmessages/svc_classinfo.cpp index df53447..8cc2847 100644 --- a/demboyz/netmessages/svc_classinfo.cpp +++ b/demboyz/netmessages/svc_classinfo.cpp @@ -27,7 +27,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool SVC_ClassInfo_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::SVC_ClassInfo* data) + bool SVC_ClassInfo_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::SVC_ClassInfo* data) { bitbuf.WriteShort(data->numServerClasses); bitbuf.WriteOneBit(data->createOnClient); @@ -49,7 +49,7 @@ namespace NetHandlers return true; } - bool SVC_ClassInfo_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::SVC_ClassInfo* data) + bool SVC_ClassInfo_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::SVC_ClassInfo* data) { return true; } diff --git a/demboyz/netmessages/svc_createstringtable.cpp b/demboyz/netmessages/svc_createstringtable.cpp index 411a698..b28bb09 100644 --- a/demboyz/netmessages/svc_createstringtable.cpp +++ b/demboyz/netmessages/svc_createstringtable.cpp @@ -52,7 +52,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool SVC_CreateStringTable_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::SVC_CreateStringTable* data) + bool SVC_CreateStringTable_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::SVC_CreateStringTable* data) { if (data->isFileNames) { @@ -88,7 +88,7 @@ namespace NetHandlers return true; } - bool SVC_CreateStringTable_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::SVC_CreateStringTable* data) + bool SVC_CreateStringTable_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::SVC_CreateStringTable* data) { return true; } diff --git a/demboyz/netmessages/svc_crosshairangle.cpp b/demboyz/netmessages/svc_crosshairangle.cpp index 8191a3b..521cc73 100644 --- a/demboyz/netmessages/svc_crosshairangle.cpp +++ b/demboyz/netmessages/svc_crosshairangle.cpp @@ -13,7 +13,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool SVC_CrosshairAngle_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::SVC_CrosshairAngle* data) + bool SVC_CrosshairAngle_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::SVC_CrosshairAngle* data) { bitbuf.WriteBitAngle(data->x, 16); bitbuf.WriteBitAngle(data->y, 16); @@ -26,7 +26,7 @@ namespace NetHandlers return true; } - bool SVC_CrosshairAngle_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::SVC_CrosshairAngle* data) + bool SVC_CrosshairAngle_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::SVC_CrosshairAngle* data) { return true; } diff --git a/demboyz/netmessages/svc_entitymessage.cpp b/demboyz/netmessages/svc_entitymessage.cpp index ba6a6e6..fbbf12b 100644 --- a/demboyz/netmessages/svc_entitymessage.cpp +++ b/demboyz/netmessages/svc_entitymessage.cpp @@ -16,7 +16,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool SVC_EntityMessage_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::SVC_EntityMessage* data) + bool SVC_EntityMessage_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::SVC_EntityMessage* data) { bitbuf.WriteUBitLong(data->entIndex, MAX_EDICT_BITS); bitbuf.WriteUBitLong(data->classID, MAX_SERVER_CLASS_BITS); @@ -30,7 +30,7 @@ namespace NetHandlers return true; } - bool SVC_EntityMessage_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::SVC_EntityMessage* data) + bool SVC_EntityMessage_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::SVC_EntityMessage* data) { return true; } diff --git a/demboyz/netmessages/svc_fixangle.cpp b/demboyz/netmessages/svc_fixangle.cpp index f6f3a87..0d1302b 100644 --- a/demboyz/netmessages/svc_fixangle.cpp +++ b/demboyz/netmessages/svc_fixangle.cpp @@ -14,7 +14,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool SVC_FixAngle_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::SVC_FixAngle* data) + bool SVC_FixAngle_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::SVC_FixAngle* data) { bitbuf.WriteOneBit(data->relative); bitbuf.WriteBitAngle(data->x, 16); @@ -28,7 +28,7 @@ namespace NetHandlers return true; } - bool SVC_FixAngle_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::SVC_FixAngle* data) + bool SVC_FixAngle_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::SVC_FixAngle* data) { return true; } diff --git a/demboyz/netmessages/svc_gameevent.cpp b/demboyz/netmessages/svc_gameevent.cpp index dc84276..2bce6d5 100644 --- a/demboyz/netmessages/svc_gameevent.cpp +++ b/demboyz/netmessages/svc_gameevent.cpp @@ -14,7 +14,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool SVC_GameEvent_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::SVC_GameEvent* data) + bool SVC_GameEvent_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::SVC_GameEvent* data) { bitbuf.WriteUBitLong(data->dataLengthInBits, 11); bitbuf.WriteBits(data->data.get(), data->dataLengthInBits); @@ -26,7 +26,7 @@ namespace NetHandlers return true; } - bool SVC_GameEvent_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::SVC_GameEvent* data) + bool SVC_GameEvent_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::SVC_GameEvent* data) { return true; } diff --git a/demboyz/netmessages/svc_gameeventlist.cpp b/demboyz/netmessages/svc_gameeventlist.cpp index bd5e573..646f84e 100644 --- a/demboyz/netmessages/svc_gameeventlist.cpp +++ b/demboyz/netmessages/svc_gameeventlist.cpp @@ -28,7 +28,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool SVC_GameEventList_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::SVC_GameEventList* data) + bool SVC_GameEventList_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::SVC_GameEventList* data) { bitbuf.WriteUBitLong(data->eventDescriptors.size(), MAX_EVENT_BITS); bitbuf.WriteUBitLong(data->dataLengthInBits, 20); @@ -51,7 +51,7 @@ namespace NetHandlers return true; } - bool SVC_GameEventList_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::SVC_GameEventList* data) + bool SVC_GameEventList_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::SVC_GameEventList* data) { return true; } diff --git a/demboyz/netmessages/svc_getcvarvalue.cpp b/demboyz/netmessages/svc_getcvarvalue.cpp index 37abe3a..ea4eb28 100644 --- a/demboyz/netmessages/svc_getcvarvalue.cpp +++ b/demboyz/netmessages/svc_getcvarvalue.cpp @@ -11,7 +11,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool SVC_GetCvarValue_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::SVC_GetCvarValue* data) + bool SVC_GetCvarValue_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::SVC_GetCvarValue* data) { bitbuf.WriteSBitLong(data->cookie, 32); bitbuf.WriteString(data->cvarName); @@ -23,7 +23,7 @@ namespace NetHandlers return true; } - bool SVC_GetCvarValue_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::SVC_GetCvarValue* data) + bool SVC_GetCvarValue_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::SVC_GetCvarValue* data) { return true; } diff --git a/demboyz/netmessages/svc_hltv.cpp b/demboyz/netmessages/svc_hltv.cpp index 5f61704..77c9283 100644 --- a/demboyz/netmessages/svc_hltv.cpp +++ b/demboyz/netmessages/svc_hltv.cpp @@ -10,7 +10,7 @@ namespace NetHandlers return true; } - bool SVC_HLTV_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::SVC_HLTV* data) + bool SVC_HLTV_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::SVC_HLTV* data) { assert(false); return true; @@ -22,7 +22,7 @@ namespace NetHandlers return true; } - bool SVC_HLTV_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::SVC_HLTV* data) + bool SVC_HLTV_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::SVC_HLTV* data) { assert(false); return true; diff --git a/demboyz/netmessages/svc_menu.cpp b/demboyz/netmessages/svc_menu.cpp index a99bce7..48d4633 100644 --- a/demboyz/netmessages/svc_menu.cpp +++ b/demboyz/netmessages/svc_menu.cpp @@ -26,7 +26,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool SVC_Menu_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::SVC_Menu* data) + bool SVC_Menu_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::SVC_Menu* data) { bitbuf.WriteShort(static_cast(data->type)); bitbuf.WriteWord(data->dataLengthInBytes); @@ -39,7 +39,7 @@ namespace NetHandlers return true; } - bool SVC_Menu_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::SVC_Menu* data) + bool SVC_Menu_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::SVC_Menu* data) { return true; } diff --git a/demboyz/netmessages/svc_packetentities.cpp b/demboyz/netmessages/svc_packetentities.cpp index efdcf89..5557c16 100644 --- a/demboyz/netmessages/svc_packetentities.cpp +++ b/demboyz/netmessages/svc_packetentities.cpp @@ -27,7 +27,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool SVC_PacketEntities_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::SVC_PacketEntities* data) + bool SVC_PacketEntities_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::SVC_PacketEntities* data) { bitbuf.WriteUBitLong(data->maxEntries, MAX_EDICT_BITS); if (data->isDelta) @@ -47,7 +47,7 @@ namespace NetHandlers return true; } - bool SVC_PacketEntities_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::SVC_PacketEntities* data) + bool SVC_PacketEntities_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::SVC_PacketEntities* data) { return true; } diff --git a/demboyz/netmessages/svc_prefetch.cpp b/demboyz/netmessages/svc_prefetch.cpp index 68465e6..eb56e9f 100644 --- a/demboyz/netmessages/svc_prefetch.cpp +++ b/demboyz/netmessages/svc_prefetch.cpp @@ -19,7 +19,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool SVC_Prefetch_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::SVC_Prefetch* data) + bool SVC_Prefetch_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::SVC_Prefetch* data) { if (context.protocol > 23) { @@ -37,7 +37,7 @@ namespace NetHandlers return true; } - bool SVC_Prefetch_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::SVC_Prefetch* data) + bool SVC_Prefetch_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::SVC_Prefetch* data) { return true; } diff --git a/demboyz/netmessages/svc_print.cpp b/demboyz/netmessages/svc_print.cpp index 408116f..5787823 100644 --- a/demboyz/netmessages/svc_print.cpp +++ b/demboyz/netmessages/svc_print.cpp @@ -10,7 +10,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool SVC_Print_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::SVC_Print* data) + bool SVC_Print_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::SVC_Print* data) { bitbuf.WriteString(data->text); return !bitbuf.IsOverflowed(); @@ -21,7 +21,7 @@ namespace NetHandlers return true; } - bool SVC_Print_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::SVC_Print* data) + bool SVC_Print_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::SVC_Print* data) { return true; } diff --git a/demboyz/netmessages/svc_sendtable.cpp b/demboyz/netmessages/svc_sendtable.cpp index adcbd30..0f2b512 100644 --- a/demboyz/netmessages/svc_sendtable.cpp +++ b/demboyz/netmessages/svc_sendtable.cpp @@ -14,7 +14,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool SVC_SendTable_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::SVC_SendTable* data) + bool SVC_SendTable_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::SVC_SendTable* data) { bitbuf.WriteOneBit(data->needsDecoder); bitbuf.WriteShort(data->dataLengthInBits); @@ -27,7 +27,7 @@ namespace NetHandlers return true; } - bool SVC_SendTable_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::SVC_SendTable* data) + bool SVC_SendTable_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::SVC_SendTable* data) { return true; } diff --git a/demboyz/netmessages/svc_serverinfo.cpp b/demboyz/netmessages/svc_serverinfo.cpp index 4cb8708..d5be67a 100644 --- a/demboyz/netmessages/svc_serverinfo.cpp +++ b/demboyz/netmessages/svc_serverinfo.cpp @@ -35,7 +35,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool SVC_ServerInfo_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::SVC_ServerInfo* data) + bool SVC_ServerInfo_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::SVC_ServerInfo* data) { bitbuf.WriteShort(data->protocol); bitbuf.WriteLong(data->serverCount); @@ -71,7 +71,7 @@ namespace NetHandlers return true; } - bool SVC_ServerInfo_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::SVC_ServerInfo* data) + bool SVC_ServerInfo_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::SVC_ServerInfo* data) { return true; } diff --git a/demboyz/netmessages/svc_setpause.cpp b/demboyz/netmessages/svc_setpause.cpp index 267b8df..b83b8d8 100644 --- a/demboyz/netmessages/svc_setpause.cpp +++ b/demboyz/netmessages/svc_setpause.cpp @@ -10,7 +10,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool SVC_SetPause_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::SVC_SetPause* data) + bool SVC_SetPause_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::SVC_SetPause* data) { bitbuf.WriteOneBit(data->isPaused); return !bitbuf.IsOverflowed(); @@ -21,7 +21,7 @@ namespace NetHandlers return true; } - bool SVC_SetPause_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::SVC_SetPause* data) + bool SVC_SetPause_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::SVC_SetPause* data) { return true; } diff --git a/demboyz/netmessages/svc_setview.cpp b/demboyz/netmessages/svc_setview.cpp index 3375f7a..10b565c 100644 --- a/demboyz/netmessages/svc_setview.cpp +++ b/demboyz/netmessages/svc_setview.cpp @@ -11,7 +11,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool SVC_SetView_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::SVC_SetView* data) + bool SVC_SetView_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::SVC_SetView* data) { bitbuf.WriteUBitLong(data->entIndex, MAX_EDICT_BITS); return !bitbuf.IsOverflowed(); @@ -22,7 +22,7 @@ namespace NetHandlers return true; } - bool SVC_SetView_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::SVC_SetView* data) + bool SVC_SetView_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::SVC_SetView* data) { return true; } diff --git a/demboyz/netmessages/svc_sounds.cpp b/demboyz/netmessages/svc_sounds.cpp index ba62d13..05da32e 100644 --- a/demboyz/netmessages/svc_sounds.cpp +++ b/demboyz/netmessages/svc_sounds.cpp @@ -23,7 +23,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool SVC_Sounds_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::SVC_Sounds* data) + bool SVC_Sounds_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::SVC_Sounds* data) { if (data->reliableSound) { @@ -45,7 +45,7 @@ namespace NetHandlers return true; } - bool SVC_Sounds_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::SVC_Sounds* data) + bool SVC_Sounds_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::SVC_Sounds* data) { return true; } diff --git a/demboyz/netmessages/svc_tempentities.cpp b/demboyz/netmessages/svc_tempentities.cpp index 133db6e..d266355 100644 --- a/demboyz/netmessages/svc_tempentities.cpp +++ b/demboyz/netmessages/svc_tempentities.cpp @@ -22,7 +22,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool SVC_TempEntities_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::SVC_TempEntities* data) + bool SVC_TempEntities_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::SVC_TempEntities* data) { bitbuf.WriteUBitLong(data->numEntries, EVENT_INDEX_BITS); if (context.protocol > 23) @@ -42,7 +42,7 @@ namespace NetHandlers return true; } - bool SVC_TempEntities_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::SVC_TempEntities* data) + bool SVC_TempEntities_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::SVC_TempEntities* data) { return true; } diff --git a/demboyz/netmessages/svc_terrainmod.cpp b/demboyz/netmessages/svc_terrainmod.cpp index 667fda5..1ceda60 100644 --- a/demboyz/netmessages/svc_terrainmod.cpp +++ b/demboyz/netmessages/svc_terrainmod.cpp @@ -10,7 +10,7 @@ namespace NetHandlers return true; } - bool SVC_TerrainMod_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::SVC_TerrainMod* data) + bool SVC_TerrainMod_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::SVC_TerrainMod* data) { assert(false); return true; @@ -22,7 +22,7 @@ namespace NetHandlers return true; } - bool SVC_TerrainMod_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::SVC_TerrainMod* data) + bool SVC_TerrainMod_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::SVC_TerrainMod* data) { assert(false); return true; diff --git a/demboyz/netmessages/svc_updatestringtable.cpp b/demboyz/netmessages/svc_updatestringtable.cpp index 461951b..57bddc0 100644 --- a/demboyz/netmessages/svc_updatestringtable.cpp +++ b/demboyz/netmessages/svc_updatestringtable.cpp @@ -16,7 +16,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool SVC_UpdateStringTable_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::SVC_UpdateStringTable* data) + bool SVC_UpdateStringTable_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::SVC_UpdateStringTable* data) { bitbuf.WriteUBitLong(data->tableID, math::log2(MAX_TABLES)); if (data->numChangedEntries != 1) @@ -38,7 +38,7 @@ namespace NetHandlers return true; } - bool SVC_UpdateStringTable_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::SVC_UpdateStringTable* data) + bool SVC_UpdateStringTable_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::SVC_UpdateStringTable* data) { return true; } diff --git a/demboyz/netmessages/svc_usermessage.cpp b/demboyz/netmessages/svc_usermessage.cpp index 7b6c585..5c25f53 100644 --- a/demboyz/netmessages/svc_usermessage.cpp +++ b/demboyz/netmessages/svc_usermessage.cpp @@ -17,7 +17,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool SVC_UserMessage_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::SVC_UserMessage* data) + bool SVC_UserMessage_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::SVC_UserMessage* data) { bitbuf.WriteByte(data->msgType); bitbuf.WriteUBitLong(data->dataLengthInBits, 11); @@ -30,7 +30,7 @@ namespace NetHandlers return true; } - bool SVC_UserMessage_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::SVC_UserMessage* data) + bool SVC_UserMessage_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::SVC_UserMessage* data) { return true; } diff --git a/demboyz/netmessages/svc_voicedata.cpp b/demboyz/netmessages/svc_voicedata.cpp index 599f5b1..7324cd6 100644 --- a/demboyz/netmessages/svc_voicedata.cpp +++ b/demboyz/netmessages/svc_voicedata.cpp @@ -15,7 +15,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool SVC_VoiceData_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::SVC_VoiceData* data) + bool SVC_VoiceData_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::SVC_VoiceData* data) { bitbuf.WriteByte(data->fromClientIndex); bitbuf.WriteByte(data->proximity); @@ -29,7 +29,7 @@ namespace NetHandlers return true; } - bool SVC_VoiceData_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::SVC_VoiceData* data) + bool SVC_VoiceData_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::SVC_VoiceData* data) { return true; } diff --git a/demboyz/netmessages/svc_voiceinit.cpp b/demboyz/netmessages/svc_voiceinit.cpp index 9202cd2..50d7356 100644 --- a/demboyz/netmessages/svc_voiceinit.cpp +++ b/demboyz/netmessages/svc_voiceinit.cpp @@ -11,7 +11,7 @@ namespace NetHandlers return !bitbuf.IsOverflowed(); } - bool SVC_VoiceInit_BitWrite_Internal(bf_write& bitbuf, SourceGameContext& context, NetMsg::SVC_VoiceInit* data) + bool SVC_VoiceInit_BitWrite_Internal(bf_write& bitbuf, const SourceGameContext& context, NetMsg::SVC_VoiceInit* data) { bitbuf.WriteString(data->voiceCodec); bitbuf.WriteByte(data->quality); @@ -23,7 +23,7 @@ namespace NetHandlers return true; } - bool SVC_VoiceInit_JsonWrite_Internal(JsonWrite& jsonbuf, SourceGameContext& context, NetMsg::SVC_VoiceInit* data) + bool SVC_VoiceInit_JsonWrite_Internal(JsonWrite& jsonbuf, const SourceGameContext& context, NetMsg::SVC_VoiceInit* data) { return true; }