|
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. | |
| void | G_TreatActor (Actor *target, const fireDef_t *const fd, const int heal, const int healerTeam) |
| Heals a target and treats wounds. | |
| void | G_BleedWounds (const int team) |
| Deal damage to each wounded team member. | |
| void | G_SendWoundStats (Edict *const ent) |
| Send wound stats to network buffer. | |
| float | G_ActorGetInjuryPenalty (const Edict *const ent, const modifier_types_t type) |
| Returns the penalty to the given stat caused by the actor wounds. | |
| 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_t::bodyTemplate, Edict::chr, G_ActorGetInjuryPenalty(), gi, character_t::maxHP, MODIFIER_ACCURACY, MODIFIER_MOVEMENT, MODIFIER_REACTION, MODIFIER_SHOOTING, MODIFIER_SIGHT, MODIFIER_TU, BodyData::numBodyParts(), BodyData::penalty(), character_t::teamDef, woundInfo_t::treatmentLevel, type, woundInfo_t::woundLevel, character_t::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_t::bodyTemplate, Edict::chr, CHRSH_IsTeamDefRobot(), G_CheckDeathOrKnockout(), G_EdictsGetNextLivingActorOfTeam(), G_MatchEndCheck(), G_PrintStats(), G_TakeDamage(), character_t::maxHP, character_t::name, BodyData::numBodyParts(), character_t::teamDef, woundInfo_t::woundLevel, character_t::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_t::bodyTemplate, Edict::chr, G_GetImpactDirection(), G_SendWoundStats(), G_TakeDamage(), BodyData::getArea(), BodyData::getHitBodyPart(), Edict::HP, AABB::maxs, AABB::mins, BodyData::numBodyParts(), character_t::teamDef, woundInfo_t::woundLevel, and character_t::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_t::bodyTemplate, Edict::chr, G_IsLivingActor(), i, character_t::maxHP, BodyData::numBodyParts(), character_t::teamDef, woundInfo_t::woundLevel, character_t::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_t::bodyTemplate, Edict::chr, G_EventActorWound(), i, BodyData::numBodyParts(), character_t::teamDef, woundInfo_t::treatmentLevel, woundInfo_t::woundLevel, and character_t::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_t::bodyTemplate, Edict::chr, CHRSH_IsTeamDefAlien(), fireDef_t::dmgweight, G_ActorCheckRevitalise(), G_SendWoundStats(), G_TakeDamage(), GET_MORALE, Edict::getStun(), Edict::getTeam(), gi, chrScoreMission_t::heal, Actor::isStunned(), Edict::morale, BodyData::numBodyParts(), character_t::score, character_t::scoreMission, Edict::setMorale(), Edict::setStun(), chrScoreGlobal_t::skills, character_t::teamDef, woundInfo_t::treatmentLevel, woundInfo_t::woundLevel, and character_t::wounds.
Referenced by G_Damage().