Browse Source

engine: remove duplicate svc_strings definition

pull/2/head
Alibek Omarov 2 years ago
parent
commit
aa6a1db0a9
  1. 64
      engine/client/cl_debug.c
  2. 68
      engine/common/dedicated.c
  3. 64
      engine/common/net_buffer.c

64
engine/client/cl_debug.c

@ -25,70 +25,6 @@ GNU General Public License for more details.
#define MSG_COUNT 32 // last 32 messages parsed #define MSG_COUNT 32 // last 32 messages parsed
#define MSG_MASK (MSG_COUNT - 1) #define MSG_MASK (MSG_COUNT - 1)
const char *svc_strings[svc_lastmsg+1] =
{
"svc_bad",
"svc_nop",
"svc_disconnect",
"svc_event",
"svc_changing",
"svc_setview",
"svc_sound",
"svc_time",
"svc_print",
"svc_stufftext",
"svc_setangle",
"svc_serverdata",
"svc_lightstyle",
"svc_updateuserinfo",
"svc_deltatable",
"svc_clientdata",
"svc_resource",
"svc_pings",
"svc_particle",
"svc_restoresound",
"svc_spawnstatic",
"svc_event_reliable",
"svc_spawnbaseline",
"svc_temp_entity",
"svc_setpause",
"svc_signonnum",
"svc_centerprint",
"svc_unused27",
"svc_unused28",
"svc_unused29",
"svc_intermission",
"svc_finale",
"svc_cdtrack",
"svc_restore",
"svc_cutscene",
"svc_weaponanim",
"svc_bspdecal",
"svc_roomtype",
"svc_addangle",
"svc_usermessage",
"svc_packetentities",
"svc_deltapacketentities",
"svc_choke",
"svc_resourcelist",
"svc_deltamovevars",
"svc_resourcerequest",
"svc_customization",
"svc_crosshairangle",
"svc_soundfade",
"svc_filetxferfailed",
"svc_hltv",
"svc_director",
"svc_voiceinit",
"svc_voicedata",
"svc_deltapacketbones",
"svc_unused55",
"svc_resourcelocation",
"svc_querycvarvalue",
"svc_querycvarvalue2",
"svc_exec",
};
typedef struct typedef struct
{ {
int command; int command;

68
engine/common/dedicated.c

@ -19,74 +19,6 @@ GNU General Public License for more details.
ref_globals_t refState; ref_globals_t refState;
const char *svc_strings[256] =
{
"svc_bad",
"svc_nop",
"svc_disconnect",
"svc_changing",
"svc_version",
"svc_setview",
"svc_sound",
"svc_time",
"svc_print",
"svc_stufftext",
"svc_setangle",
"svc_serverdata",
"svc_lightstyle",
"svc_updateuserinfo",
"svc_deltatable",
"svc_clientdata",
"svc_stopsound",
"svc_updatepings",
"svc_particle",
"svc_restoresound",
"svc_spawnstatic",
"svc_event_reliable",
"svc_spawnbaseline",
"svc_temp_entity",
"svc_setpause",
"svc_signonnum",
"svc_centerprint",
"svc_event",
"svc_soundindex",
"svc_ambientsound",
"svc_intermission",
"svc_modelindex",
"svc_cdtrack",
"svc_serverinfo",
"svc_eventindex",
"svc_weaponanim",
"svc_bspdecal",
"svc_roomtype",
"svc_addangle",
"svc_usermessage",
"svc_packetentities",
"svc_deltapacketentities",
"svc_chokecount",
"svc_resourcelist",
"svc_deltamovevars",
"svc_customization",
"svc_unused46",
"svc_crosshairangle",
"svc_soundfade",
"svc_unused49",
"svc_unused50",
"svc_director",
"svc_studiodecal",
"svc_unused53",
"svc_unused54",
"svc_unused55",
"svc_unused56",
"svc_querycvarvalue",
"svc_querycvarvalue2",
"svc_exec",
"svc_unused60",
"svc_unused61",
"svc_unused62",
"svc_unused63",
};
void CL_ProcessFile( qboolean successfully_received, const char *filename ) void CL_ProcessFile( qboolean successfully_received, const char *filename )
{ {

64
engine/common/net_buffer.c

@ -17,7 +17,6 @@ GNU General Public License for more details.
#include "protocol.h" #include "protocol.h"
#include "net_buffer.h" #include "net_buffer.h"
#include "xash3d_mathlib.h" #include "xash3d_mathlib.h"
//#define DEBUG_NET_MESSAGES_SEND //#define DEBUG_NET_MESSAGES_SEND
//#define DEBUG_NET_MESSAGES_READ //#define DEBUG_NET_MESSAGES_READ
@ -26,6 +25,69 @@ GNU General Public License for more details.
// gives a 33% speedup in WriteUBitLong. // gives a 33% speedup in WriteUBitLong.
static dword BitWriteMasks[32][33]; static dword BitWriteMasks[32][33];
static dword ExtraMasks[32]; static dword ExtraMasks[32];
const char *svc_strings[svc_lastmsg+1] =
{
"svc_bad",
"svc_nop",
"svc_disconnect",
"svc_event",
"svc_changing",
"svc_setview",
"svc_sound",
"svc_time",
"svc_print",
"svc_stufftext",
"svc_setangle",
"svc_serverdata",
"svc_lightstyle",
"svc_updateuserinfo",
"svc_deltatable",
"svc_clientdata",
"svc_resource",
"svc_pings",
"svc_particle",
"svc_restoresound",
"svc_spawnstatic",
"svc_event_reliable",
"svc_spawnbaseline",
"svc_temp_entity",
"svc_setpause",
"svc_signonnum",
"svc_centerprint",
"svc_unused27",
"svc_unused28",
"svc_unused29",
"svc_intermission",
"svc_finale",
"svc_cdtrack",
"svc_restore",
"svc_cutscene",
"svc_weaponanim",
"svc_bspdecal",
"svc_roomtype",
"svc_addangle",
"svc_usermessage",
"svc_packetentities",
"svc_deltapacketentities",
"svc_choke",
"svc_resourcelist",
"svc_deltamovevars",
"svc_resourcerequest",
"svc_customization",
"svc_crosshairangle",
"svc_soundfade",
"svc_filetxferfailed",
"svc_hltv",
"svc_director",
"svc_voiceinit",
"svc_voicedata",
"svc_deltapacketbones",
"svc_unused55",
"svc_resourcelocation",
"svc_querycvarvalue",
"svc_querycvarvalue2",
"svc_exec",
};
unsigned short MSG_BigShort( unsigned short swap ) unsigned short MSG_BigShort( unsigned short swap )
{ {

Loading…
Cancel
Save