PrecachePhysicsSounds
0x004943b0 · 664 bytes · unknown
_Z21PrecachePhysicsSoundsv
Decompiled
undefined (0 params)
/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* PrecachePhysicsSounds() */
void PrecachePhysicsSounds(void)
{
int iVar1;
undefined2 uVar2;
int iVar3;
char *pcVar4;
int iVar5;
int iVar6;
int in_GS_OFFSET;
char local_a0 [128];
int local_20;
iVar6 = 0;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
do {
iVar3 = (**(code **)(*physprops + 0xc))(physprops);
if (iVar3 <= iVar6) {
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
return;
}
iVar5 = 0;
iVar3 = (**(code **)(*physprops + 0x18))(physprops,iVar6);
do {
while ((&DAT_00c18dc4)[iVar5 * 8] != '\0') {
pcVar4 = (char *)(**(code **)(*physprops + 0x1c))(physprops,*(undefined2 *)(iVar3 + 0x2c));
if ((pcVar4 != (char *)0x0) && (*pcVar4 != '\0')) {
V_snprintf(local_a0,0x80,"%s.%s",(&s_stepPrefix)[iVar5 * 2],pcVar4);
CBaseEntity::PrecacheScriptSound(local_a0);
}
pcVar4 = (char *)(**(code **)(*physprops + 0x1c))(physprops,*(undefined2 *)(iVar3 + 0x2e));
if ((pcVar4 == (char *)0x0) || (*pcVar4 == '\0')) break;
V_snprintf(local_a0,0x80,"%s.%s",(&s_stepPrefix)[iVar5 * 2],pcVar4);
CBaseEntity::PrecacheScriptSound(local_a0);
if ((&DAT_00c18dc5)[iVar5 * 8] != '\0') goto LAB_004944b0;
LAB_0049440e:
iVar5 = iVar5 + 1;
if (iVar5 == 5) goto LAB_00494540;
}
if ((&DAT_00c18dc5)[iVar5 * 8] == '\0') goto LAB_0049440e;
LAB_004944b0:
pcVar4 = (char *)(**(code **)(*physprops + 0x1c))(physprops,*(undefined2 *)(iVar3 + 0x30));
if ((pcVar4 != (char *)0x0) && (*pcVar4 != '\0')) {
V_snprintf(local_a0,0x80,"%s.%s",(&s_stepPrefix)[iVar5 * 2],pcVar4);
CBaseEntity::PrecacheScriptSound(local_a0);
}
pcVar4 = (char *)(**(code **)(*physprops + 0x1c))(physprops,*(undefined2 *)(iVar3 + 0x32));
if ((pcVar4 == (char *)0x0) || (*pcVar4 == '\0')) goto LAB_0049440e;
iVar1 = iVar5 * 2;
iVar5 = iVar5 + 1;
V_snprintf(local_a0,0x80,"%s.%s",(&s_stepPrefix)[iVar1],pcVar4);
CBaseEntity::PrecacheScriptSound(local_a0);
} while (iVar5 != 5);
LAB_00494540:
iVar6 = iVar6 + 1;
uVar2 = PrecachePhysicsSoundByStringIndex((uint)*(ushort *)(iVar3 + 0x34));
*(undefined2 *)(iVar3 + 0x58) = uVar2;
uVar2 = PrecachePhysicsSoundByStringIndex((uint)*(ushort *)(iVar3 + 0x36));
*(undefined2 *)(iVar3 + 0x5a) = uVar2;
uVar2 = PrecachePhysicsSoundByStringIndex((uint)*(ushort *)(iVar3 + 0x38));
*(undefined2 *)(iVar3 + 0x5c) = uVar2;
uVar2 = PrecachePhysicsSoundByStringIndex((uint)*(ushort *)(iVar3 + 0x3a));
*(undefined2 *)(iVar3 + 0x5e) = uVar2;
uVar2 = PrecachePhysicsSoundByStringIndex((uint)*(ushort *)(iVar3 + 0x3c));
*(undefined2 *)(iVar3 + 0x60) = uVar2;
uVar2 = PrecachePhysicsSoundByStringIndex((uint)*(ushort *)(iVar3 + 0x3e));
*(undefined2 *)(iVar3 + 0x62) = uVar2;
uVar2 = PrecachePhysicsSoundByStringIndex((uint)*(ushort *)(iVar3 + 0x40));
*(undefined2 *)(iVar3 + 100) = uVar2;
uVar2 = PrecachePhysicsSoundByStringIndex((uint)*(ushort *)(iVar3 + 0x42));
*(undefined2 *)(iVar3 + 0x66) = uVar2;
} while( true );
}
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.