CBaseEntity::ApplyLocalVelocityImpulse
0x0040f7c0 · 407 bytes · __thiscall
_ZN11CBaseEntity25ApplyLocalVelocityImpulseERK6Vector
Decompiled
undefined (2 params)
/* CBaseEntity::ApplyLocalVelocityImpulse(Vector const&) */
void __thiscall CBaseEntity::ApplyLocalVelocityImpulse(CBaseEntity *this,Vector *param_1)
{
int *piVar1;
int iVar2;
int iVar3;
float fVar4;
float fVar5;
float fVar6;
undefined1 local_1028 [12];
undefined4 local_101c [1027];
if (((vec3_origin != *(float *)param_1) || (DAT_01053d4c != *(float *)(param_1 + 4))) ||
(DAT_01053d50 != *(float *)(param_1 + 8))) {
if (this[0x186] == (CBaseEntity)0x6) {
iVar2 = (**(code **)(*(int *)this + 0x2b8))(this,local_101c,0x400);
if (0 < iVar2) {
iVar3 = 0;
do {
piVar1 = (int *)local_101c[iVar3];
(**(code **)(*piVar1 + 0xe4))(piVar1,local_1028,param_1);
piVar1 = (int *)local_101c[iVar3];
iVar3 = iVar3 + 1;
(**(code **)(*piVar1 + 0xd8))(piVar1,local_1028,0);
} while (iVar3 != iVar2);
return;
}
}
else {
InvalidatePhysicsRecursive(this,4);
fVar4 = *(float *)param_1 + *(float *)(this + 0x2ec);
fVar5 = *(float *)(param_1 + 4) + *(float *)(this + 0x2f0);
fVar6 = *(float *)(param_1 + 8) + *(float *)(this + 0x2f4);
if (((*(float *)(this + 0x2ec) != fVar4) || (*(float *)(this + 0x2f0) != fVar5)) ||
(*(float *)(this + 0x2f4) != fVar6)) {
(**(code **)(*(int *)this + 0x30c))(this,this + 0x2ec);
*(float *)(this + 0x2ec) = fVar4;
*(float *)(this + 0x2f0) = fVar5;
*(float *)(this + 0x2f4) = fVar6;
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.