mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-05-12 15:34:51 +00:00
Fix bots changing classes
This commit is contained in:
parent
3d314cf267
commit
44075bbfdb
@ -39,6 +39,7 @@ connected()
|
||||
|
||||
self.killerLocation = undefined;
|
||||
self.lastKiller = undefined;
|
||||
self.bot_change_class = true;
|
||||
|
||||
self thread difficulty();
|
||||
self thread teamWatch();
|
||||
@ -1063,10 +1064,12 @@ classWatch()
|
||||
|
||||
wait 0.5;
|
||||
|
||||
self notify( "menuresponse", game["menu_changeclass"], self chooseRandomClass() );
|
||||
if ( !isValidClass( self.class ) || !isDefined( self.bot_change_class ) )
|
||||
self notify( "menuresponse", game["menu_changeclass"], self chooseRandomClass() );
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -1132,8 +1135,10 @@ teamWatch()
|
||||
while ( !isdefined( self.pers["team"] ) || !allowTeamChoice() )
|
||||
wait .05;
|
||||
|
||||
wait 0.05;
|
||||
self notify( "menuresponse", game["menu_team"], getDvar( "bots_team" ) );
|
||||
wait 0.1;
|
||||
|
||||
if ( self.team != "axis" || self.team != "allies" )
|
||||
self notify( "menuresponse", game["menu_team"], getDvar( "bots_team" ) );
|
||||
|
||||
while ( isdefined( self.pers["team"] ) )
|
||||
wait .05;
|
||||
@ -5865,7 +5870,8 @@ bot_cap()
|
||||
getCarrierEntNum()
|
||||
{
|
||||
carrierNum = -1;
|
||||
if (isDefined(self.carrier))
|
||||
|
||||
if ( isDefined( self.carrier ) )
|
||||
carrierNum = self.carrier getEntityNumber();
|
||||
|
||||
return carrierNum;
|
||||
|
Loading…
x
Reference in New Issue
Block a user