Skip to content

During intermission the scoreboard still disappears when letting go of TAB #130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
TomyLobo opened this issue Sep 26, 2018 · 1 comment
Closed

Comments

@TomyLobo
Copy link
Collaborator

No description provided.

@TomyLobo
Copy link
Collaborator Author

This is a little more complicated to fix than I thought:

  • The handler for -showscores is on the client side
     void IN_ScoreUp( const CCommand &args )
     {
     	KeyUp( &in_score, args[1] );
     	if ( gViewPortInterface )
     	{
     		gViewPortInterface->ShowPanel( PANEL_SCOREBOARD, false ); // <-- this hides the scoreboard
     		GetClientVoiceMgr()->StopSquelchMode();
     	}
     }
  • The intermission code is on the server side
     void CMultiplayRules::GoToIntermission( void )
     {
     	if ( g_fGameOver )
     		return;
    
     	g_fGameOver = true;
    
     	float flWaitTime = mp_chattime.GetInt();
    
     	//[...]
     			
     	m_flIntermissionEndTime = gpGlobals->curtime + flWaitTime;
    
     	for ( int i = 1; i <= MAX_PLAYERS; i++ )
     	{
     		CBasePlayer *pPlayer = UTIL_PlayerByIndex( i );
    
     		if ( !pPlayer )
     			continue;
    
     		pPlayer->ShowViewPortPanel( PANEL_SCOREBOARD ); // <-- this shows the scoreboard to every player
     	}
     }
    • neither g_fGameOver nor m_flIntermissionEndTime are synchronized to the client.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant