Added bot_aim dvar

This commit is contained in:
ineedbots 2021-08-26 10:31:45 -06:00
parent b877ecffda
commit b6991b3754
2 changed files with 17 additions and 1 deletions

View File

@ -29,6 +29,9 @@ init()
if ( getDvar( "bots_main_waitForHostTime" ) == "" )
setDvar( "bots_main_waitForHostTime", 10.0 ); //how long to wait to wait for the host player
if ( getDvar( "bots_main_kickBotsAtEnd" ) == "" )
setDvar( "bots_main_kickBotsAtEnd", false ); //kicks the bots at game end
if ( getDvar( "bots_manage_add" ) == "" )
setDvar( "bots_manage_add", 0 ); //amount of bots to add to the game
@ -113,6 +116,9 @@ init()
if ( getDvar( "bots_play_ads" ) == "" ) //bot ads
setDvar( "bots_play_ads", true );
if ( getDvar( "bots_play_aim" ) == "" )
setDvar( "bots_play_aim", true );
if ( !isDefined( game["botWarfare"] ) )
game["botWarfare"] = true;
@ -183,6 +189,16 @@ handleBots()
wait 0.05;
setDvar( "bots_manage_add", getBotArray().size );
if ( !getDvarInt( "bots_main_kickBotsAtEnd" ) )
return;
bots = getBotArray();
for ( i = 0; i < bots.size; i++ )
{
bots[i] RemoveTestClient();
}
}
/*

View File

@ -2367,7 +2367,7 @@ bot_lookat( pos, time, vel, doAimPredict )
self endon( "spawned_player" );
level endon ( "game_ended" );
if ( level.gameEnded || level.inPrematchPeriod || self.bot.isfrozen )
if ( level.gameEnded || level.inPrematchPeriod || self.bot.isfrozen || !getDvarInt( "bots_play_aim" ) )
return;
if ( !isDefined( pos ) )