/* protocol.h - communications protocols Copyright (C) 2007 Uncle Mike This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ #ifndef NET_PROTOCOL_H #define NET_PROTOCOL_H #define PROTOCOL_VERSION 49 // server to client #define svc_bad 0 // immediately crash client when received #define svc_nop 1 // does nothing #define svc_disconnect 2 // kick client from server #define svc_event 3 // playback event queue #define svc_changing 4 // changelevel by server request #define svc_setview 5 // [short] entity number #define svc_sound 6 // #define svc_time 7 // [float] server time #define svc_print 8 // [byte] id [string] null terminated string #define svc_stufftext 9 // [string] stuffed into client's console buffer #define svc_setangle 10 // [angle angle angle] set the view angle to this absolute value #define svc_serverdata 11 // [long] protocol ... #define svc_lightstyle 12 // [index][pattern][float] #define svc_updateuserinfo 13 // [byte] playernum, [string] userinfo #define svc_deltatable 14 // [table header][...] #define svc_clientdata 15 // [...] #define svc_resource 16 // [...] late-precached resource will be download in-game #define svc_pings 17 // [bit][idx][ping][packet_loss] #define svc_particle 18 // [float*3][char*3][byte][byte] #define svc_restoresound 19 // #define svc_spawnstatic 20 // creates a static client entity #define svc_event_reliable 21 // playback event directly from message, not queue #define svc_spawnbaseline 22 // #define svc_temp_entity 23 // #define svc_setpause 24 // [byte] 0 = unpaused, 1 = paused #define svc_signonnum 25 // [byte] used for the signon sequence #define svc_centerprint 26 // [string] to put in center of the screen // reserved // reserved // reserved #define svc_intermission 30 // empty message (event) #define svc_finale 31 // empty message (event) #define svc_cdtrack 32 // [string] trackname #define svc_restore 33 // [string] savename #define svc_cutscene 34 // empty message (event) #define svc_weaponanim 35 // [byte]iAnim [byte]body #define svc_bspdecal 36 // [float*3][short][short][short] #define svc_roomtype 37 // [short] room type #define svc_addangle 38 // [angle] add angles when client turn on mover #define svc_usermessage 39 // [byte][byte][string] REG_USER_MSG stuff #define svc_packetentities 40 // [short][...] #define svc_deltapacketentities 41 // [short][byte][...] #define svc_choke 42 // just event #define svc_resourcelist 43 // [short][...] #define svc_deltamovevars 44 // [movevars_t] #define svc_resourcerequest 45 // #define svc_customization 46 #define svc_crosshairangle 47 // [byte][byte] #define svc_soundfade 48 // [float*4] sound fade parms #define svc_filetxferfailed 49 // [string] #define svc_hltv 50 // sending from the game.dll #define svc_director 51 // #define svc_voiceinit 52 // #define svc_voicedata 53 // [byte][short][...] // reserved // reserved #define svc_resourcelocation 56 // [string] #define svc_querycvarvalue 57 // [string] #define svc_querycvarvalue2 58 // [string][long] (context) #define svc_lastmsg 58 // start user messages at this point // client to server #define clc_bad 0 // immediately drop client when received #define clc_nop 1 #define clc_move 2 // [[usercmd_t] #define clc_stringcmd 3 // [string] message #define clc_delta 4 // [byte] sequence number, requests delta compression of message #define clc_resourcelist 5 // reserved #define clc_fileconsistency 7 #define clc_voicedata 8 #define clc_requestcvarvalue 9 #define clc_requestcvarvalue2 10 #define clc_lastmsg 10 // end client messages #define MAX_VISIBLE_PACKET_BITS 11 // 2048 visible entities per frame (hl1 has 256) #define MAX_VISIBLE_PACKET (1<