CTargetCDAudioRep::InputChangeCDTrack
0x0064f520 · 196 bytes · __thiscall
_ZN17CTargetCDAudioRep18InputChangeCDTrackER11inputdata_t
Decompiled
undefined (2 params)
/* CTargetCDAudioRep::InputChangeCDTrack(inputdata_t&) */
void __thiscall CTargetCDAudioRep::InputChangeCDTrack(CTargetCDAudioRep *this,inputdata_t *param_1)
{
int iVar1;
int iVar2;
iVar1 = *(int *)(this + 0x440);
if (*(int *)(gpGlobals + 0x14) == 1) {
iVar2 = *(int *)(gpGlobals + 0x58);
if (iVar2 == 0) {
return;
}
if ((*(byte *)(iVar2 + 0x10) & 2) != 0) {
return;
}
iVar2 = iVar2 + 0x10;
}
else {
if (*(int *)param_1 == 0) {
return;
}
iVar2 = __dynamic_cast(*(int *)param_1,&CBaseEntity::typeinfo,&CBasePlayer::typeinfo,0);
if (iVar2 == 0) {
return;
}
iVar2 = *(int *)(iVar2 + 0x30);
}
if (iVar2 != 0) {
if (0x1f < iVar1 + 1U) {
Warning();
return;
}
if (iVar1 == -1) {
(**(code **)(*engine + 0x9c))(engine,iVar2,"cd pause\n");
return;
}
(**(code **)(*engine + 0x9c))(engine,iVar2,"cd play %3d\n",iVar1);
}
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.