L L4D2node

CTakeDamageInfo::Init

0x004c7800 · 351 bytes · __thiscall

_ZN15CTakeDamageInfo4InitEP11CBaseEntityS1_S1_RK6VectorS4_S4_fii

Decompiled

undefined (10 params)

/* CTakeDamageInfo::Init(CBaseEntity*, CBaseEntity*, CBaseEntity*, Vector const&, Vector const&,
   Vector const&, float, int, int) */

void __thiscall
CTakeDamageInfo::Init
          (CTakeDamageInfo *this,CBaseEntity *param_1,CBaseEntity *param_2,CBaseEntity *param_3,
          Vector *param_4,Vector *param_5,Vector *param_6,float param_7,int param_8,int param_9)

{
  undefined4 uVar1;
  undefined4 *puVar2;
  int iVar3;
  
  *(undefined4 *)(this + 0x5c) = 0;
  if (param_1 == (CBaseEntity *)0x0) {
    *(undefined4 *)(this + 0x30) = 0xffffffff;
    if (param_2 == (CBaseEntity *)0x0) {
      *(undefined4 *)(this + 0x34) = 0xffffffff;
      goto LAB_004c7864;
    }
LAB_004c784b:
    iVar3 = *(int *)param_2;
  }
  else {
    puVar2 = (undefined4 *)(**(code **)(*(int *)param_1 + 0xc))(param_1);
    *(undefined4 *)(this + 0x30) = *puVar2;
    if (param_2 != (CBaseEntity *)0x0) goto LAB_004c784b;
    iVar3 = *(int *)param_1;
    param_2 = param_1;
  }
  puVar2 = (undefined4 *)(**(code **)(iVar3 + 0xc))(param_2);
  *(undefined4 *)(this + 0x34) = *puVar2;
LAB_004c7864:
  if (param_3 == (CBaseEntity *)0x0) {
    *(undefined4 *)(this + 0x38) = 0xffffffff;
  }
  else {
    puVar2 = (undefined4 *)(**(code **)(*(int *)param_3 + 0xc))(param_3);
    *(undefined4 *)(this + 0x38) = *puVar2;
  }
  *(undefined4 *)(this + 0x44) = 0x7f7fffff;
  *(float *)(this + 0x3c) = param_7;
  *(int *)(this + 0x48) = param_8;
  *(float *)(this + 0x40) = param_7;
  *(int *)(this + 0x4c) = param_9;
  *(undefined4 *)this = *(undefined4 *)param_4;
  *(undefined4 *)(this + 4) = *(undefined4 *)(param_4 + 4);
  *(undefined4 *)(this + 8) = *(undefined4 *)(param_4 + 8);
  *(undefined4 *)(this + 0xc) = *(undefined4 *)param_5;
  *(undefined4 *)(this + 0x10) = *(undefined4 *)(param_5 + 4);
  *(undefined4 *)(this + 0x14) = *(undefined4 *)(param_5 + 8);
  *(undefined4 *)(this + 0x18) = *(undefined4 *)param_6;
  *(undefined4 *)(this + 0x1c) = *(undefined4 *)(param_6 + 4);
  uVar1 = *(undefined4 *)(param_6 + 8);
  *(undefined4 *)(this + 0x2c) = 0;
  *(undefined4 *)(this + 0x28) = 0;
  *(undefined4 *)(this + 0x20) = uVar1;
  *(undefined4 *)(this + 0x24) = 0;
  *(undefined4 *)(this + 0x54) = 0xffffffff;
  *(undefined4 *)(this + 0x58) = 0;
  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)