Half-Life 1 Engine Messages

From AlliedModders Wiki
Revision as of 16:04, 12 February 2011 by Lt.RAT (talk | contribs)
Jump to: navigation, search
//SVC_BAD                 0
SVC_NOP                   1
SVC_DISCONNECT            2
SVC_EVENT                 3
SVC_VERSION               4
SVC_SETVIEW               5
SVC_SOUND                 6
SVC_TIME                  7
SVC_PRINT                 8
SVC_STUFFTEXT             9
SVC_SETANGLE              10
SVC_SERVERINFO            11
SVC_LIGHTSTYLE            12
SVC_UPDATEUSERINFO        13
SVC_DELTADESCRIPTION      14
SVC_CLIENTDATA            15
SVC_STOPSOUND             16
SVC_PINGS                 17
SVC_PARTICLE              18
SVC_DAMAGE                19
SVC_SPAWNSTATIC           20
SVC_EVENT_RELIABLE        21
SVC_SPAWNBASELINE         22
SVC_TEMPENTITY            23
SVC_SETPAUSE              24
SVC_SIGNONNUM             25
SVC_CENTERPRINT           26
SVC_KILLEDMONSTER         27
SVC_FOUNDSECRET           28
SVC_SPAWNSTATICSOUND      29
SVC_INTERMISSION          30
SVC_FINALE                31
SVC_CDTRACK               32
SVC_RESTORE               33
SVC_CUTSCENE              34
SVC_WEAPONANIM            35
SVC_DECALNAME             36
SVC_ROOMTYPE              37
SVC_ADDANGLE              38
SVC_NEWUSERMSG            39
SVC_PACKETENTITIES        40
SVC_DELTAPACKETENTITIES   41
SVC_CHOKE                 42
SVC_RESOURCELIST          43
SVC_NEWMOVEVARS           44
SVC_RESOURCEREQUEST       45
SVC_CUSTOMIZATION         46
SVC_CROSSHAIRANGLE        47
SVC_SOUNDFADE             48
SVC_FILETXFERFAILED       49
SVC_HLTV                  50
SVC_DIRECTOR              51
SVC_VOICEINIT             52
SVC_VOICEDATA             53
SVC_SENDEXTRAINFO         54
SVC_TIMESCALE             55
SVC_RESOURCELOCATION      56
SVC_SENDCVARVALUE         57
SVC_SENDCVARVALUE2        58

SVC_CHOKE

Note: This message has no arguments.

Name: SVC_CHOKE
Structure:


SVC_CUTSCENE

Shows the intermission camera view, and writes-out text passed in first parameter.

Note: Intermission mode 3.
Note: This text will keep showing on clients in future intermissions.

Name: SVC_CUTSCENE
Structure:
string Text


SVC_DAMAGE

Note: Deprecated.

Name: SVC_DAMAGE
Structure:


SVC_DISCONNECT

Disconnect player with given reason.

Name: SVC_DISCONNECT
Structure:
string Reason


SVC_INTERMISSION

Shows the intermission camera view

Note: Intermission mode 1.

Name: SVC_INTERMISSION
Structure:


SVC_FILETXFERFAILED

Name: SVC_FILETXFERFAILED
Structure:
string FileName


SVC_FINALE

Shows the intermission camera view, and writes-out text passed in first parameter.

Note: Intermission mode 2.
Note: This text will keep showing on clients in future intermissions.

Name: SVC_FINALE
Structure:
string Text


SVC_KILLEDMONSTER

Note: Deprecated.

Name: SVC_KILLEDMONSTER
Structure:


SVC_FOUNDSECRET

Note: Deprecated.

Name: SVC_FOUNDSECRET
Structure:


SVC_HLTV

Tells client about current spectator mode.

As found in hltv.h:

#define HLTV_ACTIVE	0	// tells client that he's an spectator and will get director commands
#define HLTV_STATUS	1	// send status infos about proxy 
#define HLTV_LISTEN	2	// tell client to listen to a multicast stream
Name: SVC_HLTV
Structure:
byte Mode


