L L4D2node

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 into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)