L L4D2node

CC_HurtMe_f

0x00641150 · 160 bytes · __cdecl

_Z11CC_HurtMe_fRK8CCommand

Decompiled

undefined (1 param)

/* CC_HurtMe_f(CCommand const&) */

void CC_HurtMe_f(CCommand *param_1)

{
  char cVar1;
  CBaseEntity *this;
  long lVar2;
  float fVar3;
  CTakeDamageInfo local_6c [96];
  
  if (*(int *)(*(int *)(sv_cheats + 0x1c) + 0x30) == 0) {
    return;
  }
  this = (CBaseEntity *)UTIL_GetCommandClient();
  if (this != (CBaseEntity *)0x0) {
    cVar1 = (**(code **)(*(int *)this + 0x16c))(this);
    if (cVar1 != '\0') {
      fVar3 = 10.0;
      if (1 < *(int *)param_1) {
        lVar2 = strtol(*(char **)(param_1 + 0x40c),(char **)0x0,10);
        fVar3 = (float)lVar2;
      }
      CTakeDamageInfo::CTakeDamageInfo(local_6c,this,this,fVar3,0,0);
      CBaseEntity::TakeDamage(this,local_6c);
    }
  }
  return;
}

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)