54 gi.BroadcastPrintf(
PRINT_HUD,
_(
"4 minutes left until forced turn end."));
57 gi.BroadcastPrintf(
PRINT_HUD,
_(
"3 minutes left until forced turn end."));
60 gi.BroadcastPrintf(
PRINT_HUD,
_(
"2 minutes left until forced turn end."));
63 gi.BroadcastPrintf(
PRINT_HUD,
_(
"1 minute left until forced turn end."));
66 gi.BroadcastPrintf(
PRINT_HUD,
_(
"30 seconds left until forced turn end."));
69 gi.BroadcastPrintf(
PRINT_HUD,
_(
"15 seconds left until forced turn end."));
77 gi.BroadcastPrintf(
PRINT_HUD,
_(
"Current active team hit the max round time."));
80 const int activeTeam =
level.activeTeam;
84 if (p->getTeam() == activeTeam) {
99 Actor* actor =
nullptr;
121 Actor* actor =
nullptr;
123 const int stun = actor->
getStun();
141 Actor* actor =
nullptr;
152 Actor* actor =
nullptr;
172 if (
level.num_alive[team]) {
174 level.activeTeam = team;
190 if (
level.activeTeam != player.getTeam())
205 if (!player.roundDone) {
206 player.roundDone =
true;
219 player.roundDone =
true;
227 Actor* actor =
nullptr;
230 player.lastSeen =
level.actualRound;
235 Com_Printf(
"round end triggered by g_lastseen (player %i (team %i) last seen in round %i of %i rounds)\n",
236 player.getNum(),
level.activeTeam, player.lastSeen,
level.actualRound);
284 gi.Error(
"Could not find player for team %i",
level.activeTeam);
292 if (p->getTeam() ==
level.activeTeam) {
293 p->roundDone =
false;
299 if (p->getTeam() ==
level.activeTeam) {
300 p->roundDone =
false;
int getWeight() const
Get the weight of the items in the given inventory (excluding those in temp containers).
void Com_DPrintf(int level, const char *fmt,...)
A Com_Printf that only shows up if the "developer" cvar is set.
void Com_Printf(const char *const fmt,...)
void G_ActorCheckRevitalise(Actor *actor)
void AI_CheckRespawn(int team)
If the cvar g_endlessaliens is set we will endlessly respawn aliens.
Artificial Intelligence functions.
Player * G_PlayerGetNextActiveHuman(Player *lastPlayer)
Iterate through the list of players.
Player * G_PlayerGetNextActiveAI(Player *lastPlayer)
Iterate through the list of players.
void G_GiveTimeUnits(int team)
Network function to update the time units (TUs) for each team-member.
int G_GetActiveTeam(void)
Returns the current active team to the server.
Interface for g_client.cpp.
Actor * G_EdictsGetNextLivingActorOfTeam(Actor *lastEnt, const int team)
Iterate through the living actor entities of the given team.
Actor * G_EdictsGetNextActor(Actor *lastEnt)
Iterate through the actor entities (even the dead!).
Actor * G_EdictsGetNextLivingActor(Actor *lastEnt)
Iterate through the living actor entities.
functions to handle the storage and lifecycle of all edicts in the game module.
void G_EventEndRoundAnnounce(const Player &player)
void G_EventEndRound(void)
End of turn event for the current active team.
void G_BleedWounds(const int team)
Deal damage to each wounded team member.
Local definitions for game module.
#define G_IsVisibleForTeam(ent, team)
#define G_IsAIPlayer(player)
void G_MoraleBehaviour(int team)
Applies morale behaviour on actors.
#define G_IsSinglePlayer()
cvar_t * sv_roundtimelimit
void G_MatchEndTrigger(int team, int timeGap)
Triggers the end of the game. Will be executed in the next server (or game) frame.
bool G_MatchIsRunning(void)
Checks whether the game is running (active team and no intermission time).
void G_ReactionFireOnEndTurn(void)
Called at the end of turn, all outstanding reaction fire is resolved.
void G_ReactionFireReset(int team)
Guess! Reset all "shaken" states on end of turn?
static void G_GetNextActiveTeam(void)
Get the next active team.
static void G_UpdateStunState(int team)
Regenerate the "STUN" value of each (partly) stunned team member.
static void G_RoundTouchTriggers(int team)
void G_ClientEndRound(Player &player)
static void G_UpdateCarriedWeight(int team)
Updates the weight carried for each team member.
static int G_PlayerSoldiersCount(const Player &player)
Counts the still living actors for a player.
void G_CheckForceEndRound(void)
Check whether a forced turn end should be executed.
int G_TouchTriggers(Edict *ent, const entity_type_t type)
Check the world against triggers for the current entity.
Player * G_GetPlayerForTeam(int team)
Gets player for given team.
Misc utility functions for game module.
int G_CheckVisTeamAll(const int team, const vischeckflags_t visFlags, const Edict *ent)
Do G_CheckVisTeam for all entities ent is the one that is looking at the others.
chrScoreMission_t * scoreMission