UFO: Alien Invasion
|
#include "g_local.h"
Go to the source code of this file.
Functions | |
void | G_DamageActor (Edict *target, const int damage, const vec3_t impact) |
Deals damage and causes wounds. More... | |
void | G_TreatActor (Actor *target, const fireDef_t *const fd, const int heal, const int healerTeam) |
Heals a target and treats wounds. More... | |
void | G_BleedWounds (const int team) |
Deal damage to each wounded team member. More... | |
void | G_SendWoundStats (Edict *const ent) |
Send wound stats to network buffer. More... | |
float | G_ActorGetInjuryPenalty (const Edict *const ent, const modifier_types_t type) |
Returns the penalty to the given stat caused by the actor wounds. More... | |
bool | G_IsActorWounded (const Edict *ent, bool serious=false) |
float G_ActorGetInjuryPenalty | ( | const Edict *const | ent, |
const modifier_types_t | type | ||
) |
Returns the penalty to the given stat caused by the actor wounds.
[in] | ent | Pointer to the actor we want to calculate the penalty for. |
[in] | type | The stat we want to calculate the penalty for. |
Definition at line 177 of file g_health.cpp.
References teamDef_s::bodyTemplate, Edict::chr, G_ActorGetInjuryPenalty(), gi, character_s::maxHP, MODIFIER_ACCURACY, MODIFIER_MOVEMENT, MODIFIER_REACTION, MODIFIER_SHOOTING, MODIFIER_SIGHT, MODIFIER_TU, BodyData::numBodyParts(), BodyData::penalty(), character_s::teamDef, woundInfo_s::treatmentLevel, woundInfo_s::woundLevel, character_s::wounds, and BodyData::woundThreshold().
Referenced by G_ActorCalculateMaxTU(), G_ActorGetInjuryPenalty(), G_ActorGetModifiedTimeForFiredef(), G_ActorMoveLength(), G_CalcEffectiveSpread(), G_ClientMove(), and G_VisCheckDist().
Deal damage to each wounded team member.
[in] | team | The index of the team to deal damage to. |
Definition at line 130 of file g_health.cpp.
References BodyData::bleedingFactor(), teamDef_s::bodyTemplate, Edict::chr, CHRSH_IsTeamDefRobot(), G_CheckDeathOrKnockout(), G_EdictsGetNextLivingActorOfTeam(), G_MatchEndCheck(), G_PrintStats(), G_TakeDamage(), character_s::maxHP, character_s::name, BodyData::numBodyParts(), character_s::teamDef, woundInfo_s::woundLevel, character_s::wounds, and BodyData::woundThreshold().
Referenced by G_ClientEndRound().
Deals damage and causes wounds.
[in,out] | target | Pointer to the actor we want to damage. |
[in] | damage | The value of the damage. |
[in] | impact | Impact location nullptr for splash damage. |
Definition at line 52 of file g_health.cpp.
References Edict::absBox, teamDef_s::bodyTemplate, Edict::chr, G_GetImpactDirection(), G_SendWoundStats(), G_TakeDamage(), BodyData::getArea(), BodyData::getHitBodyPart(), Edict::HP, AABB::maxs, AABB::mins, BodyData::numBodyParts(), character_s::teamDef, woundInfo_s::woundLevel, and character_s::wounds.
Referenced by G_Damage(), and Touch_HurtTrigger().
bool G_IsActorWounded | ( | const Edict * | ent, |
bool | serious = false |
||
) |
Definition at line 213 of file g_health.cpp.
References teamDef_s::bodyTemplate, Edict::chr, G_IsLivingActor(), i, character_s::maxHP, BodyData::numBodyParts(), character_s::teamDef, woundInfo_s::woundLevel, character_s::wounds, and BodyData::woundThreshold().
Referenced by actorL_isinjured(), and G_ClientShoot().
Send wound stats to network buffer.
Definition at line 157 of file g_health.cpp.
References teamDef_s::bodyTemplate, Edict::chr, G_EventActorWound(), i, BodyData::numBodyParts(), character_s::teamDef, woundInfo_s::treatmentLevel, woundInfo_s::woundLevel, and character_s::wounds.
Referenced by G_DamageActor(), G_SendPlayerStats(), and G_TreatActor().
void G_TreatActor | ( | Actor * | target, |
const fireDef_t *const | fd, | ||
const int | heal, | ||
const int | healerTeam | ||
) |
Heals a target and treats wounds.
[in,out] | target | Pointer to the actor who we want to treat. |
[in] | fd | Pointer to the firedef used to heal the target. |
[in] | heal | The value of the damage to heal. |
[in] | healerTeam | The index of the team of the healer. |
Definition at line 81 of file g_health.cpp.
References ABILITY_MIND, BodyData::bleedingFactor(), teamDef_s::bodyTemplate, Edict::chr, CHRSH_IsTeamDefAlien(), game_import_s::csi, csi_s::damNormal, csi_s::damShock, csi_s::damStunElectro, fireDef_s::dmgweight, G_ActorCheckRevitalise(), G_SendWoundStats(), G_TakeDamage(), GET_MORALE, Edict::getStun(), Edict::getTeam(), gi, chrScoreMission_s::heal, Actor::isStunned(), Edict::morale, BodyData::numBodyParts(), character_s::score, character_s::scoreMission, Edict::setMorale(), Edict::setStun(), chrScoreGlobal_s::skills, character_s::teamDef, woundInfo_s::treatmentLevel, woundInfo_s::woundLevel, and character_s::wounds.
Referenced by G_Damage().