CPhysThruster::SetupForces
0x007a4460 · 448 bytes · __thiscall
_ZN13CPhysThruster11SetupForcesEP14IPhysicsObjectR6VectorS3_
Decompiled
undefined (4 params)
/* CPhysThruster::SetupForces(IPhysicsObject*, Vector&, Vector&) */
void __thiscall
CPhysThruster::SetupForces
(CPhysThruster *this,IPhysicsObject *param_1,Vector *param_2,Vector *param_3)
{
float fVar1;
uint uVar2;
undefined *puVar3;
CBaseEntity *this_00;
longdouble lVar4;
float local_34;
float local_30;
float local_2c;
float local_28 [6];
AngleVectors((QAngle *)(this + 0x3a8),(Vector *)&local_34);
fVar1 = *(float *)(this + 0x448);
uVar2 = *(uint *)(this + 0x148);
local_34 = local_34 * fVar1;
local_30 = local_30 * fVar1;
local_2c = fVar1 * local_2c;
if ((uVar2 & 0x10) != 0) {
lVar4 = (longdouble)(**(code **)(*(int *)param_1 + 0x78))(param_1);
fVar1 = (float)lVar4;
uVar2 = *(uint *)(this + 0x148);
local_34 = local_34 * fVar1;
local_30 = local_30 * fVar1;
local_2c = fVar1 * local_2c;
}
if ((uVar2 & 8) == 0) {
uVar2 = *(uint *)(this + 0x450);
this_00 = (CBaseEntity *)0x0;
if (((uVar2 != 0xffffffff) &&
(puVar3 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar3 + 8) == uVar2 >> 0xc)) {
this_00 = *(CBaseEntity **)(puVar3 + 4);
}
if (((byte)this_00[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
VectorTransform((float *)(this + 0x490),(matrix3x4_t *)(this_00 + 0x28c),local_28);
(**(code **)(*(int *)param_1 + 0x104))(param_1,(Vector *)&local_34,local_28,param_2,param_3);
}
else {
CalculateVelocityOffsetLocal
(param_1,(Vector *)&local_34,(Vector *)(this + 0x490),param_2,param_3);
}
uVar2 = *(uint *)(this + 0x148);
if ((uVar2 & 2) == 0) {
*(undefined4 *)param_2 = 0;
*(undefined4 *)(param_2 + 4) = 0;
*(undefined4 *)(param_2 + 8) = 0;
uVar2 = *(uint *)(this + 0x148);
}
if ((uVar2 & 4) == 0) {
*(undefined4 *)param_3 = 0;
*(undefined4 *)(param_3 + 4) = 0;
*(undefined4 *)(param_3 + 8) = 0;
}
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.