CBaseEntity::ResolveFlyCollisionCustom
0x00477c10 · 284 bytes · __thiscall
_ZN11CBaseEntity25ResolveFlyCollisionCustomER10CGameTraceR6Vector
Decompiled
undefined (3 params)
/* CBaseEntity::ResolveFlyCollisionCustom(CGameTrace&, Vector&) */
void __thiscall
CBaseEntity::ResolveFlyCollisionCustom(CBaseEntity *this,CGameTrace *param_1,Vector *param_2)
{
float fVar1;
float fVar2;
CBaseEntity *this_00;
char cVar3;
float fVar4;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
if (0.7 < *(float *)(param_1 + 0x20)) {
if (((byte)this[0x14d] & 0x10) != 0) {
CalcAbsoluteVelocity(this);
}
*(float *)param_2 = *(float *)(this + 0x268) + *(float *)(this + 0x274);
*(float *)(param_2 + 4) = *(float *)(this + 0x26c) + *(float *)(this + 0x278);
fVar1 = *(float *)(this + 0x270);
fVar2 = *(float *)(this + 0x27c);
*(float *)(param_2 + 8) = fVar1 + fVar2;
fVar4 = *(float *)(this + 0x2c0);
this_00 = *(CBaseEntity **)(param_1 + 0x4c);
if (fVar4 == 0.0) {
fVar4 = 1.0;
}
if (fVar1 + fVar2 < *(float *)(gpGlobals + 0x10) * *(float *)(sv_gravity._28_4_ + 0x2c) * fVar4)
{
if (((byte)this[0x14d] & 0x10) != 0) {
CalcAbsoluteVelocity(this);
}
local_28 = *(undefined4 *)(this + 0x274);
local_20 = 0;
local_24 = *(undefined4 *)(this + 0x278);
SetAbsVelocity(this,(Vector *)&local_28);
}
cVar3 = IsStandable(this_00);
if (cVar3 != '\0') {
SetGroundEntity(this,this_00);
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.