L L4D2node

CBasePlayer::PostThink

0x007b5640 · 6005 bytes · __thiscall

_ZN11CBasePlayer9PostThinkEv

Decompiled

undefined (1 param)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CBasePlayer::PostThink() */

void __thiscall CBasePlayer::PostThink(CBasePlayer *this)

{
  CBaseEdict *pCVar1;
  int *piVar2;
  char cVar3;
  int iVar4;
  int iVar5;
  uint uVar6;
  undefined *puVar7;
  CBasePlayer *pCVar8;
  float fVar9;
  float fVar10;
  float fVar11;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_2c;
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  CBasePlayer *local_1c;
  undefined4 local_18;
  undefined4 local_14;
  CBasePlayer *local_10;
  
  local_34 = 0;
  local_30 = 0;
  if (___atan2f_finite == (CBasePlayer *)0x0) {
    local_1c = (CBasePlayer *)0x0;
  }
  else {
    (**(code **)(___atan2f_finite + 0x50))
              (___atan2f_finite,&local_34,0,0,0,0,"/data/src/game/server/player.cpp",0x1239,
               &PostThink()::tm_fmt,"(%s)%s","Unaccounted","CBasePlayer::PostThink");
    local_1c = ___atan2f_finite;
  }
  iVar5 = _DAT_0105db00;
  local_24 = local_34;
  local_20 = local_30;
                    /* try { // try from 007b5846 to 007b5894 has its CatchHandler @ 007b6f06 */
  if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
     (iVar4 = ThreadGetCurrentId(), iVar5 == iVar4)) {
    if (*(char **)_DAT_0105d15c != "CBasePlayer::PostThink") {
      _DAT_0105d15c =
           (CBasePlayer *)
           CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcb88d9,(char *)0x1,0xbfafa1);
    }
    CVProfNode::EnterScope();
    DAT_0105d158 = '\0';
  }
  if (((byte)this[0x14d] & 0x10) != 0) {
                    /* try { // try from 007b56fe to 007b57dc has its CatchHandler @ 007b6f77 */
    CBaseEntity::CalcAbsoluteVelocity((CBaseEntity *)this);
  }
  *(float *)(this + 0x1df0) = *(float *)(this + 0x1df0) * 0.9 + *(float *)(this + 0x278) * 0.1;
  *(float *)(this + 0x1df4) = *(float *)(this + 0x1df4) * 0.9 + *(float *)(this + 0x27c) * 0.1;
  *(float *)(this + 0x1dec) = *(float *)(this + 0x1dec) * 0.9 + *(float *)(this + 0x274) * 0.1;
  (**(code **)(*(int *)this + 0x784))(this);
  if ((g_fGameOver != '\0') || (*(int *)(this + 0x1f7c) != 0)) {
    uVar6 = *(uint *)(this + 0x200c);
    if (((uVar6 != 0xffffffff) &&
        ((puVar7 = g_pEntityList + (uVar6 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc &&
         (*(uint *)(puVar7 + 8) == uVar6 >> 0xc)))) && (*(int *)(puVar7 + 4) != 0)) {
      if (this[0x6c] == (CBasePlayer)0x0) {
        pCVar1 = *(CBaseEdict **)(this + 0x30);
        if (pCVar1 != (CBaseEdict *)0x0) {
          *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
                    /* try { // try from 007b5f8d to 007b6027 has its CatchHandler @ 007b6f77 */
          iVar5 = CBaseEdict::GetChangeAccessor(pCVar1);
          *(undefined2 *)(iVar5 + 2) = 0;
        }
      }
      else {
        this[0x70] = (CBasePlayer)((byte)this[0x70] | 1);
      }
      *(undefined4 *)(this + 0x200c) = 0xffffffff;
    }
    goto LAB_007b57ca;
  }
  cVar3 = (**(code **)(*(int *)this + 300))(this);
  if ((cVar3 == '\0') && (this[0x104] != (CBasePlayer)0x3)) {
    *(undefined4 *)(this + 0x2020) = 0;
  }
  else {
    local_2c = 0;
    local_28 = 0;
    if (___atan2f_finite == (CBasePlayer *)0x0) {
      local_10 = (CBasePlayer *)0x0;
    }
    else {
      (**(code **)(___atan2f_finite + 0x50))
                (___atan2f_finite,&local_2c,0,0,0,0,"/data/src/game/server/player.cpp",0x1243,
                 &PostThink()::tm_fmt,"(%s)%s","Unaccounted","CBasePlayer::PostThink-Bounds");
      local_10 = ___atan2f_finite;
    }
    iVar5 = _DAT_0105db00;
    local_18 = local_2c;
    local_14 = local_28;
                    /* try { // try from 007b65be to 007b660c has its CatchHandler @ 007b6ef2 */
    if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
       (iVar4 = ThreadGetCurrentId(), iVar5 == iVar4)) {
      if (*(char **)_DAT_0105d15c != "CBasePlayer::PostThink-Bounds") {
        _DAT_0105d15c =
             (CBasePlayer *)
             CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcb88f0,(char *)0x1,0xbfafa1);
      }
      CVProfNode::EnterScope();
      DAT_0105d158 = '\0';
    }
                    /* try { // try from 007b605c to 007b6061 has its CatchHandler @ 007b6f4c */
    pCVar8 = this;
    (**(code **)(*(int *)this + 0x5b8))(this);
    iVar5 = _DAT_0105db00;
    if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
       (iVar4 = ThreadGetCurrentId(), iVar5 == iVar4)) {
      pCVar8 = _DAT_0105d15c;
      cVar3 = CVProfNode::ExitScope();
      if (cVar3 != '\0') {
        _DAT_0105d15c = *(CBasePlayer **)(_DAT_0105d15c + 100);
      }
      DAT_0105d158 = _DAT_0105d15c == (CBasePlayer *)0x105d160;
    }
    if (local_10 != (CBasePlayer *)0x0) {
      pCVar8 = local_10;
      (**(code **)(local_10 + 0x54))(local_10,local_18,local_14,0,0,0);
    }
    local_2c = 0;
    local_28 = 0;
    if (___atan2f_finite == (CBasePlayer *)0x0) {
      local_10 = (CBasePlayer *)0x0;
    }
    else {
                    /* try { // try from 007b6125 to 007b6127 has its CatchHandler @ 007b6f77 */
      pCVar8 = ___atan2f_finite;
      (**(code **)(___atan2f_finite + 0x50))
                (___atan2f_finite,&local_2c,0,0,0,0,"/data/src/game/server/player.cpp",0x1248,
                 &PostThink()::tm_fmt,"(%s)%s","Unaccounted","CBasePlayer::PostThink-Use");
      local_10 = ___atan2f_finite;
    }
    iVar5 = _DAT_0105db00;
    local_18 = local_2c;
    local_14 = local_28;
                    /* try { // try from 007b650e to 007b655c has its CatchHandler @ 007b6eee */
    if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
       (iVar4 = ThreadGetCurrentId(pCVar8), iVar5 == iVar4)) {
      if (*(char **)_DAT_0105d15c != "CBasePlayer::PostThink-Use") {
        _DAT_0105d15c =
             (CBasePlayer *)
             CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcb890e,(char *)0x1,0xbfafa1);
      }
      pCVar8 = _DAT_0105d15c;
      CVProfNode::EnterScope();
      DAT_0105d158 = '\0';
    }
    uVar6 = *(uint *)(this + 0x1d14);
    if ((((uVar6 != 0xffffffff) &&
         (puVar7 = g_pEntityList + (uVar6 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
        (*(uint *)(puVar7 + 8) == uVar6 >> 0xc)) &&
       (piVar2 = *(int **)(puVar7 + 4), piVar2 != (int *)0x0)) {
                    /* try { // try from 007b693c to 007b6951 has its CatchHandler @ 007b6ede */
      cVar3 = (**(code **)(*piVar2 + 0x164))(piVar2,this);
                    /* try { // try from 007b6d4b to 007b6dbd has its CatchHandler @ 007b6ede */
                    /* try { // try from 007b6e98 to 007b6e9c has its CatchHandler @ 007b6ede */
      if ((cVar3 == '\0') ||
         (((iVar5 = CBaseCombatCharacter::GetActiveWeapon((CBaseCombatCharacter *)this), iVar5 != 0
           && (iVar5 = CBaseCombatCharacter::GetActiveWeapon((CBaseCombatCharacter *)this),
              (*(byte *)(iVar5 + 0xd4) & 0x20) == 0)) &&
          (iVar5 = CBaseCombatCharacter::GetActiveWeapon((CBaseCombatCharacter *)this),
          *(int *)(iVar5 + 0x1448) != 0xb6)))) {
        pCVar8 = this;
        ClearUseEntity(this);
      }
      else {
        uVar6 = *(uint *)(this + 0x1d14);
        pCVar8 = (CBasePlayer *)0x0;
        if (((uVar6 != 0xffffffff) &&
            (puVar7 = g_pEntityList + (uVar6 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
           (*(uint *)(puVar7 + 8) == uVar6 >> 0xc)) {
          pCVar8 = *(CBasePlayer **)(puVar7 + 4);
        }
        (**(code **)(*(int *)pCVar8 + 0x1ac))(pCVar8,this,this,2,0x40000000);
      }
    }
    iVar5 = _DAT_0105db00;
    if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
       (iVar4 = ThreadGetCurrentId(pCVar8), iVar5 == iVar4)) {
      pCVar8 = _DAT_0105d15c;
      cVar3 = CVProfNode::ExitScope();
      if (cVar3 != '\0') {
        _DAT_0105d15c = *(CBasePlayer **)(_DAT_0105d15c + 100);
      }
      DAT_0105d158 = _DAT_0105d15c == (CBasePlayer *)0x105d160;
    }
    if (local_10 != (CBasePlayer *)0x0) {
      pCVar8 = local_10;
      (**(code **)(local_10 + 0x54))(local_10,local_18,local_14,0,0,0);
    }
    local_2c = 0;
    local_28 = 0;
    if (___atan2f_finite == (CBasePlayer *)0x0) {
      local_10 = (CBasePlayer *)0x0;
    }
    else {
                    /* try { // try from 007b624c to 007b624e has its CatchHandler @ 007b6f77 */
      pCVar8 = ___atan2f_finite;
      (**(code **)(___atan2f_finite + 0x50))
                (___atan2f_finite,&local_2c,0,0,0,0,"/data/src/game/server/player.cpp",0x1260,
                 &PostThink()::tm_fmt,"(%s)%s","Unaccounted","CBasePlayer::PostThink-ItemPostFrame")
      ;
      local_10 = ___atan2f_finite;
    }
    iVar5 = _DAT_0105db00;
    local_18 = local_2c;
    local_14 = local_28;
                    /* try { // try from 007b645e to 007b64ac has its CatchHandler @ 007b6ef0 */
    if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
       (iVar4 = ThreadGetCurrentId(pCVar8), iVar5 == iVar4)) {
      if (*(char **)_DAT_0105d15c != "CBasePlayer::PostThink-ItemPostFrame") {
        _DAT_0105d15c =
             (CBasePlayer *)
             CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcb95c4,(char *)0x1,0xbfafa1);
      }
      CVProfNode::EnterScope();
      DAT_0105d158 = '\0';
    }
                    /* try { // try from 007b6283 to 007b6288 has its CatchHandler @ 007b6ef4 */
    (**(code **)(*(int *)this + 0x6bc))(this);
    iVar5 = _DAT_0105db00;
    if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
       (iVar4 = ThreadGetCurrentId(), iVar5 == iVar4)) {
      cVar3 = CVProfNode::ExitScope();
      if (cVar3 != '\0') {
        _DAT_0105d15c = *(CBasePlayer **)(_DAT_0105d15c + 100);
      }
      DAT_0105d158 = _DAT_0105d15c == (CBasePlayer *)0x105d160;
    }
    if (local_10 != (CBasePlayer *)0x0) {
      (**(code **)(local_10 + 0x54))(local_10,local_18,local_14,0,0,0);
    }
    if (((byte)this[0x150] & 1) != 0) {
      fVar9 = *(float *)(this + 0x1aa4);
      if (64.0 < fVar9) {
                    /* try { // try from 007b696a to 007b6a2e has its CatchHandler @ 007b6f77 */
        cVar3 = (**(code **)(*g_pGameRules + 0x88))(g_pGameRules);
        if (cVar3 == '\0') {
          fVar9 = *(float *)(this + 0x1aa4);
          if (((byte)this[0x14d] & 8) != 0) {
            CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
          }
          CSoundEnt::InsertSound
                    (4,(Vector *)(this + 0x2e0),(int)fVar9,0.2,(CBaseEntity *)this,0,
                     (CBaseEntity *)0x0);
        }
        fVar9 = *(float *)(this + 0x1aa4);
      }
      if (fVar9 != 0.0) {
        (**(code **)(*(int *)(this + 0x1a40) + 4))(this + 0x1a40,this + 0x1aa4);
        *(undefined4 *)(this + 0x1aa4) = 0;
      }
    }
    local_2c = 0;
    local_28 = 0;
    if (___atan2f_finite == (CBasePlayer *)0x0) {
      local_10 = (CBasePlayer *)0x0;
    }
    else {
                    /* try { // try from 007b6376 to 007b6378 has its CatchHandler @ 007b6f77 */
      (**(code **)(___atan2f_finite + 0x50))
                (___atan2f_finite,&local_2c,0,0,0,0,"/data/src/game/server/player.cpp",0x126f,
                 &PostThink()::tm_fmt,"(%s)%s","Unaccounted","CBasePlayer::PostThink-Animation");
      local_10 = ___atan2f_finite;
    }
    iVar5 = _DAT_0105db00;
    local_18 = local_2c;
    local_14 = local_28;
                    /* try { // try from 007b6626 to 007b6674 has its CatchHandler @ 007b6eb2 */
    if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
       (iVar4 = ThreadGetCurrentId(), iVar5 == iVar4)) {
      if (*(char **)_DAT_0105d15c != "CBasePlayer::PostThink-Animation") {
        _DAT_0105d15c =
             (CBasePlayer *)
             CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcb95ec,(char *)0x1,0xbfafa1);
      }
      CVProfNode::EnterScope();
      DAT_0105d158 = '\0';
    }
                    /* try { // try from 007b63ad to 007b6403 has its CatchHandler @ 007b6f39 */
    cVar3 = (**(code **)(*(int *)this + 0x4fc))(this);
    if (cVar3 == '\0') {
      if (((byte)this[0x14d] & 0x10) == 0) {
        if (*(float *)(this + 0x274) == 0.0) {
LAB_007b63e0:
          if (*(float *)(this + 0x278) == 0.0) {
            (**(code **)(*(int *)this + 0x620))(this,0);
            goto LAB_007b6840;
          }
          uVar6 = *(uint *)(this + 0x14c) & 0x1000;
          goto LAB_007b67fb;
        }
      }
      else {
                    /* try { // try from 007b6dcb to 007b6e01 has its CatchHandler @ 007b6f39 */
        CBaseEntity::CalcAbsoluteVelocity((CBaseEntity *)this);
        uVar6 = *(uint *)(this + 0x14c) & 0x1000;
        if (*(float *)(this + 0x274) == 0.0) {
          if (uVar6 != 0) {
            CBaseEntity::CalcAbsoluteVelocity((CBaseEntity *)this);
          }
          goto LAB_007b63e0;
        }
LAB_007b67fb:
        if (uVar6 != 0) {
                    /* try { // try from 007b6802 to 007b683f has its CatchHandler @ 007b6f39 */
          CBaseEntity::CalcAbsoluteVelocity((CBaseEntity *)this);
        }
      }
      if (*(float *)(this + 0x274) == 0.0) {
        if (((byte)this[0x14d] & 0x10) != 0) {
                    /* try { // try from 007b6e8b to 007b6e8f has its CatchHandler @ 007b6f39 */
          CBaseEntity::CalcAbsoluteVelocity((CBaseEntity *)this);
        }
        if (*(float *)(this + 0x278) != 0.0) goto LAB_007b6818;
LAB_007b6821:
        if ((byte)this[0x253] < 2) goto LAB_007b6840;
      }
      else {
LAB_007b6818:
        if (((byte)this[0x150] & 1) == 0) goto LAB_007b6821;
      }
      (**(code **)(*(int *)this + 0x620))(this,1);
    }
    else {
                    /* try { // try from 007b6d1d to 007b6d22 has its CatchHandler @ 007b6f39 */
      (**(code **)(*(int *)this + 0x620))(this,6);
    }
