UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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"

Go to the source code of this file.

Functions

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

Function Documentation

static void G_GetNextActiveTeam ( void  )
static

Get the next active team.

Definition at line 162 of file g_round.cpp.

References level_locals_s::activeTeam, Com_DPrintf(), DEBUG_GAME, G_GetActiveTeam(), i, level, MAX_TEAMS, level_locals_s::num_alive, and TEAM_NO_ACTIVE.

Referenced by G_ClientEndRound().

static 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().

static 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().

static 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_s::carriedWeight, Edict::chr, G_EdictsGetNextLivingActorOfTeam(), Inventory::getWeight(), character_s::inv, and character_s::scoreMission.

Referenced by G_ClientEndRound().

static 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().