summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2007-10-06 21:20:38 +0000
committerAndrey Nazarov <skuller@skuller.net>2007-10-06 21:20:38 +0000
commit8c81e98c2ae39b84efda70df9eb30a6d8a7a45be (patch)
tree487f48ffe999aa70ca6d64d720618662793627f3
parent55fed75b9137922047e6e4cf836a3e230f01c610 (diff)
Fixed sv_force_reconnect not working with R1Q2 clients.
Manully issuing 'reconnect' at client console in-game does what it really should.
-rw-r--r--source/cl_main.c4
-rw-r--r--source/sv_user.c31
2 files changed, 19 insertions, 16 deletions
diff --git a/source/cl_main.c b/source/cl_main.c
index d8f8c3f..b527aca 100644
--- a/source/cl_main.c
+++ b/source/cl_main.c
@@ -1006,6 +1006,9 @@ The server is changing levels
=================
*/
void CL_Reconnect_f( void ) {
+ if( cls.state >= ca_precached ) {
+ CL_Disconnect( ERR_SILENT, NULL );
+ }
if( cls.state >= ca_connected ) {
cls.state = ca_connected;
@@ -1022,6 +1025,7 @@ void CL_Reconnect_f( void ) {
return;
}
+ // issued manually at console
if( cls.serverAddress.type == NA_BAD ) {
Com_Printf( "No server to reconnect to.\n" );
return;
diff --git a/source/sv_user.c b/source/sv_user.c
index 6bd6dc2..55360bd 100644
--- a/source/sv_user.c
+++ b/source/sv_user.c
@@ -349,22 +349,6 @@ static void SV_New_f( void ) {
SV_ClientCommand( sv_client, "\n" );
- // send version string request
- if( !sv_client->versionString ) {
- SV_ClientCommand( sv_client, "cmd \177c version $version\n" );
- }
-
- // send reconnect var request
- if( sv_force_reconnect->string[0] && !sv_client->reconnect_done ) {
- if( NET_IsLocalAddress( &sv_client->netchan->remote_address ) ) {
- sv_client->reconnect_done = qtrue;
- } else {
- SV_ClientCommand( sv_client, "cmd \177c connect $%s\n",
- sv_client->reconnect_var );
- }
- }
-
-
//
// serverdata needs to go over for all types of servers
// to make sure the protocol is right, and to set the gamedir
@@ -404,6 +388,21 @@ static void SV_New_f( void ) {
SV_ClientCommand( sv_client, "\n" );
+ // send version string request
+ if( !sv_client->versionString ) {
+ SV_ClientCommand( sv_client, "cmd \177c version $version\n" );
+ }
+
+ // send reconnect var request
+ if( sv_force_reconnect->string[0] && !sv_client->reconnect_done ) {
+ if( NET_IsLocalAddress( &sv_client->netchan->remote_address ) ) {
+ sv_client->reconnect_done = qtrue;
+ } else {
+ SV_ClientCommand( sv_client, "cmd \177c connect $%s\n",
+ sv_client->reconnect_var );
+ }
+ }
+
Com_DPrintf( "Going from cs_connected to cs_primed for %s\n",
sv_client->name );
sv_client->state = cs_primed;