LAB_007b6840:
    iVar5 = _DAT_0105db00;
    if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
       (iVar4 = ThreadGetCurrentId(), iVar5 == iVar4)) {
      cVar3 = CVProfNode::ExitScope();
      if (cVar3 != '\0') {
        _DAT_0105d15c = *(CBasePlayer **)(_DAT_0105d15c + 100);
      }
      DAT_0105d158 = _DAT_0105d15c == (CBasePlayer *)0x105d160;
    }
    if (local_10 != (CBasePlayer *)0x0) {
      (**(code **)(local_10 + 0x54))(local_10,local_18,local_14,0,0,0);
    }
  }
  if (*(int *)(this + 0x494) == -1) {
                    /* try { // try from 007b6d3b to 007b6d3f has its CatchHandler @ 007b6f77 */
    CBaseAnimating::SetSequence((CBaseAnimating *)this,0);
  }
  local_2c = 0;
  local_28 = 0;
  if (___atan2f_finite == (CBasePlayer *)0x0) {
    local_10 = (CBasePlayer *)0x0;
  }
  else {
    (**(code **)(___atan2f_finite + 0x50))
              (___atan2f_finite,&local_2c,0,0,0,0,"/data/src/game/server/player.cpp",0x1285,
               &PostThink()::tm_fmt,"(%s)%s","Unaccounted",
               "CBasePlayer::PostThink-StudioFrameAdvance");
    local_10 = ___atan2f_finite;
  }
  iVar5 = _DAT_0105db00;
  local_18 = local_2c;
  local_14 = local_28;
                    /* try { // try from 007b5a6c to 007b5a70 has its CatchHandler @ 007b6fab */
  if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
     (iVar4 = ThreadGetCurrentId(), iVar5 == iVar4)) {
    if (*(char **)_DAT_0105d15c != "CBasePlayer::PostThink-StudioFrameAdvance") {
                    /* try { // try from 007b6ca0 to 007b6cb1 has its CatchHandler @ 007b6fab */
      _DAT_0105d15c =
           (CBasePlayer *)
           CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcb9610,(char *)0x1,0xbfafa1);
    }
    CVProfNode::EnterScope();
    DAT_0105d158 = '\0';
  }
                    /* try { // try from 007b5a7e to 007b5a83 has its CatchHandler @ 007b6f98 */
  pCVar8 = this;
  (**(code **)(*(int *)this + 0x32c))(this);
  iVar5 = _DAT_0105db00;
  if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
     (iVar4 = ThreadGetCurrentId(), iVar5 == iVar4)) {
    pCVar8 = _DAT_0105d15c;
    cVar3 = CVProfNode::ExitScope();
    if (cVar3 != '\0') {
      _DAT_0105d15c = *(CBasePlayer **)(_DAT_0105d15c + 100);
    }
    DAT_0105d158 = _DAT_0105d15c == (CBasePlayer *)0x105d160;
  }
  if (local_10 != (CBasePlayer *)0x0) {
    pCVar8 = local_10;
    (**(code **)(local_10 + 0x54))(local_10,local_18,local_14,0,0,0);
  }
  local_2c = 0;
  local_28 = 0;
  if (___atan2f_finite == (CBasePlayer *)0x0) {
    local_10 = (CBasePlayer *)0x0;
  }
  else {
                    /* try { // try from 007b5b51 to 007b5b53 has its CatchHandler @ 007b6f77 */
    pCVar8 = ___atan2f_finite;
    (**(code **)(___atan2f_finite + 0x50))
              (___atan2f_finite,&local_2c,0,0,0,0,"/data/src/game/server/player.cpp",0x1289,
               &PostThink()::tm_fmt,"(%s)%s","Unaccounted",
               "CBasePlayer::PostThink-DispatchAnimEvents");
    local_10 = ___atan2f_finite;
  }
  iVar5 = _DAT_0105db00;
  local_18 = local_2c;
  local_14 = local_28;
                    /* try { // try from 007b5b82 to 007b5b86 has its CatchHandler @ 007b6f72 */
  if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
     (iVar4 = ThreadGetCurrentId(pCVar8), iVar5 == iVar4)) {
    if (*(char **)_DAT_0105d15c != "CBasePlayer::PostThink-DispatchAnimEvents") {
                    /* try { // try from 007b6c20 to 007b6c31 has its CatchHandler @ 007b6f72 */
      _DAT_0105d15c =
           (CBasePlayer *)
           CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcb963c,(char *)0x1,0xbfafa1);
    }
    CVProfNode::EnterScope();
    DAT_0105d158 = '\0';
  }
                    /* try { // try from 007b5b98 to 007b5b9d has its CatchHandler @ 007b6f5f */
  (**(code **)(*(int *)this + 0x364))(this,this);
  iVar5 = _DAT_0105db00;
  if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
     (iVar4 = ThreadGetCurrentId(), iVar5 == iVar4)) {
    cVar3 = CVProfNode::ExitScope();
    if (cVar3 != '\0') {
      _DAT_0105d15c = *(CBasePlayer **)(_DAT_0105d15c + 100);
    }
    DAT_0105d158 = _DAT_0105d15c == (CBasePlayer *)0x105d160;
  }
  if (local_10 != (CBasePlayer *)0x0) {
    (**(code **)(local_10 + 0x54))(local_10,local_18,local_14,0,0,0);
  }
  fVar9 = *(float *)(gpGlobals + 0xc);
  if (fVar9 != *(float *)(this + 0x94)) {
    if (this[0x6c] == (CBasePlayer)0x0) {
      pCVar1 = *(CBaseEdict **)(this + 0x30);
      if (pCVar1 != (CBaseEdict *)0x0) {
        *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
        iVar5 = CBaseEdict::GetChangeAccessor(pCVar1);
        *(undefined2 *)(iVar5 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CBasePlayer)((byte)this[0x70] | 1);
    }
    *(float *)(this + 0x94) = fVar9;
  }
  local_2c = 0;
  local_28 = 0;
  if (___atan2f_finite == (CBasePlayer *)0x0) {
    local_10 = (CBasePlayer *)0x0;
  }
  else {
                    /* try { // try from 007b5c85 to 007b5c87 has its CatchHandler @ 007b6f77 */
    (**(code **)(___atan2f_finite + 0x50))
              (___atan2f_finite,&local_2c,0,0,0,0,"/data/src/game/server/player.cpp",0x1290,
               &PostThink()::tm_fmt,"(%s)%s","Unaccounted",
               "CBasePlayer::PostThink-Weapon_FrameUpdate");
    local_10 = ___atan2f_finite;
  }
  iVar5 = _DAT_0105db00;
  local_18 = local_2c;
  local_14 = local_28;
                    /* try { // try from 007b5cb5 to 007b5cb9 has its CatchHandler @ 007b6f22 */
  if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
     (iVar4 = ThreadGetCurrentId(), iVar5 == iVar4)) {
    if (*(char **)_DAT_0105d15c != "CBasePlayer::PostThink-Weapon_FrameUpdate") {
                    /* try { // try from 007b6ba0 to 007b6bb1 has its CatchHandler @ 007b6f22 */
      _DAT_0105d15c =
           (CBasePlayer *)
           CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcb9668,(char *)0x1,0xbfafa1);
    }
    CVProfNode::EnterScope();
    DAT_0105d158 = '\0';
  }
                    /* try { // try from 007b5cc7 to 007b5ccc has its CatchHandler @ 007b6f12 */
  pCVar8 = this;
  (**(code **)(*(int *)this + 0x45c))(this);
  iVar5 = _DAT_0105db00;
  if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
     (iVar4 = ThreadGetCurrentId(), iVar5 == iVar4)) {
    pCVar8 = _DAT_0105d15c;
    cVar3 = CVProfNode::ExitScope();
    if (cVar3 != '\0') {
      _DAT_0105d15c = *(CBasePlayer **)(_DAT_0105d15c + 100);
    }
    DAT_0105d158 = _DAT_0105d15c == (CBasePlayer *)0x105d160;
  }
  if (local_10 != (CBasePlayer *)0x0) {
    pCVar8 = local_10;
    (**(code **)(local_10 + 0x54))(local_10,local_18,local_14,0,0,0);
  }
  local_2c = 0;
  local_28 = 0;
  if (___atan2f_finite == (CBasePlayer *)0x0) {
    local_10 = (CBasePlayer *)0x0;
  }
  else {
                    /* try { // try from 007b5d9a to 007b5d9c has its CatchHandler @ 007b6f77 */
    pCVar8 = ___atan2f_finite;
    (**(code **)(___atan2f_finite + 0x50))
              (___atan2f_finite,&local_2c,0,0,0,0,"/data/src/game/server/player.cpp",0x1294,
               &PostThink()::tm_fmt,"(%s)%s","Unaccounted",
               "CBasePlayer::PostThink-UpdatePlayerSound");
    local_10 = ___atan2f_finite;
  }
  iVar5 = _DAT_0105db00;
  local_18 = local_2c;
  local_14 = local_28;
                    /* try { // try from 007b5dca to 007b5dce has its CatchHandler @ 007b6f04 */
  if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
     (iVar4 = ThreadGetCurrentId(pCVar8), iVar5 == iVar4)) {
    if (*(char **)_DAT_0105d15c != "CBasePlayer::PostThink-UpdatePlayerSound") {
                    /* try { // try from 007b6b20 to 007b6b31 has its CatchHandler @ 007b6f04 */
      _DAT_0105d15c =
           (CBasePlayer *)
           CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcb9694,(char *)0x1,0xbfafa1);
    }
    CVProfNode::EnterScope();
    DAT_0105d158 = '\0';
  }
                    /* try { // try from 007b5dda to 007b5dde has its CatchHandler @ 007b6f85 */
  UpdatePlayerSound(this);
  iVar5 = _DAT_0105db00;
  if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
     (iVar4 = ThreadGetCurrentId(), iVar5 == iVar4)) {
    cVar3 = CVProfNode::ExitScope();
    if (cVar3 != '\0') {
      _DAT_0105d15c = *(CBasePlayer **)(_DAT_0105d15c + 100);
    }
    DAT_0105d158 = _DAT_0105d15c == (CBasePlayer *)0x105d160;
  }
  if (local_10 != (CBasePlayer *)0x0) {
    (**(code **)(local_10 + 0x54))(local_10,local_18,local_14,0,0,0);
  }
  if (this[0x2050] != (CBasePlayer)0x0) {
                    /* try { // try from 007b66a5 to 007b67de has its CatchHandler @ 007b6f77 */
    CBaseEntity::SetLocalOrigin((CBaseEntity *)this,(Vector *)(this + 0x2044));
    CBaseEntity::SetLocalAngles((CBaseEntity *)this,(QAngle *)(this + 0x1ab0));
    iVar5 = rand();
    fVar10 = (float)iVar5 * 0.0015259255 - 25.0;
    iVar5 = rand();
    fVar11 = (float)iVar5 * 0.0015259255 - 25.0;
    iVar5 = rand();
    fVar9 = (float)iVar5 * 0.0015259255 - 25.0;
    if (((fVar10 != *(float *)(this + 0x1ab0)) || (fVar11 != *(float *)(this + 0x1ab4))) ||
       (fVar9 != *(float *)(this + 0x1ab8))) {
                    /* try { // try from 007b68e3 to 007b68e5 has its CatchHandler @ 007b6f77 */
      (**(code **)(*(int *)(this + 0x1a40) + 4))(this + 0x1a40,(QAngle *)(this + 0x1ab0));
      *(float *)(this + 0x1ab0) = fVar10;
      *(float *)(this + 0x1ab4) = fVar11;
      *(float *)(this + 0x1ab8) = fVar9;
    }
    if (((*(float *)(this + 0x1abc) != 0.0) || (*(float *)(this + 0x1ac0) != 0.0)) ||
       (*(float *)(this + 0x1ac4) != 0.0)) {
      (**(code **)(*(int *)(this + 0x1a40) + 4))(this + 0x1a40,this + 0x1abc);
      *(undefined4 *)(this + 0x1abc) = 0;
      *(undefined4 *)(this + 0x1ac0) = 0;
      *(undefined4 *)(this + 0x1ac4) = 0;
    }
  }
  local_2c = 0;
  local_28 = 0;
  if (___atan2f_finite == (CBasePlayer *)0x0) {
    local_10 = (CBasePlayer *)0x0;
  }
  else {
                    /* try { // try from 007b5eb9 to 007b5ebb has its CatchHandler @ 007b6f77 */
    (**(code **)(___atan2f_finite + 0x50))
              (___atan2f_finite,&local_2c,0,0,0,0,"/data/src/game/server/player.cpp",0x12a0,
               &PostThink()::tm_fmt,"(%s)%s","Unaccounted",
               "CBasePlayer::PostThink-PostThinkVPhysics");
    local_10 = ___atan2f_finite;
  }
  iVar5 = _DAT_0105db00;
  local_18 = local_2c;
  local_14 = local_28;
                    /* try { // try from 007b5eea to 007b5eee has its CatchHandler @ 007b6f34 */
  if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
     (iVar4 = ThreadGetCurrentId(), iVar5 == iVar4)) {
    if (*(char **)_DAT_0105d15c != "CBasePlayer::PostThink-PostThinkVPhysics") {
                    /* try { // try from 007b6aa0 to 007b6ab1 has its CatchHandler @ 007b6f34 */
      _DAT_0105d15c =
           (CBasePlayer *)
           CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xcb96c0,(char *)0x1,0xbfafa1);
    }
    CVProfNode::EnterScope();
    DAT_0105d158 = '\0';
  }
                    /* try { // try from 007b5efa to 007b5efe has its CatchHandler @ 007b6f24 */
  PostThinkVPhysics(this);
  iVar5 = _DAT_0105db00;
  if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
     (iVar4 = ThreadGetCurrentId(), iVar5 == iVar4)) {
    cVar3 = CVProfNode::ExitScope();
    if (cVar3 != '\0') {
      _DAT_0105d15c = *(CBasePlayer **)(_DAT_0105d15c + 100);
    }
    DAT_0105d158 = _DAT_0105d15c == (CBasePlayer *)0x105d160;
  }
  if (local_10 != (CBasePlayer *)0x0) {
    (**(code **)(local_10 + 0x54))(local_10,local_18,local_14,0,0,0);
  }
