UFO: Alien Invasion
|
Describes a character with all its attributes. More...
#include <chr_shared.h>
Public Member Functions | |
character_s () | |
void | init () |
Data Fields | |
int | ucn |
char | name [MAX_VAR] |
char | path [MAX_VAR] |
char | body [MAX_VAR] |
char | head [MAX_VAR] |
int | bodySkin |
int | headSkin |
int | HP |
int | minHP |
int | maxHP |
int | STUN |
int | morale |
woundInfo_t | wounds |
int | state |
chrScoreGlobal_t | score |
chrScoreMission_t * | scoreMission |
actorSizeEnum_t | fieldSize |
Inventory | inv |
const teamDef_t * | teamDef |
int | gender |
chrReservations_t | reservedTus |
FiremodeSettings | RFmode |
implant_t | implants [MAX_CHARACTER_IMPLANTS] |
Describes a character with all its attributes.
Definition at line 369 of file chr_shared.h.
character_s::character_s | ( | ) |
void character_s::init | ( | ) |
Definition at line 34 of file chr_shared.cpp.
References ACTOR_HAND_NOT_SET, ACTOR_SIZE_INVALID, body, bodySkin, fieldSize, gender, head, headSkin, HP, implants, Inventory::init(), inv, maxHP, minHP, morale, name, OBJZERO, path, reservedTus, RFmode, score, scoreMission, FiremodeSettings::set(), state, STUN, teamDef, ucn, and wounds.
Referenced by character_s(), CL_GenerateCharacter(), G_ClientReadCharacter(), and Edict::init().
char character_s::body[MAX_VAR] |
Definition at line 373 of file chr_shared.h.
Referenced by CHRSH_CharGetBody(), Com_GetCharacterModel(), G_ClientReadCharacter(), GAME_LoadCharacter(), GAME_NetSendCharacter(), GAME_SaveCharacter(), and init().
int character_s::bodySkin |
Index of skin.
Definition at line 375 of file chr_shared.h.
Referenced by CL_ChangeSkin_f(), CL_CharacterSkillAndScoreCvars(), Com_GetCharacterModel(), CP_TEAM_ChangeSkin_f(), CP_UpdateActorAircraftVar(), G_ClientReadCharacter(), G_EventActorAppear(), GAME_LoadCharacter(), GAME_NetSendCharacter(), GAME_SaveCharacter(), and init().
actorSizeEnum_t character_s::fieldSize |
Definition at line 390 of file chr_shared.h.
Referenced by Com_GetCharacterValues(), G_ClientGetFreeSpawnPointForActorSize(), GAME_LoadCharacter(), GAME_NetSendCharacter(), GAME_SaveCharacter(), and init().
int character_s::gender |
Gender index.
Definition at line 395 of file chr_shared.h.
Referenced by Com_GetCharacterModel(), Com_GetCharacterValues(), G_ClientReadCharacter(), G_EventActorAdd(), G_EventActorAppear(), G_SplashDamage(), GAME_LoadCharacter(), GAME_NetSendCharacter(), GAME_SaveCharacter(), init(), and Touch_HurtTrigger().
char character_s::head[MAX_VAR] |
Definition at line 374 of file chr_shared.h.
Referenced by CHRSH_CharGetHead(), Com_GetCharacterModel(), G_ClientReadCharacter(), GAME_AppendTeamMember(), GAME_LoadCharacter(), GAME_LoadTeamInfo(), GAME_NetSendCharacter(), GAME_SaveCharacter(), and init().
int character_s::headSkin |
Index of skin.
Definition at line 376 of file chr_shared.h.
Referenced by CL_CharacterSkillAndScoreCvars(), Com_GetCharacterModel(), CP_UpdateActorAircraftVar(), G_ClientReadCharacter(), G_EventActorAppear(), GAME_AppendTeamMember(), GAME_LoadCharacter(), GAME_LoadTeamInfo(), GAME_NetSendCharacter(), GAME_SaveCharacter(), and init().
int character_s::HP |
Health points (current ones).
Definition at line 378 of file chr_shared.h.
Referenced by AI_SetStats(), AM_AlienCollect(), AM_CalculateTeamScores(), AM_CheckFire(), AM_DoFight(), AM_UpdateSurivorsAfterBattle(), CHAR_UpdateData(), CHAR_UpdateStats(), CHRSH_CharGenAbilitySkills(), CL_CharacterSkillAndScoreCvars(), G_ClientAssignDefaultActorValues(), G_ClientReadCharacter(), GAME_LoadCharacter(), GAME_NetSendCharacter(), GAME_SaveCharacter(), HOS_Entry(), HOS_GetInjuryLevelString(), HOS_HealCharacter(), HOS_NeedsHealing(), and init().
implant_t character_s::implants[MAX_CHARACTER_IMPLANTS] |
Definition at line 399 of file chr_shared.h.
Referenced by CHRSH_ApplyImplant(), CHRSH_UpdateImplants(), GAME_LoadCharacter(), GAME_SaveCharacter(), and init().
Inventory character_s::inv |
the inventory
Definition at line 392 of file chr_shared.h.
Referenced by AI_SearchGrenade(), AIR_TransferItemsCarriedByCharacterToBase(), AM_DestroyUnitChr(), AM_MoveCharacterInventoryIntoItemCargo(), CHRSH_CharGetBody(), CHRSH_CharGetHead(), CL_ActorCvars(), CL_GenerateCharacter(), CL_GetSkillIndicator(), CP_CleanupAircraftTeam(), CP_CleanupContainerWeapons(), CP_CleanupTeam(), CP_SetEquipContainer(), CP_TEAM_DeEquipActor_f(), E_RemoveInventoryFromStorage(), InventoryInterface::EquipActor(), InventoryInterface::EquipActorNormal(), G_ActorCalculateMaxTU(), G_ActorInvMove(), G_ActorReload(), G_AddItemToFloor(), G_ClientAction(), G_ClientAssignDefaultActorValues(), G_ClientCanReload(), G_ClientGetWeaponFromInventory(), G_ClientReadInventory(), G_ClientShoot(), G_InventoryDropToFloorCheck(), G_InventoryRemoveItemByID(), G_InventoryToFloor(), G_MissionTouch(), G_PrepareShot(), G_ReactionFireCanBeEnabled(), G_SendInventory(), G_SpawnItemOnFloor(), G_UpdateCarriedWeight(), GAME_ActorSelect_f(), GAME_LoadCharacter(), GAME_SaveCharacter(), Edict::getArmour(), Edict::getContainer(), Edict::getFloor(), Edict::getHandItem(), Edict::getLeftHandItem(), Edict::getRightHandItem(), HUD_UpdateActorLoad_f(), init(), INV_UpdateActorLoad_f(), InventoryInterface::PackAmmoAndWeapon(), Edict::resetContainer(), Edict::resetFloor(), Edict::setFloor(), TEST_F(), TR_Add_f(), and Employee::unequip().
int character_s::maxHP |
Maximum health points (as in: 100% == fully healed).
Definition at line 380 of file chr_shared.h.
Referenced by actorL_isinjured(), AM_CalculateTeamScores(), AM_DoFight(), CHAR_UpdateData(), CHAR_UpdateSkills(), CHRSH_CharGenAbilitySkills(), CL_CharacterSkillAndScoreCvars(), G_ActorGetInjuryPenalty(), G_BleedWounds(), G_CheckDeathOrKnockout(), G_ClientReadCharacter(), G_EventActorAppear(), G_IsActorWounded(), GAME_LoadCharacter(), GAME_NetSendCharacter(), GAME_SaveCharacter(), HOS_Entry(), HOS_EntryWoundData(), HOS_GetInjuryLevel(), HOS_GetInjuryLevelString(), HOS_HealCharacter(), HOS_NeedsHealing(), and init().
int character_s::minHP |
Minimum hp during combat
Definition at line 379 of file chr_shared.h.
Referenced by G_CheckDeathOrKnockout(), G_ClientReadCharacter(), and init().
int character_s::morale |
Definition at line 382 of file chr_shared.h.
Referenced by AI_SetStats(), CHAR_UpdateData(), CHRSH_CharGenAbilitySkills(), CHRSH_UpdateCharacterWithEffect(), G_ClientAssignDefaultActorValues(), G_ClientReadCharacter(), GAME_LoadCharacter(), GAME_NetSendCharacter(), GAME_SaveCharacter(), and init().
char character_s::name[MAX_VAR] |
Character name (as in: soldier name).
Definition at line 371 of file chr_shared.h.
Referenced by actorL_tostring(), AIR_DestroyAircraft(), AM_UpdateSurivorsAfterBattle(), B_InitialEquipment(), ReactionFire::canReact(), CHAR_UpdateData(), CHAR_UpdateStats(), CL_ActorDie(), CL_ActorRevitalised(), CL_ActorStateChange(), CL_ActorWound(), CL_AddTargetingBox(), CL_CharacterSkillAndScoreCvars(), Com_GetCharacterValues(), CP_TEAM_FillEquipSoldierList_f(), CP_UpdateActorAircraftVar(), E_ChangeName_f(), G_ActorRevitalise(), G_BleedWounds(), G_ClientReadCharacter(), G_MoraleBehaviour(), G_MoralePanic(), G_MoraleRage(), G_MoraleStopPanic(), G_MoraleStopRage(), G_PrintActorStats(), G_SpawnAIPlayer(), G_TouchEdicts(), GAME_AppendTeamMember(), GAME_LoadCharacter(), GAME_LoadTeamInfo(), GAME_NetSendCharacter(), GAME_SaveCharacter(), HOS_Entry(), HUD_UpdateActorStats(), and init().
char character_s::path[MAX_VAR] |
Definition at line 372 of file chr_shared.h.
Referenced by CHRSH_CharGetBody(), CHRSH_CharGetHead(), Com_GetCharacterModel(), G_ClientReadCharacter(), GAME_LoadCharacter(), GAME_NetSendCharacter(), GAME_SaveCharacter(), and init().
chrReservations_t character_s::reservedTus |
Stores the reserved TUs for actions.
Definition at line 396 of file chr_shared.h.
Referenced by CL_ActorReservationChange(), CL_ActorReservedTUs(), CL_ActorReserveTUs(), CL_GenerateCharacter(), G_ActorHasEnoughTUsReactionFire(), G_ActorReserveTUs(), G_ClientAction(), G_ClientStateChange(), G_Damage(), G_EventActorSendReservations(), G_ReactionFireSettingsReserveTUs(), Edict::getReservedTUs(), HUD_PopupFiremodeReservation(), HUD_SetShootReservation(), and init().
FiremodeSettings character_s::RFmode |
Stores the firemode to be used for reaction fire (if the fireDef allows that)
Definition at line 397 of file chr_shared.h.
Referenced by AI_TryToReloadWeapon(), ReactionFire::canReact(), CL_ActorGetReactionFireFireDef(), CL_ActorReactionFireChange(), CL_GenerateCharacter(), G_ActorGetTUForReactionFire(), G_ActorHasWorkingFireModeSet(), G_ActorInvMove(), G_ClientShoot(), G_EventReactionFireChange(), G_ReactionFireSettingsSetDefault(), G_ReactionFireSettingsUpdate(), ReactionFire::getFireDef(), HUD_DisplayFiremodeEntry(), HUD_ReactionFireGetTUs(), init(), and ReactionFire::tryToShoot().
chrScoreGlobal_t character_s::score |
Array of scores/stats the soldier/unit collected over time.
Definition at line 387 of file chr_shared.h.
Referenced by AI_SetEquipment(), AIR_PilotSurvivedCrash(), AIRFIGHT_ActionsAfterAirfight(), AIRFIGHT_ProbabilityToHit(), AM_CheckFire(), AM_UpdateSurivorsAfterBattle(), CHAR_ShouldUpdateSoldierRank(), CHAR_UpdateData(), CHAR_UpdateSkills(), CHAR_UpdateStats(), CHRSH_CharGenAbilitySkills(), CHRSH_UpdateCharacterWithEffect(), CL_CharacterSkillAndScoreCvars(), CL_DoSwapSkills(), CL_GetHitProbability(), CL_SwapSkill(), CL_UGVCvars(), CP_SpawnRescueMission(), E_CreateEmployee(), InventoryInterface::EquipActorNormal(), G_ActorCalculateMaxTU(), G_ActorInvMove(), G_CalcEffectiveSpread(), G_ClientAssignDefaultActorValues(), G_ClientReadCharacter(), G_ClientReadInventory(), G_EventActorAppear(), G_GetEarnedExperience(), G_Morale(), G_MoraleBehaviour(), G_SendCharacterData(), G_TreatActor(), G_UpdateCharacterBodycount(), G_UpdateCharacterExperience(), GAME_CP_CharacterCvars(), GAME_GetChrMaxLoad(), GAME_LoadCharacter(), GAME_NetSendCharacter(), GAME_SaveCharacter(), HOS_GetRank(), HOS_HealCharacter(), HUD_UpdateActorLoad_f(), init(), INV_UpdateActorLoad_f(), InventoryInterface::PackAmmoAndWeapon(), Employee::salary(), and TEST_F().
chrScoreMission_t* character_s::scoreMission |
Array of scores/stats the soldier/unit collected in a mission - only used in battlescape (server side). Otherwise it's nullptr.
Definition at line 388 of file chr_shared.h.
Referenced by G_ClientAssignDefaultActorValues(), G_ClientMove(), G_ClientShoot(), G_GetEarnedExperience(), G_TreatActor(), G_UpdateCarriedWeight(), G_UpdateCharacterBodycount(), G_UpdateHitScore(), and init().
int character_s::state |
a character can request some initial states when the team is spawned (like reaction fire)
Definition at line 385 of file chr_shared.h.
Referenced by CL_ActorStateChange(), CL_GenerateCharacter(), GAME_LoadCharacter(), GAME_SaveCharacter(), and init().
int character_s::STUN |
Definition at line 381 of file chr_shared.h.
Referenced by CHAR_UpdateData(), G_ClientReadCharacter(), GAME_LoadCharacter(), GAME_NetSendCharacter(), GAME_SaveCharacter(), and init().
const teamDef_t* character_s::teamDef |
Pointer to team definition.
Definition at line 394 of file chr_shared.h.
Referenced by AI_CivilianCalcActionScore(), AI_FindBestFiredef(), AI_SetCharacterValues(), AI_SetEquipment(), AI_SetStats(), AIL_InitActor(), AIL_isfighter(), AM_AlienCollect(), AM_CheckFire(), AM_CreateUnitChr(), CHRSH_CharGenAbilitySkills(), CHRSH_CharGetBody(), CHRSH_CharGetHead(), CL_ActorInjuryModifier(), CL_UpdateCharacterValues(), Com_GetCharacterModel(), Com_GetCharacterValues(), InventoryInterface::EquipActor(), InventoryInterface::EquipActorNormal(), G_ActorGetInjuryPenalty(), G_ActorSetMaxs(), G_ApplyProtection(), G_BleedWounds(), G_ClientGetWeaponFromInventory(), G_ClientReadCharacter(), G_Damage(), G_DamageActor(), G_EventActorAdd(), G_EventActorAppear(), G_IsActorWounded(), G_MoraleBehaviour(), G_MoralePanic(), G_ReactionFireCanBeEnabled(), G_SendFootstepSound(), G_SendWoundStats(), G_SplashDamage(), G_TreatActor(), G_UpdateCharacterExperience(), GAME_AppendTeamMember(), GAME_LoadCharacter(), GAME_NetSendCharacter(), GAME_SaveCharacter(), HOS_EntryWoundData(), HOS_GetInjuryLevel(), HOS_HealWounds(), init(), and Touch_HurtTrigger().
int character_s::ucn |
unique character number
Definition at line 370 of file chr_shared.h.
Referenced by AIR_DestroyAircraft(), AIR_GetPilot(), AIR_RemoveEmployee(), AIR_SaveAircraftXML(), BS_SellUGV(), CL_ActorGetFromCharacter(), CL_GenerateCharacter(), CP_TEAM_FillEquipSoldierList_f(), E_EmployeeSelect(), G_ClientReadCharacter(), G_EdictsGetActorByUCN(), G_EventActorAppear(), G_SendCharacterData(), GAME_GetCharacterByUCN(), GAME_LoadCharacter(), GAME_NetSendCharacter(), GAME_SaveCharacter(), HOS_Entry(), HOS_EntryWoundData(), init(), RS_RemoveFiredScientist(), and TR_Add_f().
woundInfo_t character_s::wounds |
Character wounds
Definition at line 383 of file chr_shared.h.
Referenced by AI_SetStats(), AM_CheckFire(), CHAR_UpdateData(), G_ActorGetInjuryPenalty(), G_BleedWounds(), G_ClientReadCharacter(), G_DamageActor(), G_EventActorWound(), G_IsActorWounded(), G_SendCharacterData(), G_SendWoundStats(), G_TreatActor(), GAME_LoadCharacter(), GAME_NetSendCharacter(), GAME_SaveCharacter(), HOS_EntryWoundData(), HOS_GetInjuryLevel(), HOS_HealWounds(), and init().