Updated antistick, small performance gain.

Modified any multi-valued cvars to accept "1,2" instead of only "1, 2" and made a cosmetic change to get array sizes.
This commit is contained in:
Greyscale
2009-07-23 15:05:14 -07:00
parent ac2fed1451
commit 151b255994
5 changed files with 34 additions and 36 deletions

View File

@ -57,12 +57,15 @@ ClassOverlayOnCommandsHook()
new String:arrayCmds[CLASSOVERLAY_TOGGLE_MAX_CMDS][CLASSOVERLAY_TOGGLE_MAX_LENGTH];
// Explode string into array indexes.
new cmdcount = ExplodeString(togglecmds, ", ", arrayCmds, CLASSOVERLAY_TOGGLE_MAX_CMDS, CLASSOVERLAY_TOGGLE_MAX_LENGTH);
new cmdcount = ExplodeString(togglecmds, ",", arrayCmds, sizeof(arrayCmds), sizeof(arrayCmds[]));
// x = Array index.
// arrayCmds[x] = suicide command.
for (new x = 0; x <= cmdcount - 1; x++)
{
// Trim whitespace.
TrimString(arrayCmds[x]);
// Prepare intercept for this command.
RegConsoleCmd(arrayCmds[x], ClassOverlayEnableCommand);
}