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);
bool CHRSH_IsTeamDefRobot(const teamDef_t *const td)
Check if a team definition is a robot.
bool CHRSH_IsTeamDefAlien(const teamDef_t *const td)
Check if a team definition is alien.
float getArea(const short bodyPart) const
float woundThreshold(const short bodyPart) const
short getHitBodyPart(const byte direction, const float height) const
short numBodyParts(void) const
float penalty(const short bodyPart, const modifier_types_t type) const
float bleedingFactor(const short bodyPart) const
void G_ActorCheckRevitalise(Actor *actor)
bool G_IsLivingActor(const Edict *ent)
Checks whether the given edict is a living actor.
Interface for g_client.cpp.
void G_CheckDeathOrKnockout(Actor *target, Actor *attacker, const fireDef_t *fd, int damage)
All parts of the main game logic that are combat related.
Actor * G_EdictsGetNextLivingActorOfTeam(Actor *lastEnt, const int team)
Iterate through the living actor entities of the given team.
functions to handle the storage and lifecycle of all edicts in the game module.
void G_EventActorWound(const Edict &ent, const int bodyPart)
Send info about an actor's wounds to the client.
static byte G_GetImpactDirection(const Edict *const target, const vec3_t impact)
void G_BleedWounds(const int team)
Deal damage to each wounded team member.
void G_DamageActor(Edict *target, const int damage, const vec3_t impact)
Deals damage and causes wounds.
float G_ActorGetInjuryPenalty(const Edict *const ent, const modifier_types_t type)
Returns the penalty to the given stat caused by the actor 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_SendWoundStats(Edict *const ent)
Send wound stats to network buffer.
bool G_IsActorWounded(const Edict *ent, bool serious)
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_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...
void G_PrintStats(const char *format,...)
Prints stats to game console and stats log file.
Misc utility functions for game module.
const vec4_t dvecs[PATHFINDING_DIRECTIONS]
float VectorAngleBetween(const vec3_t vec1, const vec3_t vec2)
Calculates the angle (in radians) between the two given vectors.
vec_t VectorNormalize(vec3_t v)
Calculate unit vector for a given vec3_t.
int AngleToDir(int angle)
Returns the index of array directionAngles[DIRECTIONS] whose value is the closest to angle.
QGL_EXTERN GLint GLenum type
Describes a character with all its attributes.
const teamDef_t * teamDef
chrScoreMission_t * scoreMission
int skills[SKILL_NUM_TYPES]
this is a fire definition for our weapons/ammo
const BodyData * bodyTemplate
int woundLevel[BODYPART_MAXTYPE]
int treatmentLevel[BODYPART_MAXTYPE]
#define VectorSubtract(a, b, dest)
#define VectorCopy(src, dest)