LAB_007b57ca:
  SimulatePlayerSimulatedEntities(this);
  cVar3 = (**(code **)(*(int *)this + 300))(this);
                    /* try { // try from 007b590b to 007b5a3e has its CatchHandler @ 007b6f77 */
  if ((cVar3 != '\0') &&
     (iVar5 = *(int *)(this + 0x100), iVar4 = (**(code **)(*(int *)this + 0x1fc))(this),
     iVar5 < iVar4)) {
    iVar5 = GlobalEntity_GetIndex("player_regenerates_health");
    iVar5 = GlobalEntity_GetState(iVar5);
    if (iVar5 != 0) {
      local_18 = 0x40000040;
      if (*(float *)(gpGlobals + 0xc) <=
          *(float *)(sv_regeneration_wait_time._28_4_ + 0x2c) + *(float *)(this + 0x1d3c)) {
        UTIL_ScreenFade((CBaseEntity *)this,(color32_s *)&local_18,1.0,0.1,0x11);
      }
      else {
        (**(code **)(*(int *)this + 0x128))(this,0x3f800000,0);
      }
    }
  }
  iVar5 = _DAT_0105db00;
  if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
     (iVar4 = ThreadGetCurrentId(), iVar5 == iVar4)) {
    cVar3 = CVProfNode::ExitScope();
    if (cVar3 != '\0') {
      _DAT_0105d15c = *(CBasePlayer **)(_DAT_0105d15c + 100);
    }
    DAT_0105d158 = _DAT_0105d15c == (CBasePlayer *)0x105d160;
  }
  if (local_1c != (CBasePlayer *)0x0) {
    (**(code **)(local_1c + 0x54))(local_1c,local_24,local_20,0,0,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)