L L4D2node

CBaseEntity::CBaseEntity

0x00616a70 · 2530 bytes · __thiscall

_ZN11CBaseEntityC2Eb

Decompiled

undefined (2 params)

/* CBaseEntity::CBaseEntity(bool) */

void __thiscall CBaseEntity::CBaseEntity(CBaseEntity *this,bool param_1)

{
  CCollisionProperty *this_00;
  float fVar1;
  CBaseEdict *pCVar2;
  undefined4 uVar3;
  uint *puVar4;
  uint uVar5;
  int iVar6;
  int iVar7;
  undefined *puVar8;
  
  *(undefined ***)this = &PTR__CBaseEntity_00c60288;
                    /* try { // try from 00616a8e to 00616a92 has its CatchHandler @ 006175fe */
  CServerNetworkProperty::CServerNetworkProperty((CServerNetworkProperty *)(this + 0x24));
  this_00 = (CCollisionProperty *)(this + 0x194);
  *(undefined4 *)(this + 0x78) = 0;
  *(undefined4 *)(this + 0xa4) = 0;
  *(undefined4 *)(this + 0xa8) = 0;
  *(undefined4 *)(this + 0xac) = 0;
  *(undefined4 *)(this + 0xb0) = 0;
  *(undefined4 *)(this + 0xb4) = 0;
  *(undefined4 *)(this + 0xb8) = 0;
  *(undefined4 *)(this + 0xbc) = 0;
  *(undefined4 *)(this + 0xc0) = 0;
  *(undefined4 *)(this + 0xc4) = 0;
  *(undefined4 *)(this + 200) = 0;
  *(undefined4 *)(this + 0x10c) = 0xffffffff;
  *(undefined4 *)(this + 0x118) = 0xffffffff;
  *(undefined4 *)(this + 0x158) = 0;
  *(undefined4 *)(this + 0x15c) = 0;
  *(undefined4 *)(this + 0x160) = 0;
  *(undefined4 *)(this + 0x178) = 0xffffffff;
  *(undefined4 *)(this + 0x164) = 0xffffffff;
  *(undefined4 *)(this + 0x168) = 0xffffffff;
  *(undefined4 *)(this + 0x16c) = 0xffffffff;
  *(undefined4 *)(this + 0x170) = 0;
  *(undefined4 *)(this + 0x174) = 0;
  *(undefined4 *)(this + 0x17c) = 0;
  *(undefined4 *)(this + 0x180) = 0xffffffff;
  *(undefined4 *)(this + 0x188) = 0xffffffff;
  *(undefined4 *)(this + 0x18c) = 0xffffffff;
  *(undefined4 *)(this + 400) = 0xffffffff;
                    /* try { // try from 00616ba7 to 00616bab has its CatchHandler @ 006174e9 */
  CCollisionProperty::CCollisionProperty(this_00);
  *(undefined ***)(this + 0x194) = &PTR_GetEntityHandle_00c5fea8;
                    /* try { // try from 00616bbf to 00616bc3 has its CatchHandler @ 006175fc */
  CGlowProperty::CGlowProperty((CGlowProperty *)(this + 0x1f0));
  *(undefined ***)(this + 0x1f0) = &PTR_NetworkStateChanged_00c5ff18;
  *(undefined4 *)(this + 0x220) = 0xffffffff;
  *(undefined4 *)(this + 0x224) = 0xffffffff;
  *(undefined4 *)(this + 600) = 0xffffffff;
  *(undefined4 *)(this + 700) = 0xffffffff;
  *(undefined4 *)(this + 0x304) = 0;
  *(undefined4 *)(this + 0x310) = 0xffffffff;
  *(undefined4 *)(this + 0x314) = 0;
  *(undefined4 *)(this + 0x31c) = 0;
  *(undefined4 *)(this + 0x328) = 0xffffffff;
  *(undefined4 *)(this + 0x32c) = 0;
  *(undefined4 *)(this + 0x334) = 0;
  *(undefined4 *)(this + 0x340) = 0xffffffff;
  *(undefined4 *)(this + 0x344) = 0;
  *(undefined4 *)(this + 0x34c) = 0;
  *(undefined4 *)(this + 0x358) = 0xffffffff;
  *(undefined4 *)(this + 0x35c) = 0;
  *(undefined4 *)(this + 0x364) = 0;
  *(undefined4 *)(this + 0x370) = 0xffffffff;
  *(undefined4 *)(this + 0x374) = 0;
  *(undefined4 *)(this + 0x3b4) = 0xffffffff;
  *(undefined4 *)(this + 0x3c8) = 0xffffffff;
  *(undefined4 *)(this + 1000) = 0xffffffff;
  *(undefined4 *)(this + 0x3ec) = 0;
  *(undefined4 **)(this + 0x3f0) =
       &CUtlVectorUltraConservative<HSCRIPT__**,CUtlVectorUltraConservativeAllocator>::StaticData()
        ::staticData;
  *(undefined4 *)(this + 0x410) = 0;
  *(undefined2 *)(this + 0x414) = 0xffff;
  this[0x416] = (CBaseEntity)0x0;
  *(undefined4 *)(this + 0x418) = 0xffffffff;
  *(undefined4 *)(this + 0x41c) = 0;
  this[0x420] = (CBaseEntity)0x0;
  *(undefined4 *)(this + 0x43c) = 0xffffffff;
  *(undefined4 *)(this + 0x424) = 0;
  *(undefined4 *)(this + 0x428) = 0;
  *(undefined4 *)(this + 0x42c) = 0;
  *(undefined4 *)(this + 0x430) = 0;
  *(undefined4 *)(this + 0x434) = 0;
  *(undefined4 *)(this + 0x438) = 0;
                    /* try { // try from 00616d47 to 00617459 has its CatchHandler @ 00617583 */
  SetCellBits(this,5);
  UpdateCell(this);
  if (this[0x2fb] != (CBaseEntity)0x0) {
    if (this[0x6c] == (CBaseEntity)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseEntity)((byte)this[0x70] | 1);
    }
    this[0x2fb] = (CBaseEntity)0x0;
  }
  if (*(int *)(this + 0x234) != 0) {
    if (this[0x6c] == (CBaseEntity)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseEntity)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x234) = 0;
  }
  if (this[0x185] != (CBaseEntity)0x0) {
    if (this[0x6c] == (CBaseEntity)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseEntity)((byte)this[0x70] | 1);
    }
    this[0x185] = (CBaseEntity)0x0;
  }
  CCollisionProperty::Init(this_00,this);
  CServerNetworkProperty::Init((CServerNetworkProperty *)(this + 0x24),this);
  if (*(float *)(this + 0xc) == 1.0) {
    fVar1 = *(float *)(this + 0x228);
  }
  else {
    if (this[0x6c] == (CBaseEntity)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseEntity)((byte)this[0x70] | 1);
    }
    fVar1 = *(float *)(this + 0x228);
    *(undefined4 *)(this + 0xc) = 0x3f800000;
  }
  if (fVar1 == 0.0) {
    fVar1 = *(float *)(this + 0x22c);
  }
  else {
    if (this[0x6c] == (CBaseEntity)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseEntity)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x228) = 0;
    fVar1 = *(float *)(this + 0x22c);
  }
  if (fVar1 == 0.0) {
    fVar1 = *(float *)(this + 0x230);
  }
  else {
    if (this[0x6c] == (CBaseEntity)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseEntity)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x22c) = 0;
    fVar1 = *(float *)(this + 0x230);
  }
  if (fVar1 != 0.0) {
    if (this[0x6c] == (CBaseEntity)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseEntity)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x230) = 0;
  }
  this[0x128] = (CBaseEntity)0x0;
  *(uint *)(this + 0x14c) = *(uint *)(this + 0x14c) | 0xc40000;
  *(undefined4 *)(this + 0x110) = 0;
  *(undefined4 *)(this + 0x114) = 0;
  *(undefined4 *)(this + 0x238) = 0;
  if (*(float *)(this + 0x2c8) != 1.0) {
    if (this[0x6c] == (CBaseEntity)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseEntity)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x2c8) = 0x3f800000;
  }
  *(undefined4 *)(this + 0x244) = 0;
  if (*(float *)(this + 0x240) != 0.0) {
    if (this[0x6c] == (CBaseEntity)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseEntity)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x240) = 0;
  }
  if (this[0x124] != (CBaseEntity)0xff) {
    if (this[0x6c] == (CBaseEntity)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseEntity)((byte)this[0x70] | 1);
    }
    this[0x124] = (CBaseEntity)0xff;
  }
  if (this[0x125] != (CBaseEntity)0xff) {
    if (this[0x6c] == (CBaseEntity)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseEntity)((byte)this[0x70] | 1);
    }
    this[0x125] = (CBaseEntity)0xff;
  }
  if (this[0x126] != (CBaseEntity)0xff) {
    if (this[0x6c] == (CBaseEntity)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseEntity)((byte)this[0x70] | 1);
    }
    this[0x126] = (CBaseEntity)0xff;
  }
  if (this[0x127] != (CBaseEntity)0xff) {
    if (this[0x6c] == (CBaseEntity)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseEntity)((byte)this[0x70] | 1);
    }
    this[0x127] = (CBaseEntity)0xff;
  }
  *(undefined4 *)(this + 0x248) = 0;
  if (*(int *)(this + 0x24c) != 0) {
    if (this[0x6c] == (CBaseEntity)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseEntity)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x24c) = 0;
  }
  uVar3 = *(undefined4 *)(gpGlobals + 0x18);
  *(undefined4 *)(this + 300) = 0xffffffff;
  *(undefined4 *)(this + 0x9c) = uVar3;
  SetIdentityMatrix((matrix3x4_t *)(this + 0x28c));
  *(undefined4 *)(this + 700) = 0xffffffff;
  this[0x251] = (CBaseEntity)0x0;
  this[0x250] = (CBaseEntity)0x0;
  CCollisionProperty::SetSolid(this_00,0);
  CCollisionProperty::SetSolidFlags(this_00,0);
  SetMoveType(this,0,0);
  SetOwnerEntity(this,(CBaseEntity *)0x0);
  *(uint *)(this + 0x14c) = *(uint *)(this + 0x14c) & 0xfeffffff;
  if (*(short *)(this + 0x122) != 0) {
    if (this[0x6c] == (CBaseEntity)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseEntity)((byte)this[0x70] | 1);
    }
    *(undefined2 *)(this + 0x122) = 0;
  }
  DispatchUpdateTransmitState(this);
  *(undefined4 *)(this + 0x260) = 0;
  DispatchUpdateTransmitState(this);
  iVar6 = (**(code **)(*soundemitterbase + 0x88))(soundemitterbase,&DAT_00d539c2);
  if (iVar6 != *(int *)(this + 0xf4)) {
    if (this[0x6c] == (CBaseEntity)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar7 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar7 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseEntity)((byte)this[0x70] | 1);
    }
    *(int *)(this + 0xf4) = iVar6;
  }
  this[0x184] = (CBaseEntity)0x0;
  CCollisionProperty::SetCollisionBounds(this_00,(Vector *)&vec3_origin,(Vector *)&vec3_origin);
  ClearFlags(this);
  SetFriction(this,1.0);
  if (param_1) {
    *(uint *)(this + 0x14c) = *(uint *)(this + 0x14c) | 0x200;
  }
  puVar4 = *(uint **)(this + 0x30);
  if (puVar4 != (uint *)0x0) {
    *puVar4 = *puVar4 | 0x80;
  }
  *(uint *)(this + 0x14c) = *(uint *)(this + 0x14c) | 0x40000;
  *(undefined4 *)(this + 0x3d8) = 0;
  *(undefined4 *)(this + 0x3d4) = 0;
  *(undefined4 *)(this + 0x3d0) = 0xffffffff;
  this[0x3dc] = (CBaseEntity)0x0;
  if (*(float *)(this + 0x98) != 0.0) {
    if (this[0x6c] == (CBaseEntity)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseEntity)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x98) = 0;
  }
  uVar5 = *(uint *)(this + 0x118);
  this[0x10] = (CBaseEntity)0x1;
  if ((((uVar5 != 0xffffffff) &&
       (puVar8 = g_pEntityList + (uVar5 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar8 + 8) == uVar5 >> 0xc)) && (*(int *)(puVar8 + 4) != 0)) {
    if (this[0x6c] == (CBaseEntity)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar6 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBaseEntity)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x118) = 0xffffffff;
  }
  *(undefined4 *)(this + 0x404) = 0;
  *(undefined4 *)(this + 0x3fc) = 0;
  *(undefined4 *)(this + 0x400) = 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)