mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Fixed server connection issue
This commit is contained in:
parent
95c0f4fe2d
commit
b4ad70dc20
2 changed files with 14 additions and 11 deletions
|
@ -1239,11 +1239,6 @@ void CL_Connect( const char *server ) {
|
|||
|
||||
Com_Printf( "%s resolved to %s\n", cls.servername, serverString );
|
||||
|
||||
if( cl_guidServerUniq->integer )
|
||||
CL_UpdateGUID( serverString, strlen( serverString ) );
|
||||
else
|
||||
CL_UpdateGUID( NULL, 0 );
|
||||
|
||||
// if we aren't playing on a lan, we need to authenticate
|
||||
// with the cd key
|
||||
// wombat: no authorization in mohaa. need to send challenge to server though
|
||||
|
@ -1254,9 +1249,9 @@ void CL_Connect( const char *server ) {
|
|||
cls.state = CA_CONNECTING;
|
||||
}
|
||||
|
||||
Key_SetCatcher( 0 );
|
||||
clc.connectTime = -99999; // CL_CheckForResend() will fire immediately
|
||||
clc.connectPacketCount = 0;
|
||||
clc.connectStartTime = 0;
|
||||
|
||||
// server connection string
|
||||
Cvar_Set( "cl_currentServerAddress", server );
|
||||
|
@ -1276,7 +1271,7 @@ void CL_Connect_f( void ) {
|
|||
Com_Printf( "usage: connect [server]\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
server = Cmd_Argv (1);
|
||||
|
||||
CL_Connect( server );
|
||||
|
|
|
@ -697,8 +697,12 @@ void QDECL NET_OutOfBandPrint( netsrc_t sock, netadr_t adr, const char *format,
|
|||
string[2] = -1;
|
||||
string[3] = -1;
|
||||
|
||||
// wombat: MOHAA OOB packets carry another byte to indicate the direction
|
||||
string[4] = (char)sock+1;
|
||||
// wombat: MOHAA OOB packets carry another byte to indicate the direction
|
||||
if (sock == NS_SERVER) {
|
||||
string[4] = 1;
|
||||
} else {
|
||||
string[4] = 2;
|
||||
}
|
||||
|
||||
va_start( argptr, format );
|
||||
Q_vsnprintf( string+(4+1), sizeof(string)-(4+1), format, argptr );
|
||||
|
@ -726,8 +730,12 @@ void QDECL NET_OutOfBandData( netsrc_t sock, netadr_t adr, byte *format, int len
|
|||
string[2] = 0xff;
|
||||
string[3] = 0xff;
|
||||
|
||||
// wombat: MOHAA OOB packets carry another byte to indicate the direction
|
||||
string[4] = (char)sock+1;
|
||||
// wombat: MOHAA OOB packets carry another byte to indicate the direction
|
||||
if (sock == NS_SERVER) {
|
||||
string[4] = 1;
|
||||
} else {
|
||||
string[4] = 2;
|
||||
}
|
||||
|
||||
for(i=0;i<len;i++) {
|
||||
string[i+(4+1)] = format[i];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue