Server: add `sv input [INPUTNAME] [DATA]` command to debug I/O system

This commit is contained in:
Marco Cawthorne 2023-09-25 16:12:32 -07:00
parent d749241081
commit 33179a555d
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
1 changed files with 11 additions and 0 deletions

View File

@ -491,6 +491,17 @@ ConsoleCmd(string cmd)
t.Trigger(self, TRIG_TOGGLE);
}
break;
case "input":
float entNum = stof(argv(1));
string inputName = argv(2);
string inputData = argv(3);
NSEntity inputTarget = (NSEntity)edict_num(entNum);
if (inputTarget) {
inputTarget.Input(self, inputName, inputData);
print(sprintf("Sending input to %d, %S: %S\n", entNum, inputName, inputData));
}
break;
case "goto_ent":
static entity finder;
finder = find(finder, ::classname, argv(1));