Multiplayer game type code. More...
#include "client.h"
#include "cl_game.h"
#include "cl_team.h"
#include "cl_inventory.h"
#include "multiplayer/mp_callbacks.h"
#include "multiplayer/mp_serverlist.h"
#include "multiplayer/mp_team.h"
#include "ui/ui_main.h"
#include "ui/ui_popup.h"
#include "battlescape/cl_hud.h"
#include "battlescape/cl_parse.h"
Go to the source code of this file.
Functions | |
void | GAME_MP_AutoTeam (void) |
void | GAME_MP_StartBattlescape (qboolean isTeamPlay) |
void | GAME_MP_EndRoundAnnounce (int playerNum, int team) |
static void | GAME_MP_StartServer_f (void) |
Starts a server and checks if the server loads a team unless he is a dedicated server admin. | |
static void | GAME_MP_UpdateGametype_f (void) |
Update the menu values with current gametype values. | |
static void | GAME_MP_ChangeGametype_f (void) |
Switch to the next multiplayer game type. | |
void | GAME_MP_Results (struct dbuffer *msg, int winner, int *numSpawned, int *numAlive, int numKilled[][MAX_TEAMS], int numStunned[][MAX_TEAMS]) |
After a mission was finished this function is called. | |
const mapDef_t * | GAME_MP_MapInfo (int step) |
int | GAME_MP_GetTeam (void) |
equipDef_t * | GAME_MP_GetEquipmentDefinition (void) |
void | GAME_MP_InitStartup (void) |
void | GAME_MP_Shutdown (void) |
Variables | |
static equipDef_t | equipDefMultiplayer |
Multiplayer game type code.
Definition in file cl_game_multiplayer.c.
void GAME_MP_AutoTeam | ( | void | ) |
Definition at line 38 of file cl_game_multiplayer.c.
References GAME_GenerateTeam(), GAME_GetCharacterArraySize(), GAME_GetTeamDef(), and INV_GetEquipmentDefinitionByID().
Referenced by GAME_MP_StartServer_f(), and MP_AutoTeam_f().
static void GAME_MP_ChangeGametype_f | ( | void | ) | [static] |
Switch to the next multiplayer game type.
Definition at line 127 of file cl_game_multiplayer.c.
References cls, Cmd_Argv(), Com_GetMapDefByIDX(), Com_Printf(), Com_SetGameType(), client_static_s::currentSelectedMap, Cvar_Set(), linkedList_s::data, mapDef_s::gameTypes, gt, gts, i, gametype_s::id, mapDef_s::multiplayer, linkedList_s::next, next, numGTs, qfalse, qtrue, cvar_s::string, and sv_gametype.
Referenced by GAME_MP_InitStartup().
void GAME_MP_EndRoundAnnounce | ( | int | playerNum, | |
int | team | |||
) |
Definition at line 52 of file cl_game_multiplayer.c.
References _, cl, CL_PlayerGetName(), Com_sprintf(), and HUD_DisplayMessage().
equipDef_t* GAME_MP_GetEquipmentDefinition | ( | void | ) |
Definition at line 285 of file cl_game_multiplayer.c.
int GAME_MP_GetTeam | ( | void | ) |
Definition at line 278 of file cl_game_multiplayer.c.
References cl_team, and cvar_s::integer.
void GAME_MP_InitStartup | ( | void | ) |
Definition at line 290 of file cl_game_multiplayer.c.
References chrDisplayList, Cmd_AddCommand(), Cvar_ForceSet(), Cvar_Set(), Cvar_VariableStringOld(), GAME_MP_ChangeGametype_f(), GAME_MP_StartServer_f(), GAME_MP_UpdateGametype_f(), MP_CallbacksInit(), MP_ServerListInit(), and chr_list_s::num.
const mapDef_t* GAME_MP_MapInfo | ( | int | step | ) |
Definition at line 245 of file cl_game_multiplayer.c.
References _, cls, Com_Error(), Com_GetMapDefByIDX(), client_static_s::currentSelectedMap, Cvar_Set(), linkedList_s::data, ERR_DROP, mapDef_s::gameTypes, i, LIST_ContainsString(), mapDef_s::multiplayer, linkedList_s::next, client_static_s::numMDs, Q_strcat(), cvar_s::string, sv_gametype, and va().
void GAME_MP_Results | ( | struct dbuffer * | msg, | |
int | winner, | |||
int * | numSpawned, | |||
int * | numAlive, | |||
int | numKilled[][MAX_TEAMS], | |||
int | numStunned[][MAX_TEAMS] | |||
) |
After a mission was finished this function is called.
msg | The network message buffer | |
winner | The winning team | |
numSpawned | The amounts of all spawned actors per team | |
numAlive | The amount of survivors per team | |
numKilled | The amount of killed actors for all teams. The first dimension contains the attacker team, the second the victim team | |
numStunned | The amount of stunned actors for all teams. The first dimension contains the attacker team, the second the victim team |
Definition at line 214 of file cl_game_multiplayer.c.
References _, CL_Drop(), cls, Com_sprintf(), i, lengthof, popupText, client_static_s::team, UI_MAX_SMALLTEXTLEN, and UI_Popup().
void GAME_MP_Shutdown | ( | void | ) |
Definition at line 314 of file cl_game_multiplayer.c.
References Cmd_RemoveCommand(), MP_CallbacksShutdown(), MP_ServerListShutdown(), qfalse, SV_Shutdown(), and teamData.
void GAME_MP_StartBattlescape | ( | qboolean | isTeamPlay | ) |
Definition at line 46 of file cl_game_multiplayer.c.
References qtrue, UI_ExecuteConfunc(), and UI_InitStack().
static void GAME_MP_StartServer_f | ( | void | ) | [static] |
Starts a server and checks if the server loads a team unless he is a dedicated server admin.
Definition at line 72 of file cl_game_multiplayer.c.
References _, chrDisplayList, cls, Cmd_ExecuteString(), Com_GetMapDefByIDX(), Com_sprintf(), client_static_s::currentMD, client_static_s::currentSelectedMap, Cvar_GetInteger(), Cvar_GetValue(), Cvar_Set(), Cvar_SetValue(), GAME_MP_AutoTeam(), mapDef_s::hurtAliens, cvar_s::integer, mapDef_s::map, map, MAX_VAR, mapDef_s::multiplayer, chr_list_s::num, mapDef_s::param, qfalse, qtrue, sv_dedicated, mapDef_s::teams, UI_InitStack(), and UI_Popup().
Referenced by GAME_MP_InitStartup().
static void GAME_MP_UpdateGametype_f | ( | void | ) | [static] |
Update the menu values with current gametype values.
Definition at line 118 of file cl_game_multiplayer.c.
References Com_SetGameType().
Referenced by GAME_MP_InitStartup().
equipDef_t equipDefMultiplayer [static] |
Definition at line 283 of file cl_game_multiplayer.c.