CModelSoundsCache::Save
0x004693f0 · 234 bytes · __thiscall
_ZN17CModelSoundsCache4SaveER10CUtlBuffer
Decompiled
undefined (2 params)
/* CModelSoundsCache::Save(CUtlBuffer&) */
void __thiscall CModelSoundsCache::Save(CModelSoundsCache *this,CUtlBuffer *param_1)
{
int iVar1;
undefined4 uVar2;
char cVar3;
char *pcVar4;
void *pvVar5;
int iVar6;
undefined1 local_20;
undefined1 uStack_1f;
undefined1 local_1e;
undefined1 local_1d;
uVar2 = *(undefined4 *)(this + 0x10);
if (((byte)param_1[0x15] & 1) == 0) {
cVar3 = CUtlBuffer::CheckPut(param_1,2);
if (cVar3 != '\0') {
if (((byte)param_1[0x34] & 1) == 0) {
*(short *)(*(int *)param_1 + (*(int *)(param_1 + 0x10) - *(int *)(param_1 + 0x20))) =
(short)uVar2;
iVar6 = *(int *)(param_1 + 0x10);
}
else {
iVar6 = *(int *)(param_1 + 0x10);
pvVar5 = (void *)((iVar6 - *(int *)(param_1 + 0x20)) + *(int *)param_1);
if (pvVar5 != (void *)0x0) {
uStack_1f = (undefined1)((uint)uVar2 >> 8);
local_1e = uStack_1f;
local_20 = (undefined1)uVar2;
local_1d = local_20;
_V_memcpy(pvVar5,&local_1e,2);
iVar6 = *(int *)(param_1 + 0x10);
}
}
*(int *)(param_1 + 0x10) = iVar6 + 2;
CUtlBuffer::AddNullTermination(param_1);
}
}
else {
CUtlBuffer::Printf(param_1,"%d",(int)(short)uVar2);
}
iVar6 = 0;
if (0 < *(int *)(this + 0x10)) {
do {
iVar1 = iVar6 * 2;
iVar6 = iVar6 + 1;
pcVar4 = (char *)(**(code **)(*soundemitterbase + 0x28))
(soundemitterbase,*(undefined2 *)(*(int *)(this + 4) + iVar1));
CUtlBuffer::PutString(param_1,pcVar4);
} while (iVar6 < *(int *)(this + 0x10));
}
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.