26#include "../../cl_shared.h"
27#include "../../cl_team.h"
47 if (
type->weapons[0]) {
49 if (!
type->isAmmo()) {
142 if (uiInv && uiInv != &chr->
inv) {
166 cgi->Com_Error(
ERR_DROP,
"Could not remove item from inventory");
191 if (!employee->isHiredInBase(base))
193 if (employee->transfer)
199 if (employee->getUGV()) {
202 if (!rightH || !rightH->
def())
204 cgi->GAME_GetChrMaxLoad(chr));
210 if (!employee->isHiredInBase(base))
212 if (employee->transfer)
218 if (
INVDEF(container)->temp)
249 if (employee->getUGV()) {
252 if (!rightH || !rightH->
def())
254 cgi->GAME_GetChrMaxLoad(chr));
260 if (
INVDEF(container)->temp)
276 employee->chr.inv.resetTempContainers();
280 employee->chr.inv.resetTempContainers();
306 cgi->
Cvar_Set(
"mn_hired_count",
"%i", numOnAircraft);
const char * CHRSH_CharGetBody(const character_t *const chr)
Returns the body model for the soldiers for armoured and non armoured soldiers.
const char * CHRSH_CharGetHead(const character_t *const chr)
Returns the head model for the soldiers for armoured and non armoured soldiers.
#define INVDEF(containerID)
const invDef_t * def() const
inventory definition with all its containers
Item * getRightHandContainer() const
void setContainer(const containerIndex_t idx, Item *cont)
void resetContainer(const containerIndex_t idx)
const Container & getContainer(const containerIndex_t idx) const
Item * getContainer2(const containerIndex_t idx) const
item instance data, with linked list capability
const objDef_t * ammoDef(void) const
void setAmmoDef(const objDef_t *od)
const objDef_t * def(void) const
void setAmmoLeft(int value)
Employee * AIR_GetPilot(const aircraft_t *aircraft)
Get pilot of an aircraft.
int AIR_GetTeamSize(const aircraft_t *aircraft)
Counts the number of soldiers in given aircraft.
Header file for single player campaign control.
const cgame_import_t * cgi
employeeType_t
The types of employees.
#define E_Foreach(employeeType, var)
void CP_SetEquipContainer(character_t *chr)
Set up equip (floor) container for soldiers.
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_UpdateActorAircraftVar(aircraft_t *aircraft, employeeType_t employeeType)
Updates data about teams in aircraft.
static void CP_CleanupContainerWeapons(equipDef_t *ed, containerIndex_t container, character_t *chr)
Reload or remove weapons in container.
void CP_AddWeaponAmmo(equipDef_t *ed, Item *item)
Updates status of weapon (sets pointers, reloads, etc).
void CP_CleanTempInventory(base_t *base)
Clears all containers that are temp containers (see script definition).
Team management for the campaign gametype headers.
const objDef_t * INVSH_GetItemByIDX(int index)
Returns the item that belongs to the given index or nullptr if the index is invalid.
const objDef_t * INVSH_GetItemByID(const char *id)
Returns the item that belongs to the given id or nullptr if it wasn't found.
#define LIST_Foreach(list, type, var)
Iterates over a linked list, it's safe to delete the returned entry from the list while looping over ...
QGL_EXTERN GLint GLenum type
An aircraft with all it's data.
A base with all it's data.
Inventory ** ui_inventory
cvar_t *IMPORT * Cvar_Set(const char *varName, const char *value,...) __attribute__((format(__printf__
Describes a character with all its attributes.
int numItems[MAX_OBJDEFS]
byte numItemsLoose[MAX_OBJDEFS]
Defines all attributes of objects used in the inventory.
bool isLoadableInWeapon(const objDef_s *weapon) const
Checks if an item can be used to reload a weapon.