CBoneFollower::TestCollision
0x00785740 · 564 bytes · __thiscall
_ZN13CBoneFollower13TestCollisionERK5Ray_tjR10CGameTrace
Decompiled
undefined (4 params)
/* CBoneFollower::TestCollision(Ray_t const&, unsigned int, CGameTrace&) */
undefined4 __thiscall
CBoneFollower::TestCollision(CBoneFollower *this,Ray_t *param_1,uint param_2,CGameTrace *param_3)
{
code *pcVar1;
uint uVar2;
int iVar3;
undefined4 uVar4;
undefined *puVar5;
UTIL_ClearTrace(param_3);
if ((g_pPhysics2 == (int *)0x0) ||
(iVar3 = (**(code **)(*g_pPhysics2 + 0x5c))(g_pPhysics2,0), iVar3 < 4)) {
pcVar1 = *(code **)(*modelinfo + 0x18);
uVar4 = (**(code **)(*(int *)this + 0x1c))(this);
iVar3 = (*pcVar1)(modelinfo,uVar4);
pcVar1 = *(code **)(*physcollision + 0x84);
if ((((byte)this[0x14d] & 8) != 0) &&
(CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this), ((byte)this[0x14d] & 8) != 0)) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
(*pcVar1)(physcollision,param_1,
*(undefined4 *)(*(int *)(iVar3 + 4) + *(int *)(this + 0x444) * 4),this + 0x2e0,
this + 0x37c,param_3);
if (1.0 < *(float *)(param_3 + 0x2c) || *(float *)(param_3 + 0x2c) == 1.0) {
return 0;
}
}
else {
pcVar1 = *(code **)(*modelinfo + 0x1c);
uVar4 = (**(code **)(*(int *)this + 0x1c))(this);
iVar3 = (*pcVar1)(modelinfo,uVar4);
pcVar1 = *(code **)(*physcollision + 0x100);
if ((((byte)this[0x14d] & 8) != 0) &&
(CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this), ((byte)this[0x14d] & 8) != 0)) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
(*pcVar1)(physcollision,param_1,
*(undefined4 *)(*(int *)(iVar3 + 8) + *(int *)(this + 0x444) * 4),this + 0x2e0,
this + 0x37c,param_3);
if (1.0 < *(float *)(param_3 + 0x2c) || *(float *)(param_3 + 0x2c) == 1.0) {
return 0;
}
}
uVar2 = *(uint *)(this + 0x220);
uVar4 = 0;
if (((uVar2 != 0xffffffff) &&
(puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar5 + 8) == uVar2 >> 0xc)) {
uVar4 = *(undefined4 *)(puVar5 + 4);
}
*(undefined4 *)(param_3 + 0x4c) = uVar4;
*(undefined4 *)(param_3 + 0x44) = *(undefined4 *)(this + 0x44c);
*(short *)(param_3 + 0x48) = (short)*(undefined4 *)(this + 0x448);
return 1;
}
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.