mirror of
https://github.com/ioquake/ioq3.git
synced 2025-05-30 16:41:31 +00:00
- compensate sv_fps for timescale value.
- Add a non-dirty-hack fix for client hanging when unpausing a game.
This commit is contained in:
parent
90b35ec5c8
commit
fb18a4b2e4
6 changed files with 35 additions and 15 deletions
|
@ -1961,7 +1961,7 @@ void CL_CheckTimeout( void ) {
|
|||
//
|
||||
// check timeout
|
||||
//
|
||||
if ( ( !cl_paused->integer || !sv_paused->integer )
|
||||
if ( ( !CL_CheckPaused() || !sv_paused->integer )
|
||||
&& cls.state >= CA_CONNECTED && cls.state != CA_CINEMATIC
|
||||
&& cls.realtime - clc.lastPacketTime > cl_timeout->value*1000) {
|
||||
if (++cl.timeoutcount > 5) { // timeoutcount saves debugger
|
||||
|
@ -1974,6 +1974,22 @@ void CL_CheckTimeout( void ) {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
CL_CheckPaused
|
||||
Check whether client has been paused.
|
||||
==================
|
||||
*/
|
||||
qboolean CL_CheckPaused(void)
|
||||
{
|
||||
// if cl_paused->modified is set, the cvar has only been changed in
|
||||
// this frame. Keep paused in this frame to ensure the server doesn't
|
||||
// lag behind.
|
||||
if(cl_paused->integer || cl_paused->modified)
|
||||
return qtrue;
|
||||
|
||||
return qfalse;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
||||
|
@ -1985,19 +2001,19 @@ CL_CheckUserinfo
|
|||
*/
|
||||
void CL_CheckUserinfo( void ) {
|
||||
// don't add reliable commands when not yet connected
|
||||
if ( cls.state < CA_CHALLENGING ) {
|
||||
if(cls.state < CA_CHALLENGING)
|
||||
return;
|
||||
}
|
||||
|
||||
// don't overflow the reliable command buffer when paused
|
||||
if ( cl_paused->integer ) {
|
||||
if(CL_CheckPaused())
|
||||
return;
|
||||
}
|
||||
|
||||
// send a reliable userinfo update if needed
|
||||
if ( cvar_modifiedFlags & CVAR_USERINFO ) {
|
||||
if(cvar_modifiedFlags & CVAR_USERINFO)
|
||||
{
|
||||
cvar_modifiedFlags &= ~CVAR_USERINFO;
|
||||
CL_AddReliableCommand( va("userinfo \"%s\"", Cvar_InfoString( CVAR_USERINFO ) ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue