GetRecentNPCSpeech
0x008151b0 · 125 bytes · __cdecl
_Z18GetRecentNPCSpeechP17recentNPCSpeech_t
Decompiled
undefined (1 param)
/* GetRecentNPCSpeech(recentNPCSpeech_t*) */
int GetRecentNPCSpeech(recentNPCSpeech_t *param_1)
{
recentNPCSpeech_t *prVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
undefined4 *puVar7;
iVar5 = 5;
prVar1 = param_1;
do {
*(undefined4 *)prVar1 = 0;
prVar1[4] = (recentNPCSpeech_t)0x0;
prVar1[0x204] = (recentNPCSpeech_t)0x0;
iVar5 = iVar5 + -1;
prVar1 = prVar1 + 0x284;
} while (iVar5 != 0);
iVar6 = 0;
iVar2 = 5;
iVar5 = speechListIndex;
do {
if ((&DAT_00ff4c64)[iVar5 * 0x284] != '\0') {
iVar3 = iVar6 * 0x284;
iVar6 = iVar6 + 1;
puVar7 = &speechListSounds + iVar5 * 0xa1;
prVar1 = param_1 + iVar3;
for (iVar4 = 0xa1; iVar4 != 0; iVar4 = iVar4 + -1) {
*(undefined4 *)prVar1 = *puVar7;
puVar7 = puVar7 + 1;
prVar1 = prVar1 + 4;
}
}
iVar5 = iVar5 + 1;
if (4 < iVar5) {
iVar5 = 0;
}
iVar2 = iVar2 + -1;
} while (iVar2 != 0);
return iVar6;
}
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.