UFO: Alien Invasion
|
Team management for the campaign gametype headers. More...
Go to the source code of this file.
Functions | |
void | CP_CleanTempInventory (base_t *base) |
Clears all containers that are temp containers (see script definition). More... | |
void | CP_UpdateActorAircraftVar (aircraft_t *aircraft, employeeType_t employeeType) |
Updates data about teams in aircraft. More... | |
void | CP_CleanupAircraftTeam (aircraft_t *aircraft, equipDef_t *ed) |
Reloads weapons, removes not assigned and resets defaults. More... | |
void | CP_CleanupTeam (base_t *base, equipDef_t *ed) |
Reloads weapons, removes not assigned and resets defaults. More... | |
void | CP_SetEquipContainer (character_t *chr) |
Set up equip (floor) container for soldiers. More... | |
void | CP_AddWeaponAmmo (equipDef_t *ed, Item *item) |
Updates status of weapon (sets pointers, reloads, etc). More... | |
Team management for the campaign gametype headers.
Definition in file cp_team.h.
void CP_AddWeaponAmmo | ( | equipDef_t * | ed, |
Item * | item | ||
) |
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.cpp.
References objDef_s::ammo, Item::ammoDef(), cgi, cgame_import_s::csi, DEBUG_CLIENT, Item::def(), Item::getAmmoLeft(), i, objDef_s::id, objDef_s::idx, INVSH_GetItemByIDX(), objDef_s::isAmmo(), objDef_s::isArmour(), objDef_s::isLoadableInWeapon(), NONE_AMMO, equipDef_s::numItems, equipDef_s::numItemsLoose, csi_s::numODs, Item::setAmmoDef(), Item::setAmmoLeft(), type, and objDef_s::weapons.
Referenced by CP_CleanupContainerWeapons().
Clears all containers that are temp containers (see script definition).
Definition at line 273 of file cp_team.cpp.
References base_s::bEquipment, cgi, E_Foreach, EMPL_ROBOT, and EMPL_SOLDIER.
Referenced by CP_StartSelectedMission(), CP_TEAM_DeEquipActor_f(), CP_TEAM_FillEquipSoldierList_f(), and GAME_CP_Spawn().
void CP_CleanupAircraftTeam | ( | 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 240 of file cp_team.cpp.
References aircraft_s::acTeam, cgi, CID_MAX, CP_CleanupContainerWeapons(), Item::def(), Inventory::getRightHandContainer(), character_s::inv, INVDEF, INVSH_GetItemByID(), and LIST_Foreach.
Referenced by CP_StartSelectedMission().
void CP_CleanupTeam | ( | base_t * | base, |
equipDef_t * | ed | ||
) |
Reloads weapons, removes not assigned and resets defaults.
[in] | base | Pointer to a base for given team. |
[in] | ed | equipDef_t pointer to equipment |
Definition at line 185 of file cp_team.cpp.
References cgi, CID_MAX, CP_CleanupContainerWeapons(), Item::def(), E_Foreach, EMPL_ROBOT, EMPL_SOLDIER, Inventory::getRightHandContainer(), character_s::inv, INVDEF, and INVSH_GetItemByID().
Referenced by CP_TEAM_DeEquipActor_f(), and CP_TEAM_FillEquipSoldierList_f().
void CP_SetEquipContainer | ( | character_t * | chr | ) |
Set up equip (floor) container for soldiers.
[in,out] | chr | Pointer to soldiers character structure |
Definition at line 137 of file cp_team.cpp.
References cgi, CID_EQUIP, Inventory::getContainer2(), character_s::inv, Inventory::resetContainer(), Inventory::setContainer(), and cgame_import_s::ui_inventory.
Referenced by CP_TEAM_FillEquipSoldierList_f(), CP_TEAM_SelectActorByUCN_f(), and HOS_Init_f().
void CP_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 296 of file cp_team.cpp.
References _, AIR_GetPilot(), AIR_GetTeamSize(), character_s::bodySkin, cgi, Employee::chr, CHRSH_CharGetBody(), CHRSH_CharGetHead(), cgame_import_s::Cvar_Set(), character_s::headSkin, aircraft_s::maxTeamSize, and character_s::name.
Referenced by AIR_AircraftSelect(), and CP_TEAM_AssignSoldierByUCN_f().