Bot autoconnect

- wait on host before spawning bots
This commit is contained in:
WantedDV 2023-04-20 23:57:23 -02:30
parent 8d595ab150
commit ebd3998d75

View File

@ -108,8 +108,8 @@ function init()
level endon( "game_ended" );
level.botSoak = is_bot_soak();
if ( ( level.rankedMatch && !level.botSoak ) || !init_bot_gametype() )
if( !init_bot_gametype() )
{
return;
}
@ -124,21 +124,13 @@ function init()
function is_bot_soak()
{
/*
return GetDvarInt( "sv_botsoak", 0 );
*/
return IsDedicated() && GetDvarInt( "sv_botsoak", 0 );
return GetDvarInt( "sv_botsoak", 0 );
}
function wait_for_host()
{
level endon( "game_ended" );
if ( level.botSoak )
{
return;
}
host = util::getHostPlayerForBots();
while ( !isdefined( host ) )