mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-11 15:38:12 +00:00
Add mp_coop_reconnect_hack cvar
This commit is contained in:
parent
237bf1ea73
commit
18976a4c58
@ -54,6 +54,7 @@ cvar_t mp_coop = { "mp_coop", "0", FCVAR_SERVER };
|
||||
cvar_t mp_coop_changelevel = { "mp_coop_changelevel", "0", FCVAR_SERVER };
|
||||
cvar_t mp_coop_nofriendlyfire = { "mp_coop_nofriendlyfire", "0", FCVAR_SERVER };
|
||||
cvar_t mp_coop_disabledmap = { "mp_coop_disabledmap", "", FCVAR_SERVER };
|
||||
cvar_t mp_coop_reconnect_hack = { "mp_coop_reconnect_hack", "0", FCVAR_SERVER };
|
||||
cvar_t mp_unduck = { "mp_unduck", "0", FCVAR_SERVER };
|
||||
cvar_t mp_semclip = { "mp_semclip", "0", FCVAR_SERVER };
|
||||
|
||||
@ -504,6 +505,7 @@ void GameDLLInit( void )
|
||||
CVAR_REGISTER( &mp_coop_disabledmap );
|
||||
CVAR_REGISTER( &mp_unduck );
|
||||
CVAR_REGISTER( &mp_semclip );
|
||||
CVAR_REGISTER( &mp_coop_reconnect_hack );
|
||||
|
||||
|
||||
CVAR_REGISTER( &mp_chattime );
|
||||
|
@ -54,6 +54,7 @@ extern cvar_t mp_coop_nofriendlyfire;
|
||||
extern cvar_t mp_coop_disabledmap;
|
||||
extern cvar_t mp_unduck;
|
||||
extern cvar_t mp_semclip;
|
||||
extern cvar_t mp_coop_reconnect_hack;
|
||||
extern bool g_fSavedDuck;
|
||||
|
||||
// Engine Cvars
|
||||
|
@ -2082,7 +2082,8 @@ void CChangeLevel::ChangeLevelNow( CBaseEntity *pActivator )
|
||||
//plr->SetThink( &CBasePlayer::Spawn );
|
||||
//plr->pev->nextthink = gpGlobals->time + 1;
|
||||
// HACK: force perform reconnection
|
||||
CLIENT_COMMAND( plr->edict(), "reconnect\n" );
|
||||
if( mp_coop_reconnect_hack.value )
|
||||
CLIENT_COMMAND( plr->edict(), "reconnect\n" );
|
||||
|
||||
//CLIENT_COMMAND( plr->edict(), "alias cmd \"reconnect;unalias cmd\"\n" );
|
||||
//MESSAGE_BEGIN( MSG_ONE, 2, NULL, plr->pev ); // svc_disconnect after stufftext
|
||||
@ -2091,8 +2092,10 @@ void CChangeLevel::ChangeLevelNow( CBaseEntity *pActivator )
|
||||
//SERVER_EXECUTE();
|
||||
}
|
||||
}
|
||||
SERVER_COMMAND( UTIL_VarArgs( "wait;wait;wait;wait;wait;changelevel %s %s\n", st_szNextMap, st_szNextSpot ) );
|
||||
//CHANGE_LEVEL( st_szNextMap, st_szNextSpot );
|
||||
if( mp_coop_reconnect_hack.value )
|
||||
SERVER_COMMAND( UTIL_VarArgs( "wait;wait;wait;wait;wait;changelevel %s %s\n", st_szNextMap, st_szNextSpot ) );
|
||||
else
|
||||
CHANGE_LEVEL( st_szNextMap, st_szNextSpot );
|
||||
}
|
||||
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user