mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-22 13:55:43 +00:00
Added bot_aim dvar
This commit is contained in:
parent
44075bbfdb
commit
fa14c3d77c
@ -35,6 +35,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
|
||||
|
||||
@ -122,6 +125,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;
|
||||
|
||||
@ -202,6 +208,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++ )
|
||||
{
|
||||
kick( bots[i] getEntityNumber(), "EXE_PLAYERKICKED" );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -2579,7 +2579,7 @@ bot_lookat( pos, time, vel, doAimPredict )
|
||||
self endon( "spawned_player" );
|
||||
level endon ( "game_ended" );
|
||||
|
||||
if ( level.gameEnded || !gameFlag( "prematch_done" ) || self.bot.isfrozen )
|
||||
if ( level.gameEnded || !gameFlag( "prematch_done" ) || self.bot.isfrozen || !getDvarInt( "bots_play_aim" ) )
|
||||
return;
|
||||
|
||||
if ( !isDefined( pos ) )
|
||||
|
Loading…
x
Reference in New Issue
Block a user