From ae2b16fb47e8b2d2693286354481eded5e99e4b1 Mon Sep 17 00:00:00 2001 From: ineed bots Date: Mon, 18 Apr 2022 17:11:51 -0600 Subject: [PATCH] debug listener --- userraw/maps/mp/bots/_bot.gsc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/userraw/maps/mp/bots/_bot.gsc b/userraw/maps/mp/bots/_bot.gsc index 1b818d6..7368b9f 100644 --- a/userraw/maps/mp/bots/_bot.gsc +++ b/userraw/maps/mp/bots/_bot.gsc @@ -530,6 +530,26 @@ connected() self thread onDisconnect(); level notify( "bot_connected", self ); + + self thread watchBotDebugEvent(); +} + +/* + DEBUG +*/ +watchBotDebugEvent() +{ + self endon( "disconnect" ); + + for ( ;; ) + { + self waittill( "bot_event", msg, str, b, c, d, e, f, g ); + + if ( msg == "debug" && GetDvarInt( "bots_main_debug" ) ) + { + PrintConsole( "Bot Warfare debug: " + self.name + ": " + str ); + } + } } /*