CUtlBuffer::GetType<short>
0x002146f0 · 187 bytes · __thiscall
_ZN10CUtlBuffer7GetTypeIsEEvRT_PKc
Decompiled
void (3 params)
/* void CUtlBuffer::GetType<short>(short&, char const*) */
void __thiscall CUtlBuffer::GetType<short>(CUtlBuffer *this,short *param_1,char *param_2)
{
char cVar1;
int iVar2;
short *psVar3;
undefined1 local_e;
undefined1 uStack_d;
if (((byte)this[0x15] & 1) != 0) {
*param_1 = 0;
Scanf(this,param_2,param_1);
return;
}
cVar1 = CheckGet(this,2);
if (cVar1 != '\0') {
if (((byte)this[0x34] & 1) == 0) {
*param_1 = *(short *)(*(int *)this + (*(int *)(this + 0xc) - *(int *)(this + 0x20)));
iVar2 = *(int *)(this + 0xc);
}
else {
iVar2 = *(int *)(this + 0xc);
if (param_1 != (short *)0x0) {
psVar3 = (short *)((iVar2 - *(int *)(this + 0x20)) + *(int *)this);
if (psVar3 == (short *)0x0) {
psVar3 = param_1;
}
_local_e = CONCAT11((char)*psVar3,*(undefined1 *)((int)psVar3 + 1));
_V_memcpy(param_1,&local_e,2);
iVar2 = *(int *)(this + 0xc);
}
}
*(int *)(this + 0xc) = iVar2 + 2;
return;
}
*param_1 = 0;
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.