CEntityMapData::GetNextKey
0x00469090 · 291 bytes · __thiscall
_ZN14CEntityMapData10GetNextKeyEPcS0_
Decompiled
undefined (3 params)
/* CEntityMapData::GetNextKey(char*, char*) */
undefined4 __thiscall CEntityMapData::GetNextKey(CEntityMapData *this,char *param_1,char *param_2)
{
char cVar1;
char *pcVar2;
int iVar3;
size_t sVar4;
undefined4 uVar5;
int in_GS_OFFSET;
char local_820 [2048];
int local_20;
pcVar2 = *(char **)(this + 8);
local_20 = *(int *)(in_GS_OFFSET + 0x14);
iVar3 = MapEntity_ParseToken(pcVar2,local_820);
*(int *)(this + 8) = iVar3;
if (local_820[0] == '}') {
*(char **)(this + 8) = pcVar2;
uVar5 = 0;
}
else {
if (iVar3 != 0) {
V_strncpy(param_1,local_820,0x800);
sVar4 = strlen(param_1);
if (sVar4 != 0) {
pcVar2 = param_1 + (sVar4 - 1);
cVar1 = *pcVar2;
iVar3 = sVar4 - 1;
while ((cVar1 == ' ' && (*pcVar2 = '\0', iVar3 != 0))) {
cVar1 = param_1[iVar3 + -1];
pcVar2 = param_1 + iVar3 + -1;
iVar3 = iVar3 + -1;
}
}
iVar3 = MapEntity_ParseToken(*(char **)(this + 8),local_820);
*(int *)(this + 8) = iVar3;
if (iVar3 != 0) {
if (local_820[0] == '}') {
Warning("CEntityMapData::GetNextKey: closing brace without data\n");
uVar5 = 0;
}
else {
V_strncpy(param_2,local_820,0x800);
uVar5 = 1;
}
goto LAB_00469174;
}
}
Warning("CEntityMapData::GetNextKey: EOF without closing brace\n");
uVar5 = 0;
}
LAB_00469174:
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return uVar5;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.