mp_team.c File Reference

Multiplayer team management. More...

#include "../cl_shared.h"
#include "../cl_game.h"
#include "../cl_inventory.h"
#include "../cl_team.h"
#include "../ui/ui_main.h"
#include "../ui/ui_popup.h"
#include "../ui/node/ui_node_container.h"
#include "mp_team.h"
#include "save_multiplayer.h"
Include dependency graph for mp_team.c:

Go to the source code of this file.

Data Structures

struct  mpSaveFileHeader_s

Defines

#define MPTEAM_SAVE_FILE_VERSION   4

Typedefs

typedef struct mpSaveFileHeader_s mpSaveFileHeader_t

Functions

static void MP_UpdateActiveTeamList (void)
void MP_AutoTeam_f (void)
void MP_ToggleActorForTeam_f (void)
 This will activate/deactivate the actor for the team.
void MP_SaveTeamState_f (void)
 Will remove those actors that should not be used in the team.
void MP_MultiplayerTeamSlotComments_f (void)
 Reads tha comments from team files.
static void MP_SaveTeamMultiplayerInfo (mxml_node_t *p)
 Stores the wholeTeam into a xml structure.
static void MP_LoadTeamMultiplayerInfo (mxml_node_t *p)
 Loads the wholeTeam from the xml file.
static qboolean MP_SaveTeamMultiplayer (const char *filename, const char *name)
 Saves a multiplayer team in xml format.
void MP_SaveTeamMultiplayer_f (void)
 Stores a team in a specified teamslot (multiplayer).
static qboolean MP_LoadTeamMultiplayer (const char *filename)
 Load a multiplayer team from an xml file.
qboolean MP_LoadDefaultTeamMultiplayer (void)
void MP_LoadTeamMultiplayer_f (void)
 Loads the selected teamslot.
static void MP_GetEquipment (void)
 Get the equipment definition (from script files) for the current selected multiplayer team and updates the equipment inventory containers.
void MP_UpdateMenuParameters_f (void)
 Displays actor info and equipment and unused items in proper (filter) category.
void MP_TeamSelect_f (void)

Variables

static inventory_t mp_inventory
static qboolean characterActive [MAX_ACTIVETEAM]

Detailed Description

Multiplayer team management.

Definition in file mp_team.c.


Define Documentation

#define MPTEAM_SAVE_FILE_VERSION   4

< ui_inventory

Definition at line 36 of file mp_team.c.

Referenced by MP_LoadTeamMultiplayer(), MP_MultiplayerTeamSlotComments_f(), and MP_SaveTeamMultiplayer().


Typedef Documentation


Function Documentation

void MP_AutoTeam_f ( void   ) 

Definition at line 60 of file mp_team.c.

References GAME_MP_AutoTeam(), and MP_UpdateActiveTeamList().

Referenced by MP_CallbacksInit().

static void MP_GetEquipment ( void   )  [static]

Get the equipment definition (from script files) for the current selected multiplayer team and updates the equipment inventory containers.

Definition at line 402 of file mp_team.c.

References chr_list_s::chr, chrDisplayList, cl_team, Com_sprintf(), Com_ValueToStr(), GAME_GetEquipmentDefinition(), character_s::i, cvar_s::integer, INV_GetEquipmentDefinitionByID(), MAX_VAR, chr_list_s::num, UI_ContainerNodeUpdateEquipment(), ui_inventory, and V_TEAM.

Referenced by MP_UpdateMenuParameters_f().

qboolean MP_LoadDefaultTeamMultiplayer ( void   ) 

Definition at line 373 of file mp_team.c.

References MP_LoadTeamMultiplayer().

Referenced by CL_Connect_f().

static qboolean MP_LoadTeamMultiplayer ( const char *  filename  )  [static]
void MP_LoadTeamMultiplayer_f ( void   ) 

Loads the selected teamslot.

Definition at line 381 of file mp_team.c.

References Cmd_Argc(), Cmd_Argv(), Com_Printf(), Com_sprintf(), MAX_OSPATH, and MP_LoadTeamMultiplayer().

Referenced by MP_CallbacksInit().

static void MP_LoadTeamMultiplayerInfo ( mxml_node_t p  )  [static]
void MP_MultiplayerTeamSlotComments_f ( void   ) 
static qboolean MP_SaveTeamMultiplayer ( const char *  filename,
const char *  name 
) [static]
void MP_SaveTeamMultiplayer_f ( void   ) 

Stores a team in a specified teamslot (multiplayer).

Definition at line 250 of file mp_team.c.

References _, chrDisplayList, Cmd_Argc(), Cmd_Argv(), Com_Printf(), Com_sprintf(), Cvar_GetString(), MAX_OSPATH, MP_SaveTeamMultiplayer(), name, chr_list_s::num, UI_Popup(), and va().

Referenced by MP_CallbacksInit().

static void MP_SaveTeamMultiplayerInfo ( mxml_node_t p  )  [static]

Stores the wholeTeam into a xml structure.

Note:
Called by MP_SaveTeamMultiplayer to store the team info
See also:
GAME_SendCurrentTeamSpawningInfo

Definition at line 146 of file mp_team.c.

References chr_list_s::chr, chrDisplayList, CL_SaveCharacterXML(), Com_DPrintf(), DEBUG_CLIENT, i, mxml_AddNode(), chr_list_s::num, and SAVE_MULTIPLAYER_CHARACTER.

Referenced by MP_SaveTeamMultiplayer().

void MP_SaveTeamState_f ( void   ) 

Will remove those actors that should not be used in the team.

See also:
GAME_MP_ToggleActorForTeam_f

Definition at line 93 of file mp_team.c.

References characterActive, chr_list_s::chr, chrDisplayList, i, chr_list_s::num, and character_s::ucn.

Referenced by MP_CallbacksInit().

void MP_TeamSelect_f ( void   ) 
void MP_ToggleActorForTeam_f ( void   ) 

This will activate/deactivate the actor for the team.

See also:
GAME_MP_SaveTeamState_f

Definition at line 71 of file mp_team.c.

References characterActive, chrDisplayList, Cmd_Argc(), Cmd_Argv(), Com_Printf(), and chr_list_s::num.

Referenced by MP_CallbacksInit().

static void MP_UpdateActiveTeamList ( void   )  [static]
void MP_UpdateMenuParameters_f ( void   ) 

Displays actor info and equipment and unused items in proper (filter) category.

Note:
This function is called everytime the multiplayer equipment screen for the team pops up.

Definition at line 433 of file mp_team.c.

References chr_list_s::chr, chrDisplayList, Cvar_Set(), i, lengthof, MP_GetEquipment(), character_s::name, name, chr_list_s::num, TEXT_STANDARD, UI_ResetData(), and va().

Referenced by MP_CallbacksInit().


Variable Documentation

qboolean characterActive[MAX_ACTIVETEAM] [static]

Definition at line 38 of file mp_team.c.


Generated by  doxygen 1.6.2