SVC_LIGHTSTYLE

Setup light animation tables. 'a' is total darkness, 'z' is maxbright.

Note: Server send 64 lightstyles to client during client connect. Most of them has empty light info. All of them could be found in world.cpp

// 0 normal
LIGHT_STYLE(0, "m");
// 1 FLICKER (first variety)
LIGHT_STYLE(1, "mmnmmommommnonmmonqnmmo");	
// 2 SLOW STRONG PULSE
LIGHT_STYLE(2, "abcdefghijklmnopqrstuvwxyzyxwvutsrqponmlkjihgfedcba");	
// 3 CANDLE (first variety)
LIGHT_STYLE(3, "mmmmmaaaaammmmmaaaaaabcdefgabcdefg");	
// 4 FAST STROBE
LIGHT_STYLE(4, "mamamamamama");	
// 5 GENTLE PULSE 1
LIGHT_STYLE(5,"jklmnopqrstuvwxyzyxwvutsrqponmlkj");	
// 6 FLICKER (second variety)
LIGHT_STYLE(6, "nmonqnmomnmomomno");	
// 7 CANDLE (second variety)
LIGHT_STYLE(7, "mmmaaaabcdefgmmmmaaaammmaamm");	
// 8 CANDLE (third variety)
LIGHT_STYLE(8, "mmmaaammmaaammmabcdefaaaammmmabcdefmmmaaaa");	
// 9 SLOW STROBE (fourth variety)
LIGHT_STYLE(9, "aaaaaaaazzzzzzzz");	
// 10 FLUORESCENT FLICKER
LIGHT_STYLE(10, "mmamammmmammamamaaamammma");
// 11 SLOW PULSE NOT FADE TO BLACK
LIGHT_STYLE(11, "abcdefghijklmnopqrrqponmlkjihgfedcba");	
// 12 UNDERWATER LIGHT MUTATION
// this light only distorts the lightmap - no contribution
// is made to the brightness of affected surfaces
LIGHT_STYLE(12, "mmnnmmnnnmmnn");
 
// styles 32-62 are assigned by the light program for switchable lights
 
// 63 testing
LIGHT_STYLE(63, "a");
Name: SVC_LIGHTSTYLE
Structure:
byte index
string lightinfo


SVC_PINGS

Contains ping, loss for several players.

Note: Flag is 1 - rest data contains PlayerID, Ping and Loss at least for 1 player.
Note: Flag is 0 - end of the message, skip remaining bits.
Note: ... - Flag + PlayerID + Ping + Loss - N times.

Name: SVC_PINGS
Structure:
1 bit Flag 1
5 bits PlayerID
12 bits Ping
7 bits Loss
... ...
1 bit Flag 0
n bits Align to byte with zero bits


SVC_RESOURCELOCATION

This message sends sv_downloadurl to client.

Name: SVC_RESOURCELOCATION
Structure:
string sv_downloadurl


SVC_ROOMTYPE

Set client room_type cvar to provided value.

Name: SVC_ROOMTYPE
Structure:
short Value


SVC_STUFFTEXT

Executes command on player.

Note: Works similar to client_cmd(index,const command[],any:...)

Name: SVC_STUFFTEXT
Structure:
string Command


SVC_TIMESCALE

Name: SVC_TIMESCALE
Structure:
float TimeScale


SVC_VOICEINIT

Sends sv_voicecodec and sv_voicequality cvars to client.

Note: Codec name either voice_miles or voice_speex.
Note: Quality 1 to 5.

Name: SVC_VOICEINIT
Structure:
string CodecName
byte Quality


SVC_SETPAUSE

Puts client to a pause.

Note: If server is not paused, commands and packets from client are still sent, that means that client still can shoot/buy/etc...
Note: IsPaused: 1 - for pause, 0 - for unpause.

Name: SVC_SETPAUSE
Structure:
byte IsPaused