|
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). | |
| void | CP_UpdateActorAircraftVar (aircraft_t *aircraft, employeeType_t employeeType) |
| Updates data about teams in aircraft. | |
| void | CP_CleanupAircraftTeam (aircraft_t *aircraft, equipDef_t *ed) |
| Reloads weapons, removes not assigned and resets defaults. | |
| void | CP_CleanupTeam (base_t *base, equipDef_t *ed) |
| Reloads weapons, removes not assigned and resets defaults. | |
| void | CP_SetEquipContainer (character_t *chr) |
| Set up equip (floor) container for soldiers. | |
| void | CP_AddWeaponAmmo (equipDef_t *ed, Item *item) |
| Updates status of weapon (sets pointers, reloads, etc). | |
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 Item::ammoDef(), cgi, DEBUG_CLIENT, Item::def(), Item::getAmmoLeft(), i, objDef_t::idx, INVSH_GetItemByIDX(), objDef_t::isLoadableInWeapon(), NONE_AMMO, equipDef_t::numItems, equipDef_t::numItemsLoose, Item::setAmmoDef(), Item::setAmmoLeft(), and type.
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_t::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_t::acTeam, cgi, CID_MAX, CP_CleanupContainerWeapons(), Item::def(), Inventory::getRightHandContainer(), character_t::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_t::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_t::inv, Inventory::resetContainer(), and Inventory::setContainer().
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_t::bodySkin, cgi, Employee::chr, CHRSH_CharGetBody(), CHRSH_CharGetHead(), character_t::headSkin, aircraft_t::maxTeamSize, and character_t::name.
Referenced by AIR_AircraftSelect(), and CP_TEAM_AssignSoldierByUCN_f().