mgr: added `yb exec` command for debugging purposes
This commit is contained in:
parent
7b7ae7020b
commit
259dd18330
4 changed files with 37 additions and 10 deletions
|
|
@ -31,11 +31,12 @@ public:
|
|||
struct BotCmd {
|
||||
String name, format, help;
|
||||
Handler handler = nullptr;
|
||||
bool visible = true;
|
||||
|
||||
public:
|
||||
explicit BotCmd () = default;
|
||||
|
||||
BotCmd (StringRef name, StringRef format, StringRef help, Handler handler) : name (name), format (format), help (help), handler (cr::move (handler))
|
||||
BotCmd (StringRef name, StringRef format, StringRef help, Handler handler, bool visible = true) : name (name), format (format), help (help), handler (cr::move (handler)), visible (visible)
|
||||
{ }
|
||||
};
|
||||
|
||||
|
|
@ -100,6 +101,7 @@ private:
|
|||
int cmdList ();
|
||||
int cmdCvars ();
|
||||
int cmdShowCustom ();
|
||||
int cmdExec ();
|
||||
int cmdNode ();
|
||||
int cmdNodeOn ();
|
||||
int cmdNodeOff ();
|
||||
|
|
@ -125,7 +127,7 @@ private:
|
|||
int cmdNodeIterateCamp ();
|
||||
int cmdNodeShowStats ();
|
||||
int cmdNodeFileInfo ();
|
||||
int cmdAdjustHeight ();
|
||||
int cmdNodeAdjustHeight ();
|
||||
|
||||
private:
|
||||
int menuMain (int item);
|
||||
|
|
|
|||
|
|
@ -776,6 +776,9 @@ public:
|
|||
debugMsgInternal (strings.format (fmt, cr::forward <Args> (args)...));
|
||||
}
|
||||
|
||||
// execute client command helper
|
||||
template <typename ...Args> void issueCommand (const char *fmt, Args &&...args);
|
||||
|
||||
private:
|
||||
// returns true if bot is using a sniper rifle
|
||||
bool usesSniper () const {
|
||||
|
|
@ -826,9 +829,6 @@ private:
|
|||
bool usesKnife () const {
|
||||
return m_weaponType == WeaponType::Melee;
|
||||
}
|
||||
|
||||
// execute client command helper
|
||||
template <typename ...Args> void issueCommand (const char *fmt, Args &&...args);
|
||||
};
|
||||
|
||||
#include "config.h"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue