================== CL_CheckTimeout ================== */
| 692 | ================== |
| 693 | */ |
| 694 | void CL_CheckTimeout( void ) { |
| 695 | // |
| 696 | // check timeout |
| 697 | // |
| 698 | if ( ( !CL_CheckPaused() || !sv_paused->integer ) |
| 699 | // && cls.state >= CA_CONNECTED && cls.state != CA_CINEMATIC |
| 700 | && cls.state >= CA_CONNECTED && (cls.state != CA_CINEMATIC && !CL_IsRunningInGameCinematic()) |
| 701 | && cls.realtime - clc.lastPacketTime > cl_timeout->value*1000) { |
| 702 | if (++cl.timeoutcount > 5) { // timeoutcount saves debugger |
| 703 | Com_Printf ("\nServer connection timed out.\n"); |
| 704 | CL_Disconnect (); |
| 705 | return; |
| 706 | } |
| 707 | } else { |
| 708 | cl.timeoutcount = 0; |
| 709 | } |
| 710 | } |
| 711 | |
| 712 | /* |
| 713 | ================== |
no test coverage detected