105 unsigned int totalGainedXP = 0;
111 totalGainedXP += gainedXP;
127 bool foundNextMap =
false;
128 Edict* ent =
nullptr;
139 const int realTimeGap = timeGap > 0 ?
level.
time + timeGap : 1;
160 gi.WriteShort(actor->
HP);
186 Edict* attacker =
nullptr;
187 Actor* actor =
nullptr;
192 else if (actor->
getTeam() == team)
212 gi.WriteByte(nextmap);
294 Actor* actor =
nullptr;
308 if (activeTeams < 2) {
static int G_GetEarnedExperience(abilityskills_t skill, Edict *ent)
Determines the amount of XP earned by a given soldier for a given skill, based on the soldier's perfo...
bool isInRescueZone() const
Checks whether the given actor is currently standing in a rescue zone.
void G_MatchEndTrigger(int team, int timeGap)
Triggers the end of the game. Will be executed in the next server (or game) frame.
Actor * G_EdictsGetNextLivingActor(Actor *lastEnt)
Iterate through the living actor entities.
static void G_UpdateCharacterExperience(Edict *ent)
Updates character experience after a mission.
void G_PrintStats(const char *format,...)
Prints stats to game console and stats log file.
const teamDef_t * teamDef
unsigned num_stuns[MAX_TEAMS+1][MAX_TEAMS]
int experience[SKILL_NUM_TYPES+1]
Artificial Intelligence functions.
static void G_MatchSendResults(int team, bool nextmap)
Handles the end of a match.
Misc utility functions for game module.
int hitsSplash[SKILL_NUM_TYPES][KILLED_NUM_TYPES]
void Think_NextMapTrigger(Edict *self)
Register this think function once you would like to end the match This think function will register t...
int stuns[KILLED_NUM_TYPES]
#define ABILITY_NUM_TYPES
chrScoreMission_t * scoreMission
int hits[SKILL_NUM_TYPES][KILLED_NUM_TYPES]
unsigned num_kills[MAX_TEAMS+1][MAX_TEAMS]
bool G_MatchIsRunning(void)
Checks whether the game is running (active team and no intermission time)
int kills[KILLED_NUM_TYPES]
int treatmentLevel[BODYPART_MAXTYPE]
void(* think)(Edict *self)
int kills[KILLED_NUM_TYPES]
int woundLevel[BODYPART_MAXTYPE]
byte num_alive[MAX_TEAMS]
static void G_SendCharacterData(const Actor *actor)
Sends character stats like assigned missions and kills back to client.
void G_EventAdd(playermask_t playerMask, int eType, int entnum)
void G_VisMakeEverythingVisible(void)
Make everything visible to anyone who can't already see it.
#define GET_ENCUMBRANCE_PENALTY(weight, max)
Edict * G_EdictsGetTriggerNextMaps(Edict *lastEnt)
Iterator through all the trigger_nextmap edicts.
Actor * G_EdictsGetNextLivingActorOfTeam(Actor *lastEnt, const int team)
Iterate through the living actor entities of the given team.
void AIL_Cleanup(void)
Closes the LUA AI.
Actor * G_EdictsGetNextActor(Actor *lastEnt)
Iterate through the actor entities (even the dead!)
Local definitions for game module.
functions to handle the storage and lifecycle of all edicts in the game module.
unsigned num_spawned[MAX_TEAMS]
bool G_ActorDieOrStun(Actor *actor, Edict *attacker)
Reports and handles death or stun of an actor. If the HP of an actor is zero the actor will die...
void G_MatchEndCheck(void)
Checks whether there are still actors to fight with left. If none are the match end will be triggered...
bool G_MatchDoEnd(void)
Checks whether a match is over.
int skills[SKILL_NUM_TYPES]
Describes a character with all its attributes.