UFO: Alien Invasion
Loading...
Searching...
No Matches
g_round.cpp File Reference
#include "g_local.h"
#include "g_actor.h"
#include "g_ai.h"
#include "g_client.h"
#include "g_edicts.h"
#include "g_health.h"
#include "g_match.h"
#include "g_reaction.h"
#include "g_utils.h"
#include "g_vis.h"
Include dependency graph for g_round.cpp:

Go to the source code of this file.

Functions

void G_CheckForceEndRound (void)
 Check whether a forced turn end should be executed.
static int G_PlayerSoldiersCount (const Player &player)
 Counts the still living actors for a player.
static void G_UpdateStunState (int team)
 Regenerate the "STUN" value of each (partly) stunned team member.
static void G_UpdateCarriedWeight (int team)
 Updates the weight carried for each team member.
static void G_RoundTouchTriggers (int team)
static void G_GetNextActiveTeam (void)
 Get the next active team.
void G_ClientEndRound (Player &player)

Function Documentation

◆ G_CheckForceEndRound()

void G_CheckForceEndRound ( void )

Check whether a forced turn end should be executed.

Definition at line 39 of file g_round.cpp.

References _, G_ClientEndRound(), G_IsSinglePlayer, G_MatchIsRunning(), G_PlayerGetNextActiveHuman(), gi, level, PRINT_HUD, and sv_roundtimelimit.

Referenced by G_RunFrame().

◆ G_ClientEndRound()

◆ G_GetNextActiveTeam()

void G_GetNextActiveTeam ( void )
static

Get the next active team.

Definition at line 162 of file g_round.cpp.

References Com_DPrintf(), DEBUG_GAME, G_GetActiveTeam(), i, level, MAX_TEAMS, and TEAM_NO_ACTIVE.

Referenced by G_ClientEndRound().

◆ G_PlayerSoldiersCount()

int G_PlayerSoldiersCount ( const Player & player)
static

Counts the still living actors for a player.

Definition at line 96 of file g_round.cpp.

References G_EdictsGetNextLivingActor(), and Edict::getPlayerNum().

Referenced by G_ClientEndRound().

◆ G_RoundTouchTriggers()

void G_RoundTouchTriggers ( int team)
static

Definition at line 150 of file g_round.cpp.

References G_EdictsGetNextLivingActorOfTeam(), and G_TouchTriggers().

Referenced by G_ClientEndRound().

◆ G_UpdateCarriedWeight()

void G_UpdateCarriedWeight ( int team)
static

Updates the weight carried for each team member.

Parameters
[in]teamThe index of the team to update the values for.

Definition at line 139 of file g_round.cpp.

References chrScoreMission_t::carriedWeight, Edict::chr, G_EdictsGetNextLivingActorOfTeam(), Inventory::getWeight(), character_t::inv, and character_t::scoreMission.

Referenced by G_ClientEndRound().

◆ G_UpdateStunState()

void G_UpdateStunState ( int team)
static

Regenerate the "STUN" value of each (partly) stunned team member.

Note
The values are not sent via network. This is done in G_GiveTimeUnits. It has to be called afterwards.
Parameters
[in]teamThe index of the team to update the values for.
See also
G_GiveTimeUnits
Todo
Make this depend on the character-attributes.

Definition at line 117 of file g_round.cpp.

References Edict::addStun(), G_ActorCheckRevitalise(), G_EdictsGetNextLivingActorOfTeam(), Edict::getStun(), and Edict::setStun().

Referenced by G_ClientEndRound().