fix team select

This commit is contained in:
ineed bots 2022-10-21 17:37:49 -06:00
parent bc3c4a58a0
commit b4bb7b1740
2 changed files with 19 additions and 4 deletions

View File

@ -249,6 +249,8 @@ bot_rank()
self.pers["plevel"] = prestige;
self setRank( rankId, prestige );
self maps\mp\gametypes\_rank::syncxpstat();
if ( !level.gameEnded )
level waittill( "game_ended" );

View File

@ -85,6 +85,14 @@ bot_skip_killcam()
}
}
/*
bot class t5
*/
chooseRandomClass()
{
return "smg_mp";
}
/*
Selects a class for the bot.
*/
@ -99,9 +107,12 @@ classWatch()
wait 0.5;
self notify( "menuresponse", game["menu_changeclass"], "smg_mp" );
if ( !maps\mp\gametypes\_globallogic_utils::isValidClass( self.class ) || !isDefined( self.bot_change_class ) )
self notify( "menuresponse", game["menu_changeclass"], self chooseRandomClass() );
while ( isdefined( self.pers["team"] ) && isdefined( self.pers["class"] ) )
self.bot_change_class = true;
while ( isdefined( self.pers["team"] ) && maps\mp\gametypes\_globallogic_utils::isValidClass( self.class ) && isDefined( self.bot_change_class ) )
wait .05;
}
}
@ -118,7 +129,9 @@ teamWatch()
while ( !isdefined( self.pers["team"] ) || !allowTeamChoice() )
wait .05;
wait 0.05;
wait 0.1;
if ( self.team != "axis" && self.team != "allies" )
self notify( "menuresponse", game["menu_team"], getDvar( "bots_team" ) );
while ( isdefined( self.pers["team"] ) )