L L4D2node

PhysGetEntityMass

0x0077a6c0 · 142 bytes · __cdecl

_Z17PhysGetEntityMassP11CBaseEntity

Decompiled

undefined (1 param)

/* PhysGetEntityMass(CBaseEntity*) */

longdouble PhysGetEntityMass(CBaseEntity *param_1)

{
  int *piVar1;
  int iVar2;
  int iVar3;
  longdouble lVar4;
  float local_1020;
  undefined4 local_101c [1027];
  
  iVar2 = (**(code **)(*(int *)param_1 + 0x2b8))(param_1,local_101c,0x400);
  if (iVar2 < 1) {
    local_1020 = 0.0;
  }
  else {
    iVar3 = 0;
    local_1020 = 0.0;
    do {
      piVar1 = (int *)local_101c[iVar3];
      iVar3 = iVar3 + 1;
      lVar4 = (longdouble)(**(code **)(*piVar1 + 0x78))(piVar1);
      local_1020 = (float)lVar4 + local_1020;
    } while (iVar3 != iVar2);
  }
  return (longdouble)local_1020;
}

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)