CCommandBuffer::GetNextCommandLength
0x00245fe0 · 196 bytes · __thiscall
_ZN14CCommandBuffer20GetNextCommandLengthEPKciPiS2_
Decompiled
undefined (5 params)
/* CCommandBuffer::GetNextCommandLength(char const*, int, int*, int*) */
void __thiscall
CCommandBuffer::GetNextCommandLength
(CCommandBuffer *this,char *param_1,int param_2,int *param_3,int *param_4)
{
char cVar1;
bool bVar2;
byte bVar3;
int iVar4;
int iVar5;
int local_14;
if (param_2 < 1) {
local_14 = 0;
iVar5 = 0;
}
else {
bVar2 = false;
bVar3 = 0;
local_14 = 0;
iVar5 = 0;
do {
while (cVar1 = param_1[iVar5], !bVar2) {
if (cVar1 == '\"') {
bVar3 = bVar3 ^ 1;
goto LAB_0024605a;
}
if ((((!(bool)(bVar3 ^ 1)) || (cVar1 != '/')) || (param_2 + -1 <= iVar5)) ||
(param_1[iVar5 + 1] != '/')) {
if ((cVar1 != ';') || (!(bool)(bVar3 ^ 1))) break;
goto LAB_00246064;
}
iVar4 = iVar5 + 2;
bVar2 = true;
bVar3 = 0;
LAB_00246010:
iVar5 = iVar4;
if (param_2 <= iVar4) goto LAB_00246064;
}
if (cVar1 == '\n') break;
iVar4 = iVar5 + 1;
if (bVar2) goto LAB_00246010;
LAB_0024605a:
bVar2 = false;
iVar5 = iVar5 + 1;
local_14 = local_14 + 1;
} while (iVar5 < param_2);
}
LAB_00246064:
*param_3 = local_14;
*param_4 = iVar5;
return;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.