CBaseButton::Precache
0x00636230 · 494 bytes · __thiscall
_ZN11CBaseButton8PrecacheEv
Decompiled
undefined (1 param)
/* CBaseButton::Precache() */
void __thiscall CBaseButton::Precache(CBaseButton *this)
{
char *pcVar1;
char *local_10 [2];
if (this[0x4f0] != (CBaseButton)0x0) {
MakeButtonSound((int)local_10);
*(char **)(this + 0x4cc) = local_10[0];
pcVar1 = "";
if (local_10[0] != (char *)0x0) {
pcVar1 = local_10[0];
}
CBaseEntity::PrecacheScriptSound(pcVar1);
}
if (this[0x4f2] != (CBaseButton)0x0) {
MakeButtonSound((int)local_10);
*(char **)(this + 0x4d4) = local_10[0];
pcVar1 = "";
if (local_10[0] != (char *)0x0) {
pcVar1 = local_10[0];
}
CBaseEntity::PrecacheScriptSound(pcVar1);
}
switch(this[0x4f1]) {
default:
*(undefined4 *)(this + 0x4d0) = 0;
break;
case (CBaseButton)0x1:
*(char **)(this + 0x4d0) = "NA";
break;
case (CBaseButton)0x2:
*(char **)(this + 0x4d0) = "ND";
break;
case (CBaseButton)0x3:
*(undefined **)(this + 0x4d0) = &DAT_00c65fe9;
break;
case (CBaseButton)0x4:
*(char **)(this + 0x4d0) = "NFIRE";
break;
case (CBaseButton)0x5:
*(char **)(this + 0x4d0) = "NCHEM";
break;
case (CBaseButton)0x6:
*(undefined **)(this + 0x4d0) = &DAT_00c65ff2;
break;
case (CBaseButton)0x7:
*(undefined **)(this + 0x4d0) = &DAT_00c65ff7;
break;
case (CBaseButton)0x8:
*(undefined **)(this + 0x4d0) = &DAT_00c65ffc;
break;
case (CBaseButton)0x9:
*(char **)(this + 0x4d0) = "NG";
}
switch(this[0x4f3]) {
default:
*(undefined4 *)(this + 0x4d8) = 0;
break;
case (CBaseButton)0x1:
*(undefined **)(this + 0x4d8) = &DAT_00c65fff;
break;
case (CBaseButton)0x2:
*(char **)(this + 0x4d8) = "ED";
break;
case (CBaseButton)0x3:
*(undefined **)(this + 0x4d8) = &DAT_00c66002;
break;
case (CBaseButton)0x4:
*(char **)(this + 0x4d8) = "EFIRE";
break;
case (CBaseButton)0x5:
*(char **)(this + 0x4d8) = "ECHEM";
break;
case (CBaseButton)0x6:
*(undefined **)(this + 0x4d8) = &DAT_00c6600b;
break;
case (CBaseButton)0x7:
*(undefined **)(this + 0x4d8) = &DAT_00c66010;
pcVar1 = *(char **)(this + 0x504);
goto joined_r0x00636342;
case (CBaseButton)0x8:
*(undefined **)(this + 0x4d8) = &DAT_00c66015;
}
pcVar1 = *(char **)(this + 0x504);
joined_r0x00636342:
if (pcVar1 != (char *)0x0) {
CBaseEntity::PrecacheScriptSound(pcVar1);
return;
}
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.