CTerrorPlayer::TrackSound
0x009c35e0 · 122 bytes · __thiscall
_ZN13CTerrorPlayer10TrackSoundEPKc
Decompiled
undefined (2 params)
/* CTerrorPlayer::TrackSound(char const*) */
void __thiscall CTerrorPlayer::TrackSound(CTerrorPlayer *this,char *param_1)
{
int iVar1;
int iVar2;
char *local_14;
undefined4 local_10;
local_10 = 0;
local_14 = (char *)0x0;
if ((param_1 != (char *)0x0) && (*param_1 != '\0')) {
local_14 = param_1;
}
iVar1 = *(int *)(this + 0x2b54);
if (0 < iVar1) {
if (local_14 == (char *)**(int **)(this + 0x2b48)) {
return;
}
iVar2 = 0;
do {
iVar2 = iVar2 + 1;
if (iVar2 == iVar1) goto LAB_009c3634;
} while (local_14 != (char *)(*(int **)(this + 0x2b48))[iVar2 * 2]);
if (-1 < iVar2) {
return;
}
}
LAB_009c3634:
CUtlVector<CTerrorPlayer::TrackedSoundType,CUtlMemory<CTerrorPlayer::TrackedSoundType,int>>::
InsertBefore((CUtlVector<CTerrorPlayer::TrackedSoundType,CUtlMemory<CTerrorPlayer::TrackedSoundType,int>>
*)(this + 0x2b48),iVar1,(TrackedSoundType *)&local_14);
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.