Parse a message (event) received from the server. More...
#include "../client.h"
#include "cl_localentity.h"
#include "cl_parse.h"
#include "cl_hud.h"
#include "../cl_game.h"
#include "../ui/ui_main.h"
#include "events/e_parse.h"
#include "../multiplayer/mp_chatmessages.h"
Go to the source code of this file.
Functions | |
static void | CL_ParseServerData (struct dbuffer *msg) |
Written by SV_New_f in sv_user.c. | |
static void | CL_ParseClientinfo (int player) |
Parses client names that are displayed on the targeting box for multiplayer games. | |
const char * | CL_PlayerGetName (int player) |
Get the player name. | |
static void | CL_ParseConfigString (struct dbuffer *msg) |
static void | CL_ParseStartSoundPacket (struct dbuffer *msg) |
Parsed a server send sound package. | |
void | CL_ParseServerMessage (svc_ops_t cmd, struct dbuffer *msg) |
Parses the server sent data from the given buffer. | |
Variables | |
static const char * | svc_strings [UCHAR_MAX+1] |
see also svc_ops_e in common.h |
Parse a message (event) received from the server.
Definition in file cl_parse.c.
static void CL_ParseClientinfo | ( | int | player | ) | [static] |
Parses client names that are displayed on the targeting box for multiplayer games.
Definition at line 98 of file cl_parse.c.
References clientinfo_t::cinfo, cl, CL_PlayerGetName(), clientinfo_t::name, and Q_strncpyz().
Referenced by CL_ParseConfigString().
static void CL_ParseConfigString | ( | struct dbuffer * | msg | ) | [static] |
Definition at line 125 of file cl_parse.c.
References cl, CL_ParseClientinfo(), CL_SetConfigString(), CM_InlineModel(), Com_DPrintf(), CS_MODELS, CS_PLAYERNAMES, DEBUG_CLIENT, i, MAX_CLIENTS, MAX_MODELS, NET_ReadShort(), R_RegisterModelShort(), rendererData_t::ready, and refdef.
Referenced by CL_ParseServerMessage().
static void CL_ParseServerData | ( | struct dbuffer * | msg | ) | [static] |
Written by SV_New_f in sv_user.c.
Definition at line 64 of file cl_parse.c.
References ca_connected, cl, CL_SetClientState(), Com_DPrintf(), Com_Error(), DEBUG_CLIENT, ERR_DROP, i, NET_ReadLong(), NET_ReadShort(), NET_ReadString(), PROTOCOL_VERSION, qfalse, rendererData_t::ready, and refdef.
Referenced by CL_ParseServerMessage().
Parses the server sent data from the given buffer.
[in] | cmd | The action that should be parsed from the data |
[in,out] | msg | The client stream message buffer to read from |
Definition at line 199 of file cl_parse.c.
References _, ca_connecting, Cbuf_AddText(), Cbuf_Execute(), CL_Disconnect(), CL_Drop(), CL_Milliseconds(), CL_ParseConfigString(), CL_ParseEvent(), CL_ParseServerData(), CL_ParseStartSoundPacket(), CL_SetClientState(), cls, Com_DPrintf(), Com_Error(), Com_Printf(), client_static_s::connectTime, DEBUG_CLIENT, ERR_DROP, HUD_DisplayMessage(), i, MP_AddChatMessage(), NET_ReadByte(), NET_ReadString(), PRINT_CHAT, PRINT_HUD, S_StartLocalSample(), SND_VOLUME_DEFAULT, svc_bad, svc_configstring, svc_disconnect, svc_event, svc_nop, svc_print, svc_reconnect, svc_serverdata, svc_sound, svc_strings, and svc_stufftext.
Referenced by CL_ReadPackets().
static void CL_ParseStartSoundPacket | ( | struct dbuffer * | msg | ) | [static] |
Parsed a server send sound package.
Definition at line 161 of file cl_parse.c.
References Com_sprintf(), FS_CheckFile(), i, MAX_QPATH, NET_ReadPos(), NET_ReadString(), S_LoadSample(), S_PlaySample(), SND_VOLUME_DEFAULT, SOUND_ATTN_NORM, and va().
Referenced by CL_ParseServerMessage().
const char* CL_PlayerGetName | ( | int | player | ) |
Get the player name.
player | The index of the player |
Definition at line 114 of file cl_parse.c.
References CL_GetConfigString(), CS_PLAYERNAMES, and MAX_CLIENTS.
Referenced by CL_AddTargetingBox(), CL_ParseClientinfo(), and GAME_MP_EndRoundAnnounce().
const char* svc_strings[UCHAR_MAX+1] [static] |
{ "svc_bad", "svc_nop", "svc_disconnect", "svc_reconnect", "svc_sound", "svc_print", "svc_stufftext", "svc_serverdata", "svc_configstring", "svc_event" }
see also svc_ops_e in common.h
Definition at line 40 of file cl_parse.c.
Referenced by CL_ParseServerMessage().