diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c index a784d71..8793833 100644 --- a/src/cgame/cg_main.c +++ b/src/cgame/cg_main.c @@ -1435,15 +1435,6 @@ static clientInfo_t * CG_InfoFromScoreIndex( int index, int team, int *scoreInde return &cgs.clientinfo[ cg.scores[ index ].client ]; } -static qboolean CG_ClientIsReady( int clientNum ) -{ - clientList_t ready; - - Com_ClientListParse( &ready, CG_ConfigString( CS_CLIENTS_READY ) ); - - return Com_ClientListContains( &ready, clientNum ); -} - static const char *CG_FeederItemText( int feederID, int index, int column, qhandle_t *handle ) { int scoreIndex = 0; @@ -1462,9 +1453,7 @@ static const char *CG_FeederItemText( int feederID, int index, int column, qhand info = CG_InfoFromScoreIndex( index, team, &scoreIndex ); sp = &cg.scores[ scoreIndex ]; - if( cg.intermissionStarted && CG_ClientIsReady( sp->client ) ) - showIcons = qfalse; - else if( cg.snap->ps.pm_type == PM_SPECTATOR || cg.snap->ps.pm_flags & PMF_FOLLOW || + if( cg.snap->ps.pm_type == PM_SPECTATOR || cg.snap->ps.pm_flags & PMF_FOLLOW || team == cg.snap->ps.stats[ STAT_TEAM ] || cg.intermissionStarted ) showIcons = qtrue; @@ -1504,8 +1493,6 @@ static const char *CG_FeederItemText( int feederID, int index, int column, qhand break; case 2: - if( cg.intermissionStarted && CG_ClientIsReady( sp->client ) ) - return "Ready"; break; case 3: diff --git a/src/game/bg_public.h b/src/game/bg_public.h index 62c981d..171f106 100644 --- a/src/game/bg_public.h +++ b/src/game/bg_public.h @@ -62,7 +62,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #define CS_WINNER 23 // string indicating round winner #define CS_SHADERSTATE 24 #define CS_BOTINFO 25 -#define CS_CLIENTS_READY 26 #define CS_ALIEN_STAGES 29 #define CS_HUMAN_STAGES 30 diff --git a/src/game/g_active.c b/src/game/g_active.c index 521d676..d84fcb8 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -798,13 +798,9 @@ void ClientIntermissionThink( gclient_t *client ) client->ps.eFlags &= ~EF_FIRING; client->ps.eFlags &= ~EF_FIRING2; - // the level will exit when everyone wants to or after timeouts - // swap and latch button actions client->oldbuttons = client->buttons; client->buttons = client->pers.cmd.buttons; - if( client->buttons & ( BUTTON_ATTACK | BUTTON_USE_HOLDABLE ) & ( client->oldbuttons ^ client->buttons ) ) - client->readyToExit = 1; } diff --git a/src/game/g_admin.c b/src/game/g_admin.c index 306b164..655bd40 100644 --- a/src/game/g_admin.c +++ b/src/game/g_admin.c @@ -62,11 +62,6 @@ g_admin_cmd_t g_admin_cmds[ ] = "[^3name|slot#^7]" }, - {"allready", G_admin_allready, "allready", - "makes everyone ready in intermission", - "" - }, - {"ban", G_admin_ban, "ban", "ban a player by IP and GUID with an optional expiration time and reason." " duration is specified as numbers followed by units 'w' (weeks), 'd' " @@ -2498,33 +2493,6 @@ qboolean G_admin_admintest( gentity_t *ent ) return qtrue; } -qboolean G_admin_allready( gentity_t *ent ) -{ - int i = 0; - gclient_t *cl; - - if( !level.intermissiontime ) - { - ADMP( "^3allready: ^7this command is only valid during intermission\n" ); - return qfalse; - } - - for( i = 0; i < g_maxclients.integer; i++ ) - { - cl = level.clients + i; - if( cl->pers.connected != CON_CONNECTED ) - continue; - - if( cl->pers.teamSelection == TEAM_NONE ) - continue; - - cl->readyToExit = qtrue; - } - AP( va( "print \"^3allready:^7 %s^7 says everyone is READY now\n\"", - ( ent ) ? ent->client->pers.netname : "console" ) ); - return qtrue; -} - qboolean G_admin_endvote( gentity_t *ent ) { char teamName[ sizeof( "spectators" ) ] = {"s"}; diff --git a/src/game/g_admin.h b/src/game/g_admin.h index 946b857..fd4aa4b 100644 --- a/src/game/g_admin.h +++ b/src/game/g_admin.h @@ -163,7 +163,6 @@ qboolean G_admin_denybuild( gentity_t *ent ); qboolean G_admin_showbans( gentity_t *ent ); qboolean G_admin_adminhelp( gentity_t *ent ); qboolean G_admin_admintest( gentity_t *ent ); -qboolean G_admin_allready( gentity_t *ent ); qboolean G_admin_endvote( gentity_t *ent ); qboolean G_admin_spec999( gentity_t *ent ); qboolean G_admin_rename( gentity_t *ent ); diff --git a/src/game/g_local.h b/src/game/g_local.h index f30ed3b..9917694 100644 --- a/src/game/g_local.h +++ b/src/game/g_local.h @@ -363,8 +363,6 @@ struct gclient_s clientPersistant_t pers; clientSession_t sess; - qboolean readyToExit; // wishes to leave the intermission - qboolean noclip; int lastCmdTime; // level.time of last usercmd_t, for EF_CONNECTION @@ -590,8 +588,7 @@ typedef struct // kills during this delay int intermissiontime; // time the intermission was started char *changemap; - qboolean readyToExit; // at least one client wants to exit - int exitTime; + vec3_t intermission_origin; // also used for spectator spawns vec3_t intermission_angle; diff --git a/src/game/g_main.c b/src/game/g_main.c index e4acd3d..d24599c 100644 --- a/src/game/g_main.c +++ b/src/game/g_main.c @@ -1844,19 +1844,11 @@ void LogExit( const char *string ) ================= CheckIntermissionExit -The level will stay at the intermission for a minimum of 5 seconds -If all players wish to continue, the level will then exit. -If one or more players have not acknowledged the continue, the game will -wait 10 seconds before going on. +The level will stay at the intermission for a short time ================= */ void CheckIntermissionExit( void ) { - int ready, notReady; - int i; - gclient_t *cl; - clientList_t readyMasks; - //if no clients are connected, just exit if( level.numConnectedClients == 0 ) { @@ -1864,70 +1856,9 @@ void CheckIntermissionExit( void ) return; } - // see which players are ready - ready = 0; - notReady = 0; - Com_Memset( &readyMasks, 0, sizeof( readyMasks ) ); - for( i = 0; i < g_maxclients.integer; i++ ) - { - cl = level.clients + i; - - if( cl->pers.connected != CON_CONNECTED ) - continue; - - if( cl->ps.stats[ STAT_TEAM ] == TEAM_NONE ) - continue; - - if( cl->readyToExit ) - { - ready++; - - Com_ClientListAdd( &readyMasks, i ); - } - else - notReady++; - } - - trap_SetConfigstring( CS_CLIENTS_READY, Com_ClientListString( &readyMasks ) ); - - // never exit in less than five seconds - if( level.time < level.intermissiontime + 5000 ) - return; - - // never let intermission go on for over 1 minute - if( level.time > level.intermissiontime + 60000 ) - { - ExitLevel( ); - return; - } - - // if nobody wants to go, clear timer - if( ready == 0 && notReady > 0 ) - { - level.readyToExit = qfalse; - return; - } - - // if everyone wants to go, go now - if( notReady == 0 ) - { + // never exit in less than 15 seconds + if( level.time > level.intermissiontime + 15000 ) ExitLevel( ); - return; - } - - // the first person to ready starts the thirty second timeout - if( !level.readyToExit ) - { - level.readyToExit = qtrue; - level.exitTime = level.time; - } - - // if we have waited thirty seconds since at least one player - // wanted to exit, go ahead - if( level.time < level.exitTime + 30000 ) - return; - - ExitLevel( ); } /*