L L4D2node

CBasePlayer::CBasePlayer

0x007ba290 · 2407 bytes · __thiscall

_ZN11CBasePlayerC2Ev

Decompiled

undefined (1 param)

/* CBasePlayer::CBasePlayer() */

void __thiscall CBasePlayer::CBasePlayer(CBasePlayer *this)

{
  uint uVar1;
  CBaseEdict *pCVar2;
  edict_t *peVar3;
  CBasePlayer *pCVar4;
  CBasePlayer *pCVar5;
  int iVar6;
  int iVar7;
  undefined *puVar8;
  undefined *puVar9;
  
  CBaseCombatCharacter::CBaseCombatCharacter((CBaseCombatCharacter *)this);
  *(undefined ***)this = &PTR__CBasePlayer_00cba2e8;
                    /* try { // try from 007ba2b3 to 007ba2b7 has its CatchHandler @ 007bac29 */
  CPlayerLocalData::CPlayerLocalData((CPlayerLocalData *)(this + 0x1a40));
  this[0x1c1f] = (CBasePlayer)0x0;
  *(undefined ***)(this + 0x1a40) = &PTR_NetworkStateChanged_00cba2a0;
  *(undefined4 *)(this + 0x1c14) = 0xffffffff;
  *(undefined4 *)(this + 0x1c18) = 0xbf800000;
  this[0x1c1d] = (CBasePlayer)0x0;
  this[0x1c1c] = (CBasePlayer)0x0;
  *(undefined4 *)(this + 0x1c20) = 0;
  *(undefined4 *)(this + 0x1c24) = 0;
  *(undefined4 *)(this + 0x1c28) = 0x3f800000;
  *(undefined4 *)(this + 0x1c2c) = 0x3f800000;
  *(undefined4 *)(this + 0x1c30) = 0;
  this[0x1c37] = (CBasePlayer)0x0;
  this[0x1c35] = (CBasePlayer)0x0;
  this[0x1c34] = (CBasePlayer)0x0;
  *(undefined4 *)(this + 0x1c38) = 0;
  *(undefined4 *)(this + 0x1c3c) = 0;
  *(undefined4 *)(this + 0x1c40) = 0x3f800000;
  *(undefined4 *)(this + 0x1c44) = 0x3f800000;
  *(undefined4 *)(this + 0x1c48) = 0;
  *(undefined ***)(this + 0x1c10) = &PTR_NetworkStateChanged_00cba2b0;
  *(undefined4 *)(this + 0x1c4c) = 0;
  *(undefined4 *)(this + 0x1c50) = 0;
  *(undefined4 *)(this + 0x1c54) = 0;
  *(undefined4 *)(this + 0x1c58) = 0;
  *(undefined4 *)(this + 0x1c5c) = 0;
  *(undefined4 *)(this + 0x1c60) = 0xffffffff;
  *(undefined4 *)(this + 0x1c64) = 0xffffffff;
  *(undefined4 *)(this + 0x1c68) = 0;
  *(undefined4 *)(this + 0x1c6c) = 0;
  *(undefined4 *)(this + 0x1c70) = 0;
  *(undefined4 *)(this + 0x1c74) = 0;
  *(undefined4 *)(this + 0x1c78) = 0;
  *(undefined ***)(this + 0x1c7c) = &PTR_NetworkStateChanged_00cba2c0;
  *(undefined4 *)(this + 0x1d14) = 0xffffffff;
  *(undefined2 *)(this + 0x1fc6) = 0;
  *(undefined4 *)(this + 0x1d24) = 0xffffffff;
  *(undefined4 *)(this + 0x1d7c) = 0xffffffff;
  *(undefined4 *)(this + 0x1d84) = 0xffffffff;
  *(undefined4 *)(this + 0x1dbc) = 0xffffffff;
  *(undefined4 *)(this + 0x1dc0) = 0;
  *(undefined4 *)(this + 0x1dc4) = 0;
  *(undefined4 *)(this + 0x1dc8) = 0;
  *(undefined4 *)(this + 0x1dcc) = 0;
  *(undefined4 *)(this + 0x1dd0) = 0;
  *(undefined ***)(this + 0x1e18) = &PTR_NetworkStateChanged_00c23e10;
  *(undefined4 *)(this + 0x1e1c) = 0xbf800000;
  *(undefined4 *)(this + 0x1f80) = 0xbf800000;
  *(undefined4 *)(this + 0x1f84) = 0xffffffff;
  *(undefined4 *)(this + 0x1f88) = 0xffffffff;
  *(undefined ***)(this + 0x1f8c) = &PTR__CUserCmd_00c15058;
  *(undefined4 *)(this + 0x1f90) = 0;
  *(undefined4 *)(this + 0x1f94) = 0;
  *(undefined4 *)(this + 0x1f98) = 0;
  *(undefined4 *)(this + 0x1f9c) = 0;
  *(undefined4 *)(this + 0x1fa0) = 0;
  *(undefined4 *)(this + 0x1fa4) = 0;
  *(undefined4 *)(this + 0x1fa8) = 0;
  *(undefined4 *)(this + 0x1fac) = 0;
  *(undefined4 *)(this + 0x1fb0) = 0;
  this[0x1fb4] = (CBasePlayer)0x0;
  *(undefined4 *)(this + 0x1fb8) = 0;
  *(undefined4 *)(this + 0x1fbc) = 0;
  *(undefined4 *)(this + 0x1fc0) = 0;
  *(undefined2 *)(this + 0x1fc4) = 0;
  this[0x1fc8] = (CBasePlayer)0x0;
  *(undefined4 *)(this + 0x1fcc) = 0;
  *(undefined4 *)(this + 0x1fd0) = 0;
  *(undefined4 *)(this + 0x1fd4) = 0;
  *(undefined4 *)(this + 0x1fd8) = 0;
  *(undefined4 *)(this + 0x1fdc) = 0;
  *(undefined4 *)(this + 0x1fe0) = 0;
  *(undefined ***)(this + 0x1fe8) = &PTR_NetworkStateChanged_00c23e10;
  *(undefined4 *)(this + 0x1fec) = 0xbf800000;
  *(undefined4 *)(this + 0x200c) = 0xffffffff;
  *(undefined4 *)(this + 0x2064) = 0xffffffff;
  *(undefined4 *)(this + 0x2068) = 0;
  *(undefined4 *)(this + 0x206c) = 0;
  *(undefined4 *)(this + 0x2070) = 0;
  *(undefined4 *)(this + 0x2074) = 0;
  *(undefined4 *)(this + 0x2078) = 0;
  *(undefined4 *)(this + 0x2088) = 0xffffffff;
  *(undefined4 *)(this + 0x208c) = 0xffffffff;
  *(undefined ***)(this + 0x216c) = &PTR_SetAbsOrigin_00cbbba8;
  *(undefined ***)(this + 0x2170) = &PTR_GetName_00cbbc40;
  *(undefined4 *)(this + 0x2174) = 0;
  pCVar4 = this + 0x2190;
  do {
    *(undefined4 *)pCVar4 = 0;
    pCVar5 = pCVar4 + 0xac;
    *(undefined4 *)(pCVar4 + 4) = 0x3f800000;
    *(undefined4 *)(pCVar4 + 8) = 100;
    *(undefined4 *)(pCVar4 + 0xc) = 100;
    *(undefined4 *)(pCVar4 + 0x10) = 100;
    *(undefined4 *)(pCVar4 + 0x14) = 0x4b;
    pCVar4[0x20] = (CBasePlayer)0x0;
    pCVar4[0x18] = (CBasePlayer)0x0;
    *(undefined4 *)(pCVar4 + 0x1c) = 0;
    *(undefined4 *)(pCVar4 + 0xa0) = 0;
    *(undefined4 *)(pCVar4 + 0xa4) = 0;
    *(undefined2 *)(pCVar4 + 0xa8) = 0;
    pCVar4 = pCVar5;
  } while (pCVar5 != this + 0x22e8);
  *(undefined2 *)(this + 0x22fe) = 0xffff;
  *(undefined2 *)(this + 0x22f4) = 0xffff;
  *(undefined2 *)(this + 0x22f6) = 0xffff;
  *(undefined2 *)(this + 0x22f8) = 0xffff;
  *(undefined2 *)(this + 0x22fa) = 0;
  *(undefined2 *)(this + 0x2312) = 0xffff;
  *(undefined2 *)(this + 0x2314) = 0xffff;
  *(undefined2 *)(this + 0x2316) = 0;
  *(undefined2 *)(this + 0x2318) = 0;
  peVar3 = s_PlayerEdict;
  *(uint *)(this + 0x14c) = *(uint *)(this + 0x14c) | 0x400;
  *(undefined4 *)(this + 0x22e8) = 0;
  *(undefined4 *)(this + 0x22ec) = 0;
  *(undefined2 *)(this + 0x22fc) = 0;
  *(undefined4 *)(this + 0x22f0) = 0;
  *(undefined4 *)(this + 0x2300) = 0;
  *(undefined4 *)(this + 0x2304) = 0;
  *(undefined4 *)(this + 0x2308) = 0;
  *(undefined4 *)(this + 0x230c) = 0;
  *(undefined2 *)(this + 0x231a) = 0xffff;
  *(undefined2 *)(this + 0x2310) = 0xffff;
  *(undefined4 *)(this + 0x231c) = 0;
  *(undefined4 *)(this + 0x2338) = 0xffffffff;
  *(undefined4 *)(this + 0x2344) = 0;
  *(undefined4 *)(this + 0x234c) = 0xffffffff;
  *(undefined4 *)(this + 0x2350) = 0;
  *(undefined4 *)(this + 0x2354) = 0;
  *(undefined4 *)(this + 0x2358) = 0;
  *(undefined4 *)(this + 0x235c) = 0;
  *(undefined4 *)(this + 0x2360) = 0;
  *(undefined4 *)(this + 0x1f50) = 0;
  *(undefined4 *)(this + 0x1f54) = 0;
  *(undefined4 *)(this + 0x1f58) = 0;
  if (peVar3 != (edict_t *)0x0) {
                    /* try { // try from 007ba7c8 to 007babd5 has its CatchHandler @ 007bac3b */
    CServerNetworkProperty::AttachEdict((CServerNetworkProperty *)(this + 0x24),peVar3);
    s_PlayerEdict = (edict_t *)0x0;
  }
  *(undefined4 *)(this + 0x2028) = 0xbf800000;
  *(undefined4 *)(this + 0x1c94) = 1;
  this[0x1ca4] = (CBasePlayer)0x0;
  *(undefined4 *)(this + 0x1ca8) = 0;
  this[0x20a9] = (CBasePlayer)0x0;
  *(undefined4 *)(this + 0x1cac) = 0;
  if (*(int *)(this + 0x100) != 0) {
    (**(code **)(*(int *)this + 0x214))(this,this + 0x100);
    *(undefined4 *)(this + 0x100) = 0;
  }
  Weapon_SetLast(this,(CBaseCombatWeapon *)0x0);
  uVar1 = *(uint *)(this + 0x1d24);
  this[0x2050] = (CBasePlayer)0x0;
  *(undefined4 *)(this + 0x1d54) = 0;
  if ((((uVar1 != 0xffffffff) &&
       (puVar9 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar9 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar9 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar9 + 4) != 0)) {
    if (this[0x6c] == (CBasePlayer)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] = (CBasePlayer)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x1d24) = 0xffffffff;
  }
  *(undefined4 *)(this + 0x1fe4) = 0;
  iVar6 = (**(code **)(*g_pGameRules + 0x78))(g_pGameRules);
  if (iVar6 != *(int *)(this + 0x1d6c)) {
    if (this[0x6c] == (CBasePlayer)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] = (CBasePlayer)((byte)this[0x70] | 1);
    }
    *(int *)(this + 0x1d6c) = iVar6;
  }
  uVar1 = *(uint *)(this + 0x1d84);
  if (((uVar1 != 0xffffffff) &&
      (puVar9 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar9 != (undefined *)0xfffffffc)) &&
     ((*(uint *)(puVar9 + 8) == uVar1 >> 0xc && (*(int *)(puVar9 + 4) != 0)))) {
    if (this[0x6c] == (CBasePlayer)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] = (CBasePlayer)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x1d84) = 0xffffffff;
  }
  *(undefined4 *)(this + 0x1cec) = 0x14;
  *(undefined4 *)(this + 0x1cf0) = 0x3dcccccd;
  this[0x1cf5] = (CBasePlayer)0x1;
  this[0x1cf4] = (CBasePlayer)0x0;
  if (*(float *)(this + 0x20cc) != 1.0) {
    if (this[0x6c] == (CBasePlayer)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] = (CBasePlayer)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x20cc) = 0x3f800000;
  }
  *(undefined4 *)(this + 0x1a3c) = 0;
  *(undefined4 *)(this + 0x17fc) = 0x3f800000;
  *(undefined4 *)(this + 0x2060) = 0;
  *(CBasePlayer **)(this + 0x2174) = this;
  this[0x2348] = (CBasePlayer)0x0;
  ResetObserverMode(this);
  uVar1 = *(uint *)(this + 0x1c60);
  *(undefined4 *)(this + 0x2178) = 0;
  *(undefined4 *)(this + 0x217c) = 0;
  puVar9 = g_pEntityList;
  *(undefined4 *)(this + 0x2180) = 0x3f800000;
  this[0x2184] = (CBasePlayer)0x0;
  this[0x2185] = (CBasePlayer)0x0;
  *(undefined4 *)(this + 0x1dac) = 0;
  *(undefined4 *)(this + 0x1db0) = 0;
  *(undefined4 *)(this + 0x1db4) = 0xbf800000;
  *(undefined4 *)(this + 0x1db8) = 0;
  this[0x218c] = (CBasePlayer)0x0;
  *(undefined4 *)(this + 0x2030) = 0;
  this[0x2034] = (CBasePlayer)0x0;
  this[0x1df9] = (CBasePlayer)0x0;
  *(undefined4 *)(this + 0x2320) = 0;
  *(undefined4 *)(this + 0x2324) = 0;
  *(undefined4 *)(this + 9000) = 0x3f800000;
  *(undefined4 *)(this + 0x1cc0) = 0;
  *(undefined4 *)(this + 0x1cc4) = 0;
  *(undefined4 *)(this + 0x2114) = 0xffffffff;
  *(undefined4 *)(this + 0x2038) = 0;
  *(undefined4 *)(this + 0x203c) = 0;
  this[0x2349] = (CBasePlayer)0x0;
  *(undefined4 *)(this + 0x234c) = 0xffffffff;
  if (((uVar1 != 0xffffffff) &&
      (puVar8 = puVar9 + (uVar1 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
     ((*(uint *)(puVar8 + 8) == uVar1 >> 0xc && (*(int *)(puVar8 + 4) != 0)))) {
    if (this[0x6c] == (CBasePlayer)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar6 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar6 + 2) = 0;
        puVar9 = g_pEntityList;
      }
    }
    else {
      this[0x70] = (CBasePlayer)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x1c60) = 0xffffffff;
  }
  uVar1 = *(uint *)(this + 0x1c64);
  if ((((uVar1 != 0xffffffff) &&
       (puVar9 = puVar9 + (uVar1 & 0xfff) * 0x10, puVar9 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar9 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar9 + 4) != 0)) {
    if (this[0x6c] == (CBasePlayer)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] = (CBasePlayer)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x1c64) = 0xffffffff;
    return;
  }
  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)