CBaseEntity::ApplyLocalAngularVelocityImpulse
0x0040fa90 · 256 bytes · __thiscall
_ZN11CBaseEntity32ApplyLocalAngularVelocityImpulseERK6Vector
Decompiled
undefined (2 params)
/* CBaseEntity::ApplyLocalAngularVelocityImpulse(Vector const&) */
void __thiscall CBaseEntity::ApplyLocalAngularVelocityImpulse(CBaseEntity *this,Vector *param_1)
{
int *piVar1;
int iVar2;
int iVar3;
float local_101c [1027];
if (((*(float *)param_1 != vec3_origin) || (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];
iVar3 = iVar3 + 1;
(**(code **)(*piVar1 + 0xd8))(piVar1,0,param_1);
} while (iVar3 != iVar2);
return;
}
}
else {
local_101c[1] = *(float *)(param_1 + 8) + *(float *)(this + 0x284);
local_101c[0] = *(float *)(this + 0x280) + *(float *)(param_1 + 4);
local_101c[2] = *(float *)param_1 + *(float *)(this + 0x288);
SetLocalAngularVelocity(this,(QAngle *)local_101c);
}
}
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.