26 #include "../client.h"
30 #include "../cgame/cl_game.h"
166 if (cmd < svc_bad || cmd >=
svc_oob)
216 memmove(s, &s[2],
sizeof(s) - 2);
249 Com_Printf(
"CL_ParseServerMessage: bad server message %d\n", cmd);
253 Com_Error(
ERR_DROP,
"CL_ParseServerMessage: Illegal server message %d (last cmd was: %d, eType: %i)",
254 cmd, lastCmd, eType);
void GAME_AddChatMessage(const char *format,...)
char * CL_GetConfigString(int index)
void Cbuf_AddText(const char *format,...)
Adds command text at the end of the buffer.
int NET_ReadLong(dbuffer *buf)
void Com_Printf(const char *const fmt,...)
void CL_Drop(void)
Ensures the right menu cvars are set after error drop or map change.
void Com_Error(int code, const char *fmt,...)
void Q_strncpyz(char *dest, const char *src, size_t destsize)
Safe strncpy that ensures a trailing zero.
static void CL_ParseConfigString(dbuffer *msg)
static char const *const svc_strings[]
see also svc_ops_e in common.h
int NET_ReadString(dbuffer *buf, char *string, size_t length)
model_t * model_draw[MAX_MODELS]
event_t
Possible event values.
int NET_ReadShort(dbuffer *buf)
void Com_DPrintf(int level, const char *fmt,...)
A Com_Printf that only shows up if the "developer" cvar is set.
struct net_stream * netStream
model_t * R_FindModel(const char *name)
Tries to load a model.
const char * CL_PlayerGetName(unsigned int player)
Get the player name.
const struct cBspModel_s * model_clip[MAX_MODELS]
#define MAX_SVC_DISCONNECT
#define MAX_SVC_RECONNECT
cBspModel_t * CM_InlineModel(const mapTiles_t *mapTiles, const char *name)
Searches all inline models and return the cBspModel_t pointer for the given modelnumber or -name...
clientinfo_t clientinfo[MAX_CLIENTS]
#define MAX_SVC_STUFFTEXT
void CL_SetClientState(connstate_t state)
Sets the client state.
static void CL_ParseServerData(dbuffer *msg)
Written by SV_New_f in sv_user.c.
void NET_WriteByte(dbuffer *buf, byte c)
int CL_GetPlayerNum(void)
static void CL_ParseClientinfo(unsigned int player)
Parses client names that are displayed on the targeting box for multiplayer games.
event_t CL_ParseEvent(dbuffer *msg)
Called in case a svc_event was send via the network buffer.
char * CL_SetConfigString(int index, dbuffer *msg)
void Cbuf_Execute(void)
Pulls off terminated lines of text from the command buffer and sends them through Cmd_ExecuteString...
void CL_ParseServerMessage(svc_ops_t cmd, dbuffer *msg)
Parses the server sent data from the given buffer.
int NET_ReadByte(dbuffer *buf)
Reads a byte from the netchannel.
void HUD_DisplayMessage(const char *text)
Displays a message on the hud.
int CL_Milliseconds(void)
void NET_WriteMsg(struct net_stream *s, dbuffer &buf)
Enqueue the buffer in the net stream for ONE client.