L L4D2node

CBaseEntity::ScriptTakeDamage

0x00613480 · 150 bytes · __thiscall

_ZN11CBaseEntity16ScriptTakeDamageEfiP9HSCRIPT__

Decompiled

undefined (4 params)

/* CBaseEntity::ScriptTakeDamage(float, int, HSCRIPT__*) */

void __thiscall
CBaseEntity::ScriptTakeDamage(CBaseEntity *this,float param_1,int param_2,HSCRIPT__ *param_3)

{
  code *pcVar1;
  CBaseEntity *pCVar2;
  CBaseEntity *in_stack_ffffff64;
  CTakeDamageInfo local_7c [108];
  
  if (param_3 != (HSCRIPT__ *)0x0) {
    pcVar1 = *(code **)(*g_pScriptVM + 0x68);
    if (GetScriptDesc<CBaseEntity>(CBaseEntity*)::bInitialized == '\0') {
      GetScriptDesc<CBaseEntity>(in_stack_ffffff64);
    }
    pCVar2 = (CBaseEntity *)(*pcVar1)(g_pScriptVM,param_3,g_CBaseEntity_ScriptDesc);
    if (pCVar2 != (CBaseEntity *)0x0) goto LAB_006134c2;
  }
  pCVar2 = this;
LAB_006134c2:
  CTakeDamageInfo::CTakeDamageInfo(local_7c,pCVar2,pCVar2,param_1,param_2,0);
  TakeDamage(this,local_7c);
  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)