26 #include "../../cl_shared.h"
27 #include "../../cl_team.h"
53 cgi->Com_DPrintf(
DEBUG_CLIENT,
"CL_AddWeaponAmmo: oneshot weapon '%s'.\n", type->
id);
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);
void setAmmoLeft(int value)
const objDef_t * INVSH_GetItemByID(const char *id)
Returns the item that belongs to the given id or nullptr if it wasn't found.
QGL_EXTERN GLint GLenum type
#define E_Foreach(employeeType, var)
void resetContainer(const containerIndex_t idx)
Item * getContainer2(const containerIndex_t idx) const
const objDef_t * def(void) const
Inventory ** ui_inventory
const char * CHRSH_CharGetBody(const character_t *const chr)
Returns the body model for the soldiers for armoured and non armoured soldiers.
Defines all attributes of objects used in the inventory.
void CP_UpdateActorAircraftVar(aircraft_t *aircraft, employeeType_t employeeType)
Updates data about teams in aircraft.
A base with all it's data.
item instance data, with linked list capability
cvar_t *IMPORT * Cvar_Set(const char *varName, const char *value,...) __attribute__((format(__printf__
inventory definition with all its containers
Item * getRightHandContainer() const
const cgame_import_t * cgi
employeeType_t
The types of employees.
Employee * AIR_GetPilot(const aircraft_t *aircraft)
Get pilot of an aircraft.
const invDef_t * def() const
#define INVDEF(containerID)
const char * CHRSH_CharGetHead(const character_t *const chr)
Returns the head model for the soldiers for armoured and non armoured soldiers.
const Container & getContainer(const containerIndex_t idx) const
bool isLoadableInWeapon(const objDef_s *weapon) const
Checks if an item can be used to reload a weapon.
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_CleanupTeam(base_t *base, equipDef_t *ed)
Reloads weapons, removes not assigned and resets defaults.
int AIR_GetTeamSize(const aircraft_t *aircraft)
Counts the number of soldiers in given aircraft.
int numItems[MAX_OBJDEFS]
void setAmmoDef(const objDef_t *od)
const objDef_t * ammoDef(void) const
#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 ...
Header file for single player campaign control.
byte numItemsLoose[MAX_OBJDEFS]
const objDef_t * INVSH_GetItemByIDX(int index)
Returns the item that belongs to the given index or nullptr if the index is invalid.
void CP_CleanTempInventory(base_t *base)
Clears all containers that are temp containers (see script definition).
An aircraft with all it's data.
Team management for the campaign gametype headers.
void setContainer(const containerIndex_t idx, Item *cont)
const struct objDef_s * weapons[MAX_WEAPONS_PER_OBJDEF]
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.
Describes a character with all its attributes.