diff --git a/.gitignore b/.gitignore index 7e02e22..34f8ee1 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ # Files to not ignore !/.gitignore +!/.vscode !/z_client.bat # Folder to not ignore diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..ef0aeab --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,8 @@ +{ + "astyle.astylerc": "${workspaceRoot}/.astylerc", + "astyle.additional_languages": [ + "gsc" + ], + "editor.defaultFormatter": "chiehyu.vscode-astyle", + "editor.formatOnSave": true +} \ No newline at end of file diff --git a/deploy.js b/deploy.js index 6a2d4b5..a73bf22 100644 --- a/deploy.js +++ b/deploy.js @@ -40,6 +40,9 @@ async function doDeploy() { await exec(`git clone ${repo_url} && cd ${repo_name} && git submodule update --init --recursive`) printToConsole('Cloned!') + printToConsole('Deploying...') + await exec('deploy.bat') + printToConsole('Deployed!') } catch (f) { printToConsole(f, true) } diff --git a/mods/bots/maps/mp/bots/_bot.gsc b/mods/bots/maps/mp/bots/_bot.gsc index 53e169a..1ecf659 100644 --- a/mods/bots/maps/mp/bots/_bot.gsc +++ b/mods/bots/maps/mp/bots/_bot.gsc @@ -26,6 +26,9 @@ init() if ( getCvar( "bots_main_waitForHostTime" ) == "" ) setCvar( "bots_main_waitForHostTime", 10.0 ); //how long to wait to wait for the host player + if ( getCvar( "bots_main_kickBotsAtEnd" ) == "" ) + setCvar( "bots_main_kickBotsAtEnd", false ); //kicks the bots at game end + if ( getCvar( "bots_manage_add" ) == "" ) setCvar( "bots_manage_add", 0 ); //amount of bots to add to the game @@ -95,6 +98,9 @@ init() if ( getCvar( "bots_play_ads" ) == "" ) //bot ads setCvar( "bots_play_ads", true ); + if ( getCvar( "bots_play_aim" ) == "" ) + setCvar( "bots_play_aim", true ); + if ( !isDefined( game["botWarfare"] ) ) game["botWarfare"] = true; @@ -159,6 +165,16 @@ handleBots() wait 0.05; setCvar( "bots_manage_add", getBotArray().size ); + + if ( !getCvarInt( "bots_main_kickBotsAtEnd" ) ) + return; + + bots = getBotArray(); + + for ( i = 0; i < bots.size; i++ ) + { + kick( bots[i] getEntityNumber() ); + } } /* diff --git a/mods/bots/maps/mp/bots/_bot_internal.gsc b/mods/bots/maps/mp/bots/_bot_internal.gsc index 15ec490..e9ccfa8 100644 --- a/mods/bots/maps/mp/bots/_bot_internal.gsc +++ b/mods/bots/maps/mp/bots/_bot_internal.gsc @@ -2049,7 +2049,7 @@ bot_lookat( pos, time, vel ) self endon( "spawned_player" ); level endon ( "game_ended" ); - if ( level.gameEnded || self.bot.isfrozen ) + if ( level.gameEnded || self.bot.isfrozen || !getCvarInt( "bots_play_aim" ) ) return; if ( !isDefined( pos ) )