Permalink
Browse files

bots: add 'bot debug_reload' command. Permits reloading of (eg) bot b…

…ehaviour trees without needing to start a new game.
  • Loading branch information...
Veyrdite committed Dec 26, 2018
1 parent 107e076 commit ba0daa8d9cfd2bfa43c6d131e5aa559f1e97bf26
Showing with 9 additions and 1 deletion.
  1. +9 −1 src/sgame/sg_admin.cpp
@@ -5602,7 +5602,8 @@ static void BotUsage( gentity_t *ent )
" bot fill <count> [<team> [<skill level>]]\n"
" bot del (<name> | all)\n"
" bot names (aliens | humans) <names>…\n"
" bot names (clear | list)" ) );
" bot names (clear | list)\n"
" bot debug_reload" ) );
ADMP( bot_usage );
}

@@ -5780,6 +5781,13 @@ bool G_admin_bot( gentity_t *ent )
return false;
}
}
else if ( !Q_stricmp( arg1, "debug_reload" ) )
{
G_BotDelAllBots();
G_BotCleanup();
G_BotInit();
return true;
}
else
{
BotUsage( ent );

0 comments on commit ba0daa8

Please sign in to comment.