Fixed infinite loop

This commit is contained in:
INeedBots 2021-01-18 02:45:13 -06:00
parent 710b40cbef
commit 337c9bb587

View File

@ -422,6 +422,10 @@ bot_get_random_weapon(slot, rank)
case "camera_spike":
case "satchel_charge":
if(self.pers["bot"]["cod_points"] >= 2500)
continue;
break;
case "nightingale":
case "tabun_gas":
case "rottweil72":
@ -457,12 +461,12 @@ bot_get_random_weapon(slot, rank)
continue;
}
if ( id[ "reference" ] == "claymore" && diff <= 0 )
if ( id[ "reference" ] == "claymore" && diff <= 0 && RandomInt( 100 ) > 20 )
{
continue;
}
if ( id[ "reference" ] == "scrambler" && diff <= 0 )
if ( id[ "reference" ] == "scrambler" && diff <= 0 && RandomInt( 100 ) > 20 )
{
continue;
}