diff options
Diffstat (limited to 'src/cgame')
| -rw-r--r-- | src/cgame/cg_consolecmds.c | 6 | ||||
| -rw-r--r-- | src/cgame/cg_draw.c | 29 | ||||
| -rw-r--r-- | src/cgame/cg_local.h | 2 | ||||
| -rw-r--r-- | src/cgame/cg_main.c | 4 | ||||
| -rw-r--r-- | src/cgame/cg_servercmds.c | 15 | ||||
| -rw-r--r-- | src/cgame/cg_weapons.c | 4 | 
6 files changed, 57 insertions, 3 deletions
diff --git a/src/cgame/cg_consolecmds.c b/src/cgame/cg_consolecmds.c index 468cdeac..3e654c90 100644 --- a/src/cgame/cg_consolecmds.c +++ b/src/cgame/cg_consolecmds.c @@ -83,12 +83,16 @@ static void CG_ScoresDown_f( void )      // the scores are more than two seconds out of data,      // so request new ones      cg.scoresRequestTime = cg.time; -    trap_SendClientCommand( "score" ); +    //TA: added \n SendClientCommand doesn't call flush( )? +    trap_SendClientCommand( "score\n" );      // leave the current scores up if they were already      // displayed, but if this is the first hit, clear them out      if( !cg.showScores )      { +      if( cg_debugRandom.integer ) +        CG_Printf( "CG_ScoresDown_f: scores out of date\n" ); +        cg.showScores = qtrue;        cg.numScores = 0;      } diff --git a/src/cgame/cg_draw.c b/src/cgame/cg_draw.c index 2158379c..4608893f 100644 --- a/src/cgame/cg_draw.c +++ b/src/cgame/cg_draw.c @@ -2874,6 +2874,34 @@ static qboolean CG_DrawFollow( void )    return qtrue;  } +/* +================= +CG_DrawQueue +================= +*/ +static qboolean CG_DrawQueue( void ) +{ +  float       w; +  vec4_t      color; +  char        buffer[ MAX_STRING_CHARS ]; + +  if( !( cg.snap->ps.pm_flags & PMF_QUEUED ) ) +    return qfalse; + +  color[ 0 ] = 1; +  color[ 1 ] = 1; +  color[ 2 ] = 1; +  color[ 3 ] = 1; + +  Com_sprintf( buffer, MAX_STRING_CHARS, "You are in position %d of the spawn queue.", +               cg.snap->ps.persistant[ PERS_QUEUEPOS ] + 1 ); + +  w = CG_Text_Width( buffer, 0.7f, 0 ); +  CG_Text_Paint( 320 - w / 2, 400, 0.7f, color, buffer, 0, 0, ITEM_TEXTSTYLE_SHADOWED ); + +  return qtrue; +} +  //==================================================================================  #define SPECTATOR_STRING "SPECTATOR" @@ -2932,6 +2960,7 @@ static void CG_Draw2D( void )    CG_DrawVote( );    CG_DrawTeamVote( );    CG_DrawFollow( ); +  CG_DrawQueue( );    // don't draw center string if scoreboard is up    cg.scoreBoardShowing = CG_DrawScoreboard( ); diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index 1f1fe409..c3fd240e 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -1442,6 +1442,8 @@ extern  vmCvar_t    ui_voteActive;  extern  vmCvar_t    ui_alienTeamVoteActive;  extern  vmCvar_t    ui_humanTeamVoteActive; +extern  vmCvar_t    cg_debugRandom; +  //  // cg_main.c  // diff --git a/src/cgame/cg_main.c b/src/cgame/cg_main.c index 1b11f17e..725cc195 100644 --- a/src/cgame/cg_main.c +++ b/src/cgame/cg_main.c @@ -212,6 +212,8 @@ vmCvar_t  ui_voteActive;  vmCvar_t  ui_alienTeamVoteActive;  vmCvar_t  ui_humanTeamVoteActive; +vmCvar_t  cg_debugRandom; +  typedef struct  { @@ -313,6 +315,8 @@ static cvarTable_t cvarTable[ ] =    { &ui_humanTeamVoteActive, "ui_humanTeamVoteActive", "0", 0 },    { &ui_alienTeamVoteActive, "ui_alienTeamVoteActive", "0", 0 }, +  { &cg_debugRandom, "cg_debugRandom", "0", 0 }, +      // the following variables are created in other parts of the system,    // but we also reference them here diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c index 187c6395..da0ef801 100644 --- a/src/cgame/cg_servercmds.c +++ b/src/cgame/cg_servercmds.c @@ -39,6 +39,9 @@ static void CG_ParseScores( void )    memset( cg.scores, 0, sizeof( cg.scores ) ); +  if( cg_debugRandom.integer ) +    CG_Printf( "cg.numScores: %d\n", cg.numScores ); +    for( i = 0; i < cg.numScores; i++ )    {      // @@ -575,6 +578,18 @@ void CG_Menu( int menu )      case MN_H_BUILD:    trap_SendConsoleCommand( "menu tremulous_humanbuild\n" );   break;      case MN_H_ARMOURY:  trap_SendConsoleCommand( "menu tremulous_humanarmoury\n" ); break; +    case MN_A_TEAMFULL: +      trap_Cvar_Set( "ui_dialog", "The alien team has too many players. Please wait until " +                                  "slots become available or join the human team." ); +      trap_SendConsoleCommand( "menu tremulous_alien_dialog\n" ); +      break; + +    case MN_H_TEAMFULL: +      trap_Cvar_Set( "ui_dialog", "The human team has too many players. Please wait until " +                                  "slots become available or join the alien team." ); +      trap_SendConsoleCommand( "menu tremulous_human_dialog\n" ); +      break; +      case MN_H_NOROOM:        if( !cg_disableBuildWarnings.integer )        { diff --git a/src/cgame/cg_weapons.c b/src/cgame/cg_weapons.c index 4a24f12c..e01339db 100644 --- a/src/cgame/cg_weapons.c +++ b/src/cgame/cg_weapons.c @@ -1515,7 +1515,7 @@ void CG_NextWeapon_f( void )    if( cg.snap->ps.pm_flags & PMF_FOLLOW )    { -    trap_SendClientCommand( "followprev" ); +    trap_SendClientCommand( "followprev\n" );      return;    } @@ -1559,7 +1559,7 @@ void CG_PrevWeapon_f( void )    if( cg.snap->ps.pm_flags & PMF_FOLLOW )    { -    trap_SendClientCommand( "follownext" ); +    trap_SendClientCommand( "follownext\n" );      return;    }  | 
