GetSpringAttachments
0x0079e2d0 · 182 bytes · __cdecl
_Z20GetSpringAttachmentsP11CBaseEntityPS0_PP14IPhysicsObject
Decompiled
undefined (3 params)
/* GetSpringAttachments(CBaseEntity*, CBaseEntity**, IPhysicsObject**) */
undefined4 GetSpringAttachments(CBaseEntity *param_1,CBaseEntity **param_2,IPhysicsObject **param_3)
{
int *piVar1;
int iVar2;
IPhysicsObject *pIVar3;
CBaseEntity *pCVar4;
if (param_1 == (CBaseEntity *)0x0) {
return 0;
}
iVar2 = __dynamic_cast(param_1,&CBaseEntity::typeinfo,&CPhysicsSpring::typeinfo,0);
if (iVar2 != 0) {
piVar1 = *(int **)(iVar2 + 0x440);
if ((piVar1 == (int *)0x0) ||
(pIVar3 = (IPhysicsObject *)(**(code **)(*piVar1 + 0x18))(piVar1),
pIVar3 == (IPhysicsObject *)0x0)) {
pIVar3 = (IPhysicsObject *)0x0;
pCVar4 = (CBaseEntity *)0x0;
}
else {
pCVar4 = (CBaseEntity *)(**(code **)(*(int *)pIVar3 + 0x48))(pIVar3);
}
*param_2 = pCVar4;
*param_3 = pIVar3;
piVar1 = *(int **)(iVar2 + 0x440);
if ((piVar1 == (int *)0x0) ||
(pIVar3 = (IPhysicsObject *)(**(code **)(*piVar1 + 0x1c))(piVar1),
pIVar3 == (IPhysicsObject *)0x0)) {
pIVar3 = (IPhysicsObject *)0x0;
pCVar4 = (CBaseEntity *)0x0;
}
else {
pCVar4 = (CBaseEntity *)(**(code **)(*(int *)pIVar3 + 0x48))(pIVar3);
}
param_2[1] = pCVar4;
param_3[1] = pIVar3;
return 1;
}
return 0;
}
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.