mirror of
https://github.com/ineedbots/t4_bot_warfare.git
synced 2025-04-22 16:05:44 +00:00
Fix bots class selecting
This commit is contained in:
parent
0884902695
commit
4cdde8e7a5
@ -29,6 +29,7 @@ connected()
|
|||||||
|
|
||||||
self.killerLocation = undefined;
|
self.killerLocation = undefined;
|
||||||
self.lastKiller = undefined;
|
self.lastKiller = undefined;
|
||||||
|
self.bot_change_class = true;
|
||||||
|
|
||||||
self thread difficulty();
|
self thread difficulty();
|
||||||
self thread teamWatch();
|
self thread teamWatch();
|
||||||
@ -262,11 +263,12 @@ classWatch()
|
|||||||
|
|
||||||
wait 0.5;
|
wait 0.5;
|
||||||
|
|
||||||
|
if ( !isValidClass( self.class ) || !isDefined( self.bot_change_class ) )
|
||||||
|
self notify( "menuresponse", game["menu_changeclass"], self chooseRandomClass() );
|
||||||
|
|
||||||
self notify( "menuresponse", game["menu_changeclass"], self chooseRandomClass() );
|
|
||||||
self.bot_change_class = true;
|
self.bot_change_class = true;
|
||||||
|
|
||||||
while ( isdefined( self.pers["team"] ) && isdefined( self.pers["class"] ) && isDefined( self.bot_change_class ) )
|
while ( isdefined( self.pers["team"] ) && isValidClass( self.class ) && isDefined( self.bot_change_class ) )
|
||||||
wait .05;
|
wait .05;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -283,8 +285,10 @@ teamWatch()
|
|||||||
while ( !isdefined( self.pers["team"] ) || !allowTeamChoice() )
|
while ( !isdefined( self.pers["team"] ) || !allowTeamChoice() )
|
||||||
wait .05;
|
wait .05;
|
||||||
|
|
||||||
wait 0.05;
|
wait 0.1;
|
||||||
self notify( "menuresponse", game["menu_team"], getDvar( "bots_team" ) );
|
|
||||||
|
if ( self.team != "axis" || self.team != "allies" )
|
||||||
|
self notify( "menuresponse", game["menu_team"], getDvar( "bots_team" ) );
|
||||||
|
|
||||||
while ( isdefined( self.pers["team"] ) )
|
while ( isdefined( self.pers["team"] ) )
|
||||||
wait .05;
|
wait .05;
|
||||||
@ -4535,7 +4539,8 @@ bot_cap()
|
|||||||
getCarrierEntNum()
|
getCarrierEntNum()
|
||||||
{
|
{
|
||||||
carrierNum = -1;
|
carrierNum = -1;
|
||||||
if (isDefined(self.carrier))
|
|
||||||
|
if ( isDefined( self.carrier ) )
|
||||||
carrierNum = self.carrier getEntityNumber();
|
carrierNum = self.carrier getEntityNumber();
|
||||||
|
|
||||||
return carrierNum;
|
return carrierNum;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user