summaryrefslogtreecommitdiff
path: root/src/cgame/cg_main.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2006-01-18 01:54:21 +0000
committerTim Angus <tim@ngus.net>2006-01-18 01:54:21 +0000
commitb5a24aab3dbb3d65950843c19ab2fa9934064281 (patch)
treefef77c5cc94e3376442747136421f07f9bea74b0 /src/cgame/cg_main.c
parent5cf09669133da12cf82ee3168e57a781e47b9e92 (diff)
* Added BG_FindUsableForUpgrade
* Added BG_UpgradeClassAvailable * Added generalised BG_*IsAllowed functions * Added some binding traps to cgame * Added tutorial mode (cg_tutorial)
Diffstat (limited to 'src/cgame/cg_main.c')
-rw-r--r--src/cgame/cg_main.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c
index 34928132..5963d0bf 100644
--- a/src/cgame/cg_main.c
+++ b/src/cgame/cg_main.c
@@ -217,6 +217,7 @@ vmCvar_t cg_debugTrails;
vmCvar_t cg_debugPVS;
vmCvar_t cg_disableWarningDialogs;
vmCvar_t cg_disableScannerPlane;
+vmCvar_t cg_tutorial;
vmCvar_t cg_painBlendUpRate;
vmCvar_t cg_painBlendDownRate;
@@ -330,6 +331,7 @@ static cvarTable_t cvarTable[ ] =
{ &cg_debugPVS, "cg_debugPVS", "0", CVAR_CHEAT },
{ &cg_disableWarningDialogs, "cg_disableWarningDialogs", "0", CVAR_ARCHIVE },
{ &cg_disableScannerPlane, "cg_disableScannerPlane", "0", CVAR_ARCHIVE },
+ { &cg_tutorial, "cg_tutorial", "1", CVAR_ARCHIVE },
{ &cg_hudFiles, "cg_hudFiles", "ui/hud.txt", CVAR_ARCHIVE},
{ &cg_painBlendUpRate, "cg_painBlendUpRate", "10.0", 0 },
@@ -992,6 +994,25 @@ void CG_StartMusic( void )
trap_S_StartBackgroundTrack( parm1, parm2 );
}
+/*
+======================
+CG_PlayerCount
+======================
+*/
+int CG_PlayerCount( void )
+{
+ int i, count = 0;
+
+ for( i = 0; i < cg.numScores; i++ )
+ {
+ if( cg.scores[ i ].team == PTE_ALIENS ||
+ cg.scores[ i ].team == PTE_HUMANS )
+ count++;
+ }
+
+ return count;
+}
+
//
// ==============================
// new hud stuff ( mission pack )
@@ -1708,6 +1729,7 @@ void CG_Init( int serverMessageNum, int serverCommandSequence, int clientNum )
//TA: load overrides
BG_InitClassOverrides( );
BG_InitBuildableOverrides( );
+ BG_InitAllowedGameElements( );
//TA: dyn memory
CG_InitMemory( );