CBaseCombatCharacter::CalculatePhysicsStressDamage
0x005f5020 · 138 bytes · __thiscall
_ZN20CBaseCombatCharacter28CalculatePhysicsStressDamageEP23vphysics_objectstress_tP14IPhysicsObject
Decompiled
undefined (3 params)
/* CBaseCombatCharacter::CalculatePhysicsStressDamage(vphysics_objectstress_t*, IPhysicsObject*) */
longdouble __thiscall
CBaseCombatCharacter::CalculatePhysicsStressDamage
(CBaseCombatCharacter *this,vphysics_objectstress_t *param_1,IPhysicsObject *param_2)
{
uint uVar1;
longdouble lVar2;
float fVar3;
float fVar4;
lVar2 = (longdouble)(**(code **)(*(int *)param_2 + 0x78))(param_2);
CalculateObjectStress(param_2,(CBaseEntity *)this,param_1);
fVar3 = 0.0;
if ((param_1[8] != (vphysics_objectstress_t)0x0) &&
(fVar4 = (*(float *)(param_1 + 4) * *(float *)(this + 0x17fc)) / (float)lVar2,
*(float *)(phys_stressbodyweights._28_4_ + 0x2c) <= fVar4 &&
fVar4 != *(float *)(phys_stressbodyweights._28_4_ + 0x2c))) {
uVar1 = (**(code **)(*(int *)param_2 + 0x50))(param_2);
fVar3 = 0.0;
if ((uVar1 & 0x40) == 0) {
fVar3 = 200.0;
}
}
return (longdouble)fVar3;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
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.
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.