57 if (damage > 0 && target->
HP > 0) {
93 mostWounded = bodyPart;
99 wounds->
woundLevel[mostWounded] -= woundsHealed;
132 Actor* actor =
nullptr;
185 if (injury > threshold)
199 penalty = 1 - penalty;
202 penalty = ceil(penalty);
205 gi.DPrintf(
"G_ActorGetInjuryPenalty: Unknown modifier type %i\n",
type);
#define VectorCopy(src, dest)
QGL_EXTERN GLint GLenum type
void G_PrintStats(const char *format,...)
Prints stats to game console and stats log file.
int skills[SKILL_NUM_TYPES]
Misc utility functions for game module.
int woundLevel[BODYPART_MAXTYPE]
short numBodyParts(void) const
const BodyData * bodyTemplate
Describes a character with all its attributes.
const vec4_t dvecs[PATHFINDING_DIRECTIONS]
bool CHRSH_IsTeamDefAlien(const teamDef_t *const td)
Check if a team definition is alien.
const teamDef_t * teamDef
float bleedingFactor(const short bodyPart) const
this is a fire definition for our weapons/ammo
void G_CheckDeathOrKnockout(Actor *target, Actor *attacker, const fireDef_t *fd, int damage)
bool G_IsLivingActor(const Edict *ent)
Checks whether the given edict is a living actor.
int AngleToDir(int angle)
Returns the index of array directionAngles[DIRECTIONS] whose value is the closest to angle...
static byte G_GetImpactDirection(const Edict *const target, const vec3_t impact)
short getHitBodyPart(const byte direction, const float height) const
float woundThreshold(const short bodyPart) const
float penalty(const short bodyPart, const modifier_types_t type) const
All parts of the main game logic that are combat related.
int treatmentLevel[BODYPART_MAXTYPE]
bool CHRSH_IsTeamDefRobot(const teamDef_t *const td)
Check if a team definition is a robot.
void G_DamageActor(Edict *target, const int damage, const vec3_t impact)
Deals damage and causes wounds.
void G_BleedWounds(const int team)
Deal damage to each wounded team member.
float getArea(const short bodyPart) const
void G_TakeDamage(Edict *ent, int damage)
Applies the given damage value to an edict that is either an actor or has the FL_DESTROYABLE flag set...
bool G_IsActorWounded(const Edict *ent, bool serious)
Actor * G_EdictsGetNextLivingActorOfTeam(Actor *lastEnt, const int team)
Iterate through the living actor entities of the given team.
void G_EventActorWound(const Edict &ent, const int bodyPart)
Send info about an actor's wounds to the client.
vec_t VectorNormalize(vec3_t v)
Calculate unit vector for a given vec3_t.
void G_ActorCheckRevitalise(Actor *actor)
functions to handle the storage and lifecycle of all edicts in the game module.
void G_MatchEndCheck(void)
Checks whether there are still actors to fight with left. If none are the match end will be triggered...
void G_SendWoundStats(Edict *const ent)
Send wound stats to network buffer.
float VectorAngleBetween(const vec3_t vec1, const vec3_t vec2)
Calculates the angle (in radians) between the two given vectors.
float G_ActorGetInjuryPenalty(const Edict *const ent, const modifier_types_t type)
Returns the penalty to the given stat caused by the actor wounds.
#define VectorSubtract(a, b, dest)
void G_TreatActor(Actor *target, const fireDef_t *const fd, const int heal, const int healerTeam)
Heals a target and treats wounds.
Interface for g_client.cpp.
chrScoreMission_t * scoreMission