Util_GetKeyString: Switch to findkeysforcommandex

This commit is contained in:
Marco Cawthorne 2022-08-05 13:38:09 -07:00
parent 0e77bad51d
commit 8532f1264f
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
1 changed files with 6 additions and 10 deletions

View File

@ -55,19 +55,15 @@ Util_GetKeyString
string
Util_GetKeyString(string strBind)
{
float flBindKey = tokenize(findkeysforcommand(strBind));
float flBindKey = tokenize(findkeysforcommandex(strBind, 0));
string strBindTx = "";
float j, k;
float j;
for (j = 0; j < flBindKey; ++j) {
k = stof(argv(j));
if (strBindTx != "")
strBindTx = strcat(strBindTx, ", ");
if (k != -1) {
if (strBindTx != "")
strBindTx = strcat(strBindTx, ", ");
strBindTx = strcat(strBindTx, keynumtostring(k));
}
strBindTx = strcat(strBindTx, argv(j));
}
if (!strBindTx)