CBaseDoor::StartMovingSound
0x006688c0 · 282 bytes · __thiscall
_ZN9CBaseDoor16StartMovingSoundEv
Decompiled
undefined (1 param)
/* CBaseDoor::StartMovingSound() */
void __thiscall CBaseDoor::StartMovingSound(CBaseDoor *this)
{
uint uVar1;
code *pcVar2;
char cVar3;
int *piVar4;
int iVar5;
undefined4 uVar6;
undefined *puVar7;
int *piVar8;
MovingSoundThink(this);
uVar1 = *(uint *)(this + 0x494);
if ((((uVar1 == 0xffffffff) ||
(puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar7 + 8) != uVar1 >> 0xc)) ||
((piVar8 = *(int **)(puVar7 + 4), piVar8 == (int *)0x0 ||
(cVar3 = (**(code **)(*piVar8 + 0x16c))(piVar8), cVar3 == '\0')))) {
piVar8 = (int *)0x0;
}
piVar4 = (int *)(**(code **)(*gameeventmanager + 0x1c))(gameeventmanager,"door_moving",0,0);
if (piVar4 != (int *)0x0) {
if (*(int *)(this + 0x30) == 0) {
iVar5 = 0;
}
else {
iVar5 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
(**(code **)(*piVar4 + 0x30))(piVar4,"entindex",iVar5);
pcVar2 = *(code **)(*piVar4 + 0x30);
uVar6 = 0;
if (piVar8 != (int *)0x0) {
uVar6 = (**(code **)(*engine + 0x40))(engine,piVar8[0xc]);
}
(*pcVar2)(piVar4,"userid",uVar6);
(**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar4,0);
}
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.