Serverlist menu callbacks for multiplayer. More...
#include "../client.h"
#include "../cl_team.h"
#include "../ui/ui_main.h"
#include "../ui/ui_popup.h"
#include "mp_callbacks.h"
#include "mp_serverlist.h"
#include "mp_team.h"
Go to the source code of this file.
Functions | |
void | CL_Connect_f (void) |
static void | CL_RconCallback (struct net_stream *s) |
void | CL_Rcon_f (void) |
void | CL_Disconnect_f (void) |
Binding for disconnect console command. | |
void | CL_Reconnect_f (void) |
The server is changing levels. | |
static void | CL_SelectTeam_Init_f (void) |
Send the teaminfo string to server. | |
static void | CL_TeamNum_f (void) |
Increase or decrease the teamnum. | |
static int | CL_CompleteNetworkAddress (const char *partial, const char **match) |
Autocomplete function for some network functions. | |
void | MP_CallbacksInit (void) |
void | MP_CallbacksShutdown (void) |
Variables | |
teamData_t | teamData |
static cvar_t * | rcon_client_password |
static cvar_t * | rcon_address |
static cvar_t * | info_password |
Serverlist menu callbacks for multiplayer.
Definition in file mp_callbacks.c.
static int CL_CompleteNetworkAddress | ( | const char * | partial, | |
const char ** | match | |||
) | [static] |
Autocomplete function for some network functions.
Definition at line 251 of file mp_callbacks.c.
References Cmd_GenericCompleteFunction(), Com_Printf(), Cvar_GetString(), i, len, MAX_BOOKMARKS, MAX_COMPLETE, and va().
Referenced by MP_CallbacksInit().
void CL_Connect_f | ( | void | ) |
Definition at line 39 of file mp_callbacks.c.
References _, ca_connecting, chrDisplayList, CL_Disconnect(), CL_SetClientState(), cls, Cmd_Argc(), Cmd_Argv(), Com_Printf(), Cvar_GetInteger(), DOUBLEQUOTE, MAX_VAR, MP_LoadDefaultTeamMultiplayer(), serverList_s::node, chr_list_s::num, PORT_SERVER, Q_strncpyz(), qfalse, selectedServer, client_static_s::servername, client_static_s::serverport, serverList_s::service, SV_Shutdown(), UI_InitStack(), UI_Popup(), and UI_PushWindow().
Referenced by MP_CallbacksInit().
void CL_Disconnect_f | ( | void | ) |
Binding for disconnect console command.
Definition at line 148 of file mp_callbacks.c.
References CL_Drop(), and SV_ShutdownWhenEmpty().
Referenced by MP_CallbacksInit().
void CL_Rcon_f | ( | void | ) |
Send the rest of the command line over as an unconnected command.
Definition at line 104 of file mp_callbacks.c.
References ca_connected, CL_RconCallback(), cls, Cmd_Argc(), Cmd_Args(), Cmd_Argv(), Com_Printf(), Com_sprintf(), DOUBLEQUOTE, MAX_STRING_CHARS, NET_Connect(), NET_OOB_Printf(), NET_StreamSetCallback(), client_static_s::netStream, port, PORT_SERVER, client_static_s::state, and cvar_s::string.
Referenced by MP_CallbacksInit().
static void CL_RconCallback | ( | struct net_stream * | s | ) | [static] |
Definition at line 83 of file mp_callbacks.c.
References clc_oob, Com_Printf(), NET_ReadByte(), NET_ReadMsg(), NET_ReadString(), NET_ReadStringLine(), and NET_StreamFree().
Referenced by CL_Rcon_f().
void CL_Reconnect_f | ( | void | ) |
The server is changing levels.
Definition at line 157 of file mp_callbacks.c.
References ca_connecting, CL_Disconnect(), CL_Milliseconds(), CL_SetClientState(), cls, Com_Printf(), Com_ServerState(), client_static_s::connectTime, client_static_s::servername, and client_static_s::state.
Referenced by MP_CallbacksInit().
static void CL_SelectTeam_Init_f | ( | void | ) | [static] |
Send the teaminfo string to server.
Definition at line 181 of file mp_callbacks.c.
References _, cls, Com_ServerState(), Cvar_Set(), NET_OOB_Printf(), client_static_s::netStream, PROTOCOL_VERSION, TEXT_STANDARD, UI_RegisterText(), and UI_ResetData().
Referenced by CL_TeamNum_f(), and MP_CallbacksInit().
static void CL_TeamNum_f | ( | void | ) | [static] |
Increase or decrease the teamnum.
Definition at line 199 of file mp_callbacks.c.
References _, CL_SelectTeam_Init_f(), cl_teamnum, Cmd_Argv(), Com_DPrintf(), Com_sprintf(), Cvar_SetValue(), DEBUG_CLIENT, i, cvar_s::integer, MAX_STRING_CHARS, teamData_s::maxPlayersPerTeam, teamData_s::maxteams, cvar_s::modified, qfalse, TEAM_CIVILIAN, TEAM_DEFAULT, teamData_s::teamCount, TEXT_STANDARD, and UI_RegisterText().
Referenced by MP_CallbacksInit().
void MP_CallbacksInit | ( | void | ) |
Definition at line 282 of file mp_callbacks.c.
References CL_CompleteNetworkAddress(), CL_Connect_f(), CL_Disconnect_f(), CL_PingServers_f(), CL_Rcon_f(), CL_Reconnect_f(), CL_SelectTeam_Init_f(), CL_TeamNum_f(), Cmd_AddCommand(), Cmd_AddParamCompleteFunction(), Cvar_Get(), CVAR_USERINFO, MP_AutoTeam_f(), MP_LoadTeamMultiplayer_f(), MP_MultiplayerTeamSlotComments_f(), MP_SaveTeamMultiplayer_f(), MP_SaveTeamState_f(), MP_TeamSelect_f(), MP_ToggleActorForTeam_f(), and MP_UpdateMenuParameters_f().
Referenced by GAME_MP_InitStartup().
void MP_CallbacksShutdown | ( | void | ) |
Definition at line 307 of file mp_callbacks.c.
References Cmd_RemoveCommand().
Referenced by GAME_MP_Shutdown().
cvar_t* info_password [static] |
Definition at line 37 of file mp_callbacks.c.
cvar_t* rcon_address [static] |
Definition at line 36 of file mp_callbacks.c.
cvar_t* rcon_client_password [static] |
Definition at line 35 of file mp_callbacks.c.
Definition at line 34 of file mp_callbacks.c.
Referenced by CL_ParseTeamInfoMessage(), and GAME_MP_Shutdown().