better debug

This commit is contained in:
ineed bots
2023-07-15 16:01:35 -06:00
parent 2d719726dc
commit 120b3edec6
4 changed files with 47 additions and 7 deletions

View File

@@ -292,9 +292,36 @@ watchBotDebugEvent()
{
self waittill( "bot_event", msg, str, b, c, d, e, f, g );
if ( msg == "debug" && GetDvarInt( "bots_main_debug" ) )
if ( GetDvarInt( "bots_main_debug" ) >= 2 )
{
PrintConsole( "Bot Warfare debug: " + self.playername + ": " + str + "\n" );
big_str = "Bot Warfare debug: " + self getPlayerName() + ": " + msg;
if ( isDefined( str ) && isString( str ) )
big_str += ", " + str;
if ( isDefined( b ) && isString( b ) )
big_str += ", " + b;
if ( isDefined( c ) && isString( c ) )
big_str += ", " + c;
if ( isDefined( d ) && isString( d ) )
big_str += ", " + d;
if ( isDefined( e ) && isString( e ) )
big_str += ", " + e;
if ( isDefined( f ) && isString( f ) )
big_str += ", " + f;
if ( isDefined( g ) && isString( g ) )
big_str += ", " + g;
PrintConsole( big_str );
}
else if ( msg == "debug" && GetDvarInt( "bots_main_debug" ) )
{
PrintConsole( "Bot Warfare debug: " + self getPlayerName() + ": " + str );
}
}
}