Team management for the campaign gametype. More...
#include "../client.h"
#include "../cl_team.h"
#include "cp_campaign.h"
#include "cp_team.h"
Go to the source code of this file.
Functions | |
static item_t | CP_AddWeaponAmmo (equipDef_t *ed, item_t item) |
Updates status of weapon (sets pointers, reloads, etc). | |
void | CL_CleanupAircraftCrew (aircraft_t *aircraft, equipDef_t *ed) |
Reloads weapons, removes not assigned and resets defaults. | |
void | CL_CleanTempInventory (base_t *base) |
Clears all containers that are temp containers (see script definition). | |
int | CL_UpdateActorAircraftVar (aircraft_t *aircraft, employeeType_t employeeType) |
Updates data about teams in aircraft. |
Team management for the campaign gametype.
Definition in file cp_team.c.
void CL_CleanTempInventory | ( | base_t * | base | ) |
Clears all containers that are temp containers (see script definition).
Definition at line 206 of file cp_team.c.
References base_s::bEquipment, inventory_s::c, ccs, employee_s::chr, cls, csi, inventoryInterface_s::DestroyInventory, EMPL_ROBOT, EMPL_SOLDIER, ccs_s::employees, client_static_s::i, character_s::i, i, INVDEF, MAX_EMPLOYEES, and csi_s::numIDs.
Referenced by CL_UpdateEquipmentMenuParameters_f(), CP_StartSelectedMission(), and GAME_CP_Spawn().
void CL_CleanupAircraftCrew | ( | aircraft_t * | aircraft, | |
equipDef_t * | ed | |||
) |
Reloads weapons, removes not assigned and resets defaults.
[in] | aircraft | Pointer to an aircraft for given team. |
[in] | ed | equipDef_t pointer to equipment |
Definition at line 153 of file cp_team.c.
References aircraft_s::acTeam, AIR_GetTeamSize(), employee_s::chr, cls, Com_DPrintf(), Com_Error(), CONTAINER, CP_AddWeaponAmmo(), csi, linkedList_s::data, DEBUG_CLIENT, inventoryInterface_s::EquipActorRobot, ERR_DROP, client_static_s::i, objDef_s::idx, aircraft_s::idx, INVDEF, INVSH_GetItemByID(), invList_s::item, invList_s::next, next, linkedList_s::next, csi_s::numIDs, equipDef_s::numItems, inventoryInterface_s::RemoveFromInventory, RIGHT, item_s::t, employee_s::ugv, and ugv_s::weapon.
Referenced by CL_UpdateEquipmentMenuParameters_f(), and CP_StartSelectedMission().
int CL_UpdateActorAircraftVar | ( | aircraft_t * | aircraft, | |
employeeType_t | employeeType | |||
) |
Updates data about teams in aircraft.
[in] | aircraft | Pointer to an aircraft for a desired team. |
[in] | employeeType | Type of employee for which data is being updated. |
Definition at line 231 of file cp_team.c.
References _, aircraft_s::acTeam, AIR_GetTeamSize(), chr_list_s::chr, employee_s::chr, chrDisplayList, CHRSH_CharGetBody(), CHRSH_CharGetHead(), Com_DPrintf(), Com_Error(), Cvar_Set(), linkedList_s::data, DEBUG_CLIENT, ERR_DROP, i, lengthof, aircraft_s::maxTeamSize, character_s::name, linkedList_s::next, chr_list_s::num, aircraft_s::pilot, character_s::skin, employee_s::type, and va().
Referenced by AIR_AircraftSelect(), CL_AssignPilot_f(), CL_AssignSoldier_f(), CL_UpdateEmployeeList(), and CL_UpdateEquipmentMenuParameters_f().
static item_t CP_AddWeaponAmmo | ( | equipDef_t * | ed, | |
item_t | item | |||
) | [static] |
Updates status of weapon (sets pointers, reloads, etc).
[in] | ed | Pointer to equipment definition. |
[in] | item | An item to update. |
Definition at line 38 of file cp_team.c.
References item_s::a, objDef_s::ammo, Com_DPrintf(), csi, DEBUG_CLIENT, i, objDef_s::id, objDef_s::idx, INVSH_GetItemByIDX(), INVSH_LoadableInWeapon(), item_s::m, NONE_AMMO, equipDef_s::numItems, equipDef_s::numItemsLoose, csi_s::numODs, objDef_s::oneshot, objDef_s::reload, item_s::t, type, and objDef_s::weapons.
Referenced by CL_CleanupAircraftCrew().