Team management for the campaign gametype headers. More...
Go to the source code of this file.
Functions | |
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. | |
void | CL_CleanupAircraftCrew (aircraft_t *aircraft, equipDef_t *equip) |
Reloads weapons, removes not assigned and resets defaults. |
Team management for the campaign gametype headers.
Definition in file cp_team.h.
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().