CBaseEntity::VPhysicsCollision
0x006001b0 · 290 bytes · __thiscall
_ZN11CBaseEntity17VPhysicsCollisionEiP21gamevcollisionevent_t
Decompiled
undefined (3 params)
/* CBaseEntity::VPhysicsCollision(int, gamevcollisionevent_t*) */
void __thiscall
CBaseEntity::VPhysicsCollision(CBaseEntity *this,int param_1,gamevcollisionevent_t *param_2)
{
gamevcollisionevent_t *pgVar1;
CBaseEntity *pCVar2;
surfacedata_t *psVar3;
int iVar4;
bool bVar5;
bVar5 = param_1 == 0;
pCVar2 = *(CBaseEntity **)(param_2 + (uint)bVar5 * 4 + 0x68);
if (((pCVar2 != (CBaseEntity *)0x0) &&
((this[0x186] == (CBaseEntity)0x6 || (pCVar2[0x186] == (CBaseEntity)0x6)))) &&
((0.5 < *(float *)(param_2 + 0x14) || *(float *)(param_2 + 0x14) == 0.5 || (pCVar2 != this))))
{
psVar3 = (surfacedata_t *)
(**(code **)(*physprops + 0x18))
(physprops,*(undefined4 *)(param_2 + (uint)bVar5 * 4 + 8));
pgVar1 = param_2 + param_1 * 4;
iVar4 = (**(code **)(*physprops + 0x18))(physprops,*(undefined4 *)(pgVar1 + 8));
if ((*(short *)(psVar3 + 0x4c) != 0x58) && (*(short *)(iVar4 + 0x4c) != 0x58)) {
if (pCVar2 == this) {
PhysCollisionSound(pCVar2,*(IPhysicsObject **)pgVar1,4,*(int *)(pgVar1 + 8),
*(int *)(param_2 + (uint)bVar5 * 4 + 8),*(float *)(param_2 + 0x14),
*(float *)(param_2 + 0x18));
}
else {
PhysCollisionSound(this,*(IPhysicsObject **)pgVar1,6,*(int *)(pgVar1 + 8),
*(int *)(param_2 + (uint)bVar5 * 4 + 8),*(float *)(param_2 + 0x14),
*(float *)(param_2 + 0x18));
}
PhysCollisionScreenShake(param_2,param_1);
PhysCollisionDust(param_2,psVar3);
return;
}
}
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.