PhysForceEntityToSleep
0x007795f0 · 136 bytes · __regparm3
_Z22PhysForceEntityToSleepP11CBaseEntityP14IPhysicsObject.part.35
Decompiled
undefined (2 params)
/* PhysForceEntityToSleep(CBaseEntity*, IPhysicsObject*) [clone .part.35] */
void __regparm3 PhysForceEntityToSleep(CBaseEntity *param_1,IPhysicsObject *param_2)
{
int *piVar1;
undefined1 *puVar2;
int iVar3;
int iVar4;
undefined4 local_101c [1027];
puVar2 = &DAT_00d539c2;
if (*(undefined1 **)(param_1 + 0x7c) != (undefined1 *)0x0) {
puVar2 = *(undefined1 **)(param_1 + 0x7c);
}
DevMsg(2,"Putting entity to sleep: %s\n",puVar2);
iVar3 = (**(code **)(*(int *)param_1 + 0x2b8))(param_1,local_101c,0x400);
if (0 < iVar3) {
iVar4 = 0;
do {
PhysForceClearVelocity((IPhysicsObject *)local_101c[iVar4]);
piVar1 = (int *)local_101c[iVar4];
iVar4 = iVar4 + 1;
(**(code **)(*piVar1 + 0x68))(piVar1);
} while (iVar4 != iVar3);
}
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.