cp_team.h File Reference

Team management for the campaign gametype headers. More...

This graph shows which files directly or indirectly include this file:

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.

Detailed Description

Team management for the campaign gametype headers.

Definition in file cp_team.h.


Function Documentation

void CL_CleanTempInventory ( base_t base  ) 
void CL_CleanupAircraftCrew ( aircraft_t aircraft,
equipDef_t ed 
)

Reloads weapons, removes not assigned and resets defaults.

Parameters:
[in] aircraft Pointer to an aircraft for given team.
[in] ed equipDef_t pointer to equipment
See also:
CL_AddWeaponAmmo
Note:
Iterate through in container order (right hand, left hand, belt, holster, backpack) at the top level, i.e. each squad member reloads the right hand, then each reloads the left hand, etc. The effect of this is that when things are tight, everyone has the opportunity to get their preferred weapon(s) loaded before anyone is allowed to keep her spares in the backpack or on the floor. We don't want the first person in the squad filling their backpack with spare ammo leaving others with unloaded guns in their hands...

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.

Parameters:
[in] aircraft Pointer to an aircraft for a desired team.
[in] employeeType Type of employee for which data is being updated.
Returns:
the number of employees that are in the aircraft and were added to the character list

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().


Generated by  doxygen 1.6.2