CBaseEntity::ResolveFlyCollisionSlide
0x004778e0 · 645 bytes · __thiscall
_ZN11CBaseEntity24ResolveFlyCollisionSlideER10CGameTraceR6Vector
Decompiled
undefined (3 params)
/* CBaseEntity::ResolveFlyCollisionSlide(CGameTrace&, Vector&) */
void __thiscall
CBaseEntity::ResolveFlyCollisionSlide(CBaseEntity *this,CGameTrace *param_1,Vector *param_2)
{
CBaseEntity *this_00;
char cVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
float local_2c;
float local_28;
float local_24;
float local_20;
(**(code **)(*physprops + 0x14))(physprops,(int)*(short *)(param_1 + 0x40),0,0,&local_2c,0);
if (((byte)this[0x14d] & 0x10) != 0) {
CalcAbsoluteVelocity(this);
}
PhysicsClipVelocity(this,(Vector *)(this + 0x274),(Vector *)(param_1 + 0x18),(Vector *)&local_28,
1.0);
if (*(float *)(param_1 + 0x20) <= 0.7) {
SetAbsVelocity(this,(Vector *)&local_28);
return;
}
fVar5 = *(float *)(this + 0x268) + local_28;
*(float *)param_2 = fVar5;
fVar2 = *(float *)(this + 0x26c) + local_24;
*(float *)(param_2 + 4) = fVar2;
fVar3 = *(float *)(this + 0x270) + local_20;
*(float *)(param_2 + 8) = fVar3;
fVar4 = *(float *)(this + 0x2c0);
this_00 = *(CBaseEntity **)(param_1 + 0x4c);
if (fVar4 == 0.0) {
fVar4 = 1.0;
}
if (fVar3 < *(float *)(sv_gravity._28_4_ + 0x2c) * *(float *)(gpGlobals + 0x10) * fVar4) {
local_20 = 0.0;
fVar3 = local_28 + *(float *)(this + 0x268);
*(float *)param_2 = fVar3;
fVar2 = local_24 + *(float *)(this + 0x26c);
*(float *)(param_2 + 4) = fVar2;
fVar4 = *(float *)(this + 0x270);
*(float *)(param_2 + 8) = fVar4;
fVar4 = fVar3 * fVar3 + fVar2 * fVar2 + fVar4 * fVar4;
}
else {
fVar4 = fVar2 * fVar2 + fVar5 * fVar5 + fVar3 * fVar3;
}
SetAbsVelocity(this,(Vector *)&local_28);
if (fVar4 < 900.0) {
cVar1 = IsStandable(this_00);
if (cVar1 != '\0') {
SetGroundEntity(this,this_00);
}
SetAbsVelocity(this,(Vector *)&vec3_origin);
SetLocalAngularVelocity(this,(QAngle *)&vec3_angle);
return;
}
fVar4 = local_2c * *(float *)(gpGlobals + 0x10) * (1.0 - *(float *)(param_1 + 0x2c));
local_24 = (*(float *)(this + 0x26c) + local_24) * fVar4;
local_28 = (*(float *)(this + 0x268) + local_28) * fVar4;
local_20 = (*(float *)(this + 0x270) + local_20) * fVar4;
PhysicsPushEntity(this,(Vector *)&local_28,param_1);
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.