From 8268afc55026f70cd21a7941e1228cfd9adeb0a8 Mon Sep 17 00:00:00 2001 From: Mikko Tiusanen Date: Wed, 15 Oct 2014 21:16:06 +0300 Subject: Added automatic levels functionality based on total score earned of each player. --- src/game/g_main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/game/g_main.c') diff --git a/src/game/g_main.c b/src/game/g_main.c index afbd986..965fdc0 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -195,6 +195,8 @@ vmCvar_t g_PlayerRewardFactor; vmCvar_t g_TimerPeriod; vmCvar_t g_TimerCommand; vmCvar_t g_ForceRandomTeams; +vmCvar_t g_AutoLevelMinTeamSize; +vmCvar_t g_RageQuitScorePenalty; // copy cvars that can be set in worldspawn so they can be restored later static char cv_gravity[ MAX_CVAR_VALUE_STRING ]; @@ -359,7 +361,9 @@ static cvarTable_t gameCvarTable[ ] = { &g_PlayerRewardFactor, "g_PlayerRewardFactor", "0.25", CVAR_ARCHIVE, 0, qfalse }, { &g_TimerPeriod, "g_TimerPeriod", "0", CVAR_ARCHIVE, 0, qfalse }, { &g_TimerCommand, "g_TimerCommand", "", CVAR_ARCHIVE, 0, qfalse }, - { &g_ForceRandomTeams, "g_ForceRandomTeams", "0", CVAR_ARCHIVE, 0, qfalse } + { &g_ForceRandomTeams, "g_ForceRandomTeams", "0", CVAR_ARCHIVE, 0, qfalse }, + { &g_AutoLevelMinTeamSize, "g_AutoLevelMinTeamSize", "3", CVAR_ARCHIVE, 0, qfalse }, + { &g_RageQuitScorePenalty, "g_RageQuitScorePenalty", "2000", CVAR_ARCHIVE, 0, qfalse } }; static int gameCvarTableSize = sizeof( gameCvarTable ) / sizeof( gameCvarTable[ 0 ] ); void G_InitGame( int levelTime, int randomSeed, int restart ); -- cgit