L L4D2node

CBaseCombatCharacter::CBaseCombatCharacter

0x005f7360 · 790 bytes · __thiscall

_ZN20CBaseCombatCharacterC1Ev

Decompiled

undefined (1 param)

/* CBaseCombatCharacter::CBaseCombatCharacter() */

void __thiscall CBaseCombatCharacter::CBaseCombatCharacter(CBaseCombatCharacter *this)

{
  uint uVar1;
  CBaseEdict *pCVar2;
  CBaseCombatCharacter *pCVar3;
  int iVar4;
  undefined *puVar5;
  CBaseCombatCharacter *pCVar6;
  CBaseCombatCharacter *pCVar7;
  undefined4 local_20 [4];
  
  CBaseFlex::CBaseFlex((CBaseFlex *)this);
  *(undefined ***)this = &PTR__CBaseCombatCharacter_00c5b7a8;
  *(undefined4 *)(this + 0x1848) = 0;
  *(undefined4 *)(this + 0x184c) = 0;
  *(undefined4 *)(this + 0x1850) = 0;
  *(undefined4 *)(this + 0x1854) = 0;
  *(undefined4 *)(this + 0x1858) = 0;
  *(undefined4 *)(this + 0x185c) = 0;
  *(undefined4 *)(this + 0x1860) = 0;
  *(undefined4 *)(this + 0x1864) = 0;
  *(undefined4 *)(this + 0x1868) = 0;
  *(undefined4 *)(this + 0x186c) = 0;
  *(undefined4 *)(this + 0x1870) = 0xffffffff;
  pCVar3 = this + 0x18f4;
  do {
    *(undefined4 *)pCVar3 = 0xffffffff;
    pCVar3 = pCVar3 + 4;
  } while (pCVar3 != this + 0x19d4);
  *(undefined4 *)(this + 0x19d4) = 0xffffffff;
  pCVar3 = this + 0x19e4;
  *(undefined ***)(this + 0x19d8) = &PTR_NetworkStateChanged_00c23e10;
  *(undefined4 *)(this + 0x19dc) = 0xbf800000;
  pCVar6 = pCVar3;
  do {
    pCVar7 = pCVar6 + 0xc;
    *(undefined ***)(this + (int)(pCVar6 + (0x19e8 - (int)pCVar3))) =
         &PTR_NetworkStateChanged_00c23e10;
    *(undefined4 *)(this + (int)(pCVar6 + (0x19ec - (int)pCVar3))) = 0xbf800000;
    pCVar6 = pCVar7;
  } while (pCVar7 != this + 0x1a14);
  *(undefined4 *)(this + 0x1a18) = 0;
  uVar1 = *(uint *)(this + 0x19d4);
  *(undefined4 *)(this + 0x1a1c) = 0;
  puVar5 = g_pEntityList;
  *(undefined4 *)(this + 0x1a20) = 0;
  *(undefined4 *)(this + 0x1a24) = 0xbf800000;
  *(undefined ***)(this + 0x1a2c) = &PTR_NetworkStateChanged_00c0b6e0;
  *(undefined4 *)(this + 0x1a30) = 0;
  *(undefined4 *)(this + 0x1a34) = 0xbf800000;
  *(undefined4 *)(this + 0x183c) = 0;
  if ((((uVar1 != 0xffffffff) &&
       (puVar5 = puVar5 + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar5 + 4) != 0)) {
    if (this[0x6c] == (CBaseCombatCharacter)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar4 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseCombatCharacter)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x19d4) = 0xffffffff;
  }
                    /* try { // try from 005f74ea to 005f7666 has its CatchHandler @ 005f7682 */
  RemoveAllAmmo(this);
  if (*(float *)(this + 0x19dc) != -1.0) {
    (**(code **)(*(int *)(this + 0x19d8) + 4))(this + 0x19d8,this + 0x19dc);
    *(undefined4 *)(this + 0x19dc) = 0xbf800000;
  }
  *(undefined4 *)(this + 0x19e0) = 0;
  *(undefined4 *)(this + 0x19e4) = 0xffffffff;
  *(undefined4 *)(this + 0x19f0) = 0xffffffff;
  *(undefined4 *)(this + 0x19fc) = 0xffffffff;
  *(undefined4 *)(this + 0x1a08) = 0xffffffff;
  *(undefined4 *)(this + 0x1a14) = 0;
  *(undefined4 *)(this + 0x1a28) = 0xffffffff;
  pCVar3 = this + 0x18f8;
  pCVar6 = this + 0x18f4;
  while( true ) {
    pCVar7 = pCVar3;
    local_20[0] = 0xffffffff;
    iVar4 = memcmp(pCVar6,local_20,4);
    if (iVar4 != 0) {
      if (this[0x6c] == (CBaseCombatCharacter)0x0) {
        pCVar2 = *(CBaseEdict **)(this + 0x30);
        if (pCVar2 != (CBaseEdict *)0x0) {
          *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
          iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
          *(undefined2 *)(iVar4 + 2) = 0;
        }
      }
      else {
        this[0x70] = (CBaseCombatCharacter)((byte)this[0x70] | 1);
      }
      *(undefined4 *)(pCVar7 + -4) = local_20[0];
    }
    if (pCVar7 == this + 0x19d4) break;
    pCVar3 = pCVar7 + 4;
    pCVar6 = pCVar7;
  }
  _V_memset(this + 0x1800,0,0x38);
  *(undefined4 *)(this + 0x17fc) = 0x3f800000;
  iVar4 = *(int *)(ai_force_serverside_ragdoll._28_4_ + 0x30);
  *(undefined4 *)(this + 0x1a38) = 0xffffffff;
  this[0x17d8] = (CBaseCombatCharacter)(iVar4 != 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)