CBaseCombatCharacter::ApplyStressDamage
0x005f50b0 · 302 bytes · __thiscall
_ZN20CBaseCombatCharacter17ApplyStressDamageEP14IPhysicsObjectb
Decompiled
undefined (3 params)
/* CBaseCombatCharacter::ApplyStressDamage(IPhysicsObject*, bool) */
void __thiscall
CBaseCombatCharacter::ApplyStressDamage
(CBaseCombatCharacter *this,IPhysicsObject *param_1,bool param_2)
{
CBaseEntity *pCVar1;
CBaseEntity *pCVar2;
longdouble lVar3;
vphysics_objectstress_t local_78 [4];
float local_74;
char local_6f;
undefined4 local_6c;
undefined4 local_68;
float local_64;
undefined4 local_60;
undefined4 local_5c;
undefined4 local_58;
lVar3 = (longdouble)CalculatePhysicsStressDamage(this,local_78,param_1);
if ((0.0 < (float)lVar3) && ((!param_2 || (local_6f != '\0')))) {
pCVar1 = (CBaseEntity *)GetWorldEntity();
pCVar2 = (CBaseEntity *)GetWorldEntity();
CTakeDamageInfo::CTakeDamageInfo
((CTakeDamageInfo *)&local_6c,pCVar2,pCVar1,(Vector *)&vec3_origin,
(Vector *)&vec3_origin,(float)lVar3,1,0,(Vector *)0x0);
local_6c = 0;
local_68 = 0;
local_64 = *(float *)(sv_gravity._28_4_ + 0x2c) * *(float *)(gpGlobals + 0x10) * -local_74;
if (((byte)this[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
}
local_60 = *(undefined4 *)(this + 0x2e0);
local_5c = *(undefined4 *)(this + 0x2e4);
local_58 = *(undefined4 *)(this + 0x2e8);
CBaseEntity::TakeDamage((CBaseEntity *)this,(CTakeDamageInfo *)&local_6c);
}
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.