L L4D2node

CTerrorPlayerResource::UpdatePlayerData

0x009f1870 · 4368 bytes · __thiscall

_ZN21CTerrorPlayerResource16UpdatePlayerDataEv

Decompiled

undefined (1 param)

/* CTerrorPlayerResource::UpdatePlayerData() */

void __thiscall CTerrorPlayerResource::UpdatePlayerData(CTerrorPlayerResource *this)

{
  CBaseEdict *pCVar1;
  char cVar2;
  CTerrorPlayerResource CVar3;
  CBaseEntity *this_00;
  int iVar4;
  int *piVar5;
  CBaseEntity *pCVar6;
  int iVar7;
  CDirector *pCVar8;
  undefined4 uVar9;
  CTerrorPlayerResource *pCVar10;
  longdouble lVar11;
  float fVar12;
  float fVar13;
  CTerrorPlayerResource *local_58;
  CTerrorPlayerResource *local_54;
  CTerrorPlayerResource *local_50;
  CTerrorPlayerResource *local_4c;
  CTerrorPlayerResource *local_48;
  CTerrorPlayerResource *local_44;
  CTerrorPlayerResource *local_40;
  CTerrorPlayerResource *local_3c;
  CTerrorPlayerResource *local_38;
  CTerrorPlayerResource *local_34;
  int local_30;
  undefined4 local_20 [4];
  
  if (0 < *(int *)(gpGlobals + 0x14)) {
    local_58 = this + 0xbe4;
    local_34 = this;
    local_48 = this + 0xb60;
    local_50 = this + 0xd94;
    local_4c = this + 0xd10;
    local_44 = this + 0xc65;
    local_40 = this + 0xb3b;
    local_3c = this + 0xb1a;
    local_38 = this + 0xaf9;
    local_54 = this + 0x4c8;
    local_30 = 1;
    pCVar10 = this;
    do {
      this_00 = (CBaseEntity *)UTIL_PlayerByIndex(local_30);
      if (((this_00 != (CBaseEntity *)0x0) &&
          (cVar2 = (**(code **)(*(int *)this_00 + 0x16c))(this_00), cVar2 != '\0')) &&
         (*(int *)(this_00 + 0x1f6c) != 2)) {
        iVar4 = (**(code **)(*(int *)this_00 + 0x1fc))(this_00);
        uVar9 = 0;
        if (-1 < iVar4) {
          uVar9 = (**(code **)(*(int *)this_00 + 0x1fc))(this_00);
        }
        local_20[0] = uVar9;
        iVar4 = memcmp(pCVar10 + 0x868,local_20,4);
        if (iVar4 == 0) {
          iVar4 = CBaseEntity::GetTeamNumber(this_00);
          if (iVar4 == 3) goto LAB_009f2416;
LAB_009f1982:
          iVar4 = CBaseEntity::GetTeamNumber(this_00);
          if (iVar4 == 2) {
            uVar9 = *(undefined4 *)(this_00 + 0x30c0);
            goto LAB_009f241c;
          }
          local_20[0] = 0;
          iVar4 = memcmp(pCVar10 + 0x4c8,local_20,4);
          if (iVar4 != 0) {
            if (this[0x6c] == (CTerrorPlayerResource)0x0) {
              pCVar1 = *(CBaseEdict **)(this + 0x30);
              if (pCVar1 != (CBaseEdict *)0x0) {
                *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
                iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
                *(undefined2 *)(iVar4 + 2) = 0;
              }
            }
            else {
              this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
            }
            *(undefined4 *)local_54 = 0;
          }
        }
        else {
          if (this[0x6c] == (CTerrorPlayerResource)0x0) {
            pCVar1 = *(CBaseEdict **)(this + 0x30);
            if (pCVar1 != (CBaseEdict *)0x0) {
              *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
              iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
              *(undefined2 *)(iVar4 + 2) = 0;
            }
          }
          else {
            this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
          }
          *(undefined4 *)(this + local_30 * 4 + 0x864) = uVar9;
          iVar4 = CBaseEntity::GetTeamNumber(this_00);
          if (iVar4 != 3) goto LAB_009f1982;
LAB_009f2416:
          uVar9 = *(undefined4 *)(this_00 + 0x3084);
LAB_009f241c:
          local_20[0] = uVar9;
          iVar4 = memcmp(pCVar10 + 0x4c8,local_20,4);
          if (iVar4 != 0) {
            if (this[0x6c] == (CTerrorPlayerResource)0x0) {
              pCVar1 = *(CBaseEdict **)(this + 0x30);
              if (pCVar1 != (CBaseEdict *)0x0) {
                *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
                iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
                *(undefined2 *)(iVar4 + 2) = 0;
              }
            }
            else {
              this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
            }
            *(undefined4 *)local_54 = uVar9;
          }
        }
        piVar5 = (int *)(**(code **)(*(int *)this_00 + 0x484))(this_00,0);
        uVar9 = 0;
        if (piVar5 != (int *)0x0) {
          uVar9 = (**(code **)(*piVar5 + 0x638))(piVar5);
        }
        local_20[0] = uVar9;
        iVar4 = memcmp(pCVar10 + 0x8ec,local_20,4);
        if (iVar4 != 0) {
          if (this[0x6c] == (CTerrorPlayerResource)0x0) {
            pCVar1 = *(CBaseEdict **)(this + 0x30);
            if (pCVar1 != (CBaseEdict *)0x0) {
              *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
              iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
              *(undefined2 *)(iVar4 + 2) = 0;
            }
          }
          else {
            this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
          }
          *(undefined4 *)(this + local_30 * 4 + 0x8e8) = uVar9;
        }
        uVar9 = (**(code **)(*(int *)this_00 + 0x8d4))(this_00);
        local_20[0] = uVar9;
        iVar4 = memcmp(pCVar10 + 0xc8c,local_20,4);
        if (iVar4 != 0) {
          if (this[0x6c] == (CTerrorPlayerResource)0x0) {
            pCVar1 = *(CBaseEdict **)(this + 0x30);
            if (pCVar1 != (CBaseEdict *)0x0) {
              *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
              iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
              *(undefined2 *)(iVar4 + 2) = 0;
            }
          }
          else {
            this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
          }
          *(undefined4 *)(this + local_30 * 4 + 0xc88) = uVar9;
        }
        piVar5 = (int *)(**(code **)(*(int *)this_00 + 0x484))(this_00,2);
        if (piVar5 == (int *)0x0) {
          uVar9 = 0;
        }
        else {
          uVar9 = (**(code **)(*piVar5 + 0x638))(piVar5);
        }
        local_20[0] = uVar9;
        iVar4 = memcmp(pCVar10 + 0x970,local_20,4);
        if (iVar4 != 0) {
          if (this[0x6c] == (CTerrorPlayerResource)0x0) {
            pCVar1 = *(CBaseEdict **)(this + 0x30);
            if (pCVar1 != (CBaseEdict *)0x0) {
              *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
              iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
              *(undefined2 *)(iVar4 + 2) = 0;
            }
          }
          else {
            this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
          }
          *(undefined4 *)(this + local_30 * 4 + 0x96c) = uVar9;
        }
        piVar5 = (int *)(**(code **)(*(int *)this_00 + 0x484))(this_00,4);
        if (piVar5 == (int *)0x0) {
          uVar9 = 0;
        }
        else {
          uVar9 = (**(code **)(*piVar5 + 0x638))(piVar5);
        }
        local_20[0] = uVar9;
        iVar4 = memcmp(pCVar10 + 0xa78,local_20,4);
        if (iVar4 != 0) {
          if (this[0x6c] == (CTerrorPlayerResource)0x0) {
            pCVar1 = *(CBaseEdict **)(this + 0x30);
            if (pCVar1 != (CBaseEdict *)0x0) {
              *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
              iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
              *(undefined2 *)(iVar4 + 2) = 0;
            }
          }
          else {
            this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
          }
          *(undefined4 *)(this + local_30 * 4 + 0xa74) = uVar9;
        }
        piVar5 = (int *)(**(code **)(*(int *)this_00 + 0x484))(this_00,3);
        if (piVar5 == (int *)0x0) {
          uVar9 = 0;
        }
        else {
          uVar9 = (**(code **)(*piVar5 + 0x638))(piVar5);
        }
        local_20[0] = uVar9;
        iVar4 = memcmp(pCVar10 + 0x9f4,local_20,4);
        if (iVar4 != 0) {
          if (this[0x6c] == (CTerrorPlayerResource)0x0) {
            pCVar1 = *(CBaseEdict **)(this + 0x30);
            if (pCVar1 != (CBaseEdict *)0x0) {
              *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
              iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
              *(undefined2 *)(iVar4 + 2) = 0;
            }
          }
          else {
            this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
          }
          *(undefined4 *)(this + local_30 * 4 + 0x9f0) = uVar9;
        }
        cVar2 = (**(code **)(*(int *)this_00 + 0x558))(this_00);
        if (cVar2 == '\0') {
          if (local_34[0xaf9] != (CTerrorPlayerResource)0x0) {
            if (this[0x6c] == (CTerrorPlayerResource)0x0) {
              pCVar1 = *(CBaseEdict **)(this + 0x30);
              if (pCVar1 != (CBaseEdict *)0x0) {
                *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
                iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
                *(undefined2 *)(iVar4 + 2) = 0;
              }
            }
            else {
              this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
            }
            *local_38 = (CTerrorPlayerResource)0x0;
          }
        }
        else if (local_34[0xaf9] != (CTerrorPlayerResource)0x1) {
          if (this[0x6c] == (CTerrorPlayerResource)0x0) {
            pCVar1 = *(CBaseEdict **)(this + 0x30);
            if (pCVar1 != (CBaseEdict *)0x0) {
              *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
              iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
              *(undefined2 *)(iVar4 + 2) = 0;
            }
          }
          else {
            this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
          }
          *local_38 = (CTerrorPlayerResource)0x1;
        }
        cVar2 = (**(code **)(*(int *)this_00 + 0x7e8))(this_00);
        if (cVar2 == '\0') {
          if (local_34[0xb1a] != (CTerrorPlayerResource)0x0) {
            if (this[0x6c] == (CTerrorPlayerResource)0x0) {
              pCVar1 = *(CBaseEdict **)(this + 0x30);
              if (pCVar1 != (CBaseEdict *)0x0) {
                *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
                iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
                *(undefined2 *)(iVar4 + 2) = 0;
              }
            }
            else {
              this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
            }
            *local_3c = (CTerrorPlayerResource)0x0;
          }
        }
        else if (local_34[0xb1a] != (CTerrorPlayerResource)0x1) {
          if (this[0x6c] == (CTerrorPlayerResource)0x0) {
            pCVar1 = *(CBaseEdict **)(this + 0x30);
            if (pCVar1 != (CBaseEdict *)0x0) {
              *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
              iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
              *(undefined2 *)(iVar4 + 2) = 0;
            }
          }
          else {
            this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
          }
          *local_3c = (CTerrorPlayerResource)0x1;
        }
        cVar2 = CTerrorPlayer::WantsToPlay((CTerrorPlayer *)this_00);
        if (cVar2 == '\0') {
          if (local_34[0xb3b] != (CTerrorPlayerResource)0x0) {
            if (this[0x6c] == (CTerrorPlayerResource)0x0) {
              pCVar1 = *(CBaseEdict **)(this + 0x30);
              if (pCVar1 != (CBaseEdict *)0x0) {
                *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
                iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
                *(undefined2 *)(iVar4 + 2) = 0;
              }
            }
            else {
              this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
            }
            *local_40 = (CTerrorPlayerResource)0x0;
          }
        }
        else if (local_34[0xb3b] != (CTerrorPlayerResource)0x1) {
          if (this[0x6c] == (CTerrorPlayerResource)0x0) {
            pCVar1 = *(CBaseEdict **)(this + 0x30);
            if (pCVar1 != (CBaseEdict *)0x0) {
              *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
              iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
              *(undefined2 *)(iVar4 + 2) = 0;
            }
          }
          else {
            this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
          }
          *local_40 = (CTerrorPlayerResource)0x1;
        }
        pCVar6 = (CBaseEntity *)CBasePlayer::GetSplitScreenPlayerOwner((CBasePlayer *)this_00);
        if (pCVar6 == (CBaseEntity *)0x0) {
          pCVar6 = this_00;
        }
        cVar2 = (**(code **)(*engine + 8))(engine);
        if (((cVar2 == '\0') && (*(int *)(pCVar6 + 0x30) != 0)) &&
           (*(int *)(pCVar6 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4 == 1)) {
          if (local_34[0xc65] != (CTerrorPlayerResource)0x1) {
            if (this[0x6c] == (CTerrorPlayerResource)0x0) {
              pCVar1 = *(CBaseEdict **)(this + 0x30);
              if (pCVar1 != (CBaseEdict *)0x0) {
                *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
                iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
                *(undefined2 *)(iVar4 + 2) = 0;
              }
            }
            else {
              this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
            }
            *local_44 = (CTerrorPlayerResource)0x1;
          }
        }
        else if (local_34[0xc65] != (CTerrorPlayerResource)0x0) {
          if (this[0x6c] == (CTerrorPlayerResource)0x0) {
            pCVar1 = *(CBaseEdict **)(this + 0x30);
            if (pCVar1 != (CBaseEdict *)0x0) {
              *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
              iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
              *(undefined2 *)(iVar4 + 2) = 0;
            }
          }
          else {
            this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
          }
          *local_44 = (CTerrorPlayerResource)0x0;
        }
        cVar2 = (**(code **)(*(int *)this_00 + 0x778))(this_00);
        if (cVar2 == '\0') {
          uVar9 = *(undefined4 *)(this_00 + 0x3ff4);
          local_20[0] = uVar9;
          iVar4 = memcmp(pCVar10 + 0xd10,local_20,4);
          if (iVar4 != 0) {
            if (this[0x6c] == (CTerrorPlayerResource)0x0) {
              pCVar1 = *(CBaseEdict **)(this + 0x30);
              if (pCVar1 != (CBaseEdict *)0x0) {
                *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
                iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
                *(undefined2 *)(iVar4 + 2) = 0;
              }
            }
            else {
              this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
            }
            *(undefined4 *)local_4c = uVar9;
          }
          uVar9 = *(undefined4 *)(this_00 + 0x3ff8);
          local_20[0] = uVar9;
          iVar4 = memcmp(pCVar10 + 0xd94,local_20,4);
          if (iVar4 != 0) {
            if (this[0x6c] == (CTerrorPlayerResource)0x0) {
              pCVar1 = *(CBaseEdict **)(this + 0x30);
              if (pCVar1 != (CBaseEdict *)0x0) {
                *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
                iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
                *(undefined2 *)(iVar4 + 2) = 0;
              }
            }
            else {
              this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
            }
            *(undefined4 *)local_50 = uVar9;
          }
LAB_009f1d00:
          iVar4 = CBaseEntity::GetTeamNumber(this_00);
          if (iVar4 == 3) goto LAB_009f2260;
LAB_009f1d11:
          local_20[0] = 0xffffffff;
          iVar4 = memcmp(pCVar10 + 0xb60,local_20,4);
          if (iVar4 != 0) {
            if (this[0x6c] == (CTerrorPlayerResource)0x0) {
              pCVar1 = *(CBaseEdict **)(this + 0x30);
              if (pCVar1 != (CBaseEdict *)0x0) {
                *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
                iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
                *(undefined2 *)(iVar4 + 2) = 0;
              }
              *(undefined4 *)local_48 = 0xffffffff;
            }
            else {
              this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
              *(undefined4 *)local_48 = 0xffffffff;
            }
          }
        }
        else {
          local_20[0] = 0xbf800000;
          iVar4 = memcmp(pCVar10 + 0xd10,local_20,4);
          if (iVar4 != 0) {
            if (this[0x6c] == (CTerrorPlayerResource)0x0) {
              pCVar1 = *(CBaseEdict **)(this + 0x30);
              if (pCVar1 != (CBaseEdict *)0x0) {
                *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
                iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
                *(undefined2 *)(iVar4 + 2) = 0;
              }
            }
            else {
              this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
            }
            *(undefined4 *)local_4c = 0xbf800000;
          }
          local_20[0] = 0xffffffff;
          iVar4 = memcmp(pCVar10 + 0xd94,local_20,4);
          if (iVar4 == 0) goto LAB_009f1d00;
          if (this[0x6c] == (CTerrorPlayerResource)0x0) {
            pCVar1 = *(CBaseEdict **)(this + 0x30);
            if (pCVar1 != (CBaseEdict *)0x0) {
              *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
              iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
              *(undefined2 *)(iVar4 + 2) = 0;
            }
          }
          else {
            this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
          }
          *(undefined4 *)local_50 = 0xffffffff;
          iVar4 = CBaseEntity::GetTeamNumber(this_00);
          if (iVar4 != 3) goto LAB_009f1d11;
LAB_009f2260:
          uVar9 = (**(code **)(*(int *)this_00 + 0x544))(this_00);
          local_20[0] = uVar9;
          iVar4 = memcmp(pCVar10 + 0xb60,local_20,4);
          if (iVar4 != 0) {
            if (this[0x6c] == (CTerrorPlayerResource)0x0) {
              pCVar1 = *(CBaseEdict **)(this + 0x30);
              if (pCVar1 != (CBaseEdict *)0x0) {
                *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
                iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
                *(undefined2 *)(iVar4 + 2) = 0;
              }
            }
            else {
              this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
            }
            *(undefined4 *)local_48 = uVar9;
          }
        }
        if ((*(int *)(this + 0xea0) == 0) &&
           (iVar4 = CBaseEntity::GetTeamNumber(this_00), iVar4 == 3)) {
          cVar2 = (**(code **)(*(int *)this_00 + 0x778))(this_00);
          if (cVar2 == '\0') {
            uVar9 = *(undefined4 *)(this_00 + 0x3088);
            local_20[0] = uVar9;
            iVar4 = memcmp(pCVar10 + 0xbe4,local_20,4);
            if (iVar4 != 0) {
              if (this[0x6c] == (CTerrorPlayerResource)0x0) {
                pCVar1 = *(CBaseEdict **)(this + 0x30);
                if (pCVar1 != (CBaseEdict *)0x0) {
                  *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
                  iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
                  *(undefined2 *)(iVar4 + 2) = 0;
                }
              }
              else {
                this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
              }
              *(undefined4 *)local_58 = uVar9;
            }
          }
          else {
            local_20[0] = 0xffffffff;
            iVar4 = memcmp(pCVar10 + 0xbe4,local_20,4);
            if (iVar4 != 0) {
              if (this[0x6c] == (CTerrorPlayerResource)0x0) {
                pCVar1 = *(CBaseEdict **)(this + 0x30);
                if (pCVar1 != (CBaseEdict *)0x0) {
                  *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
                  iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
                  *(undefined2 *)(iVar4 + 2) = 0;
                }
              }
              else {
                this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
              }
              *(undefined4 *)local_58 = 0xffffffff;
            }
          }
        }
      }
      local_30 = local_30 + 1;
      pCVar10 = pCVar10 + 4;
      local_58 = local_58 + 4;
      local_48 = local_48 + 4;
      local_50 = local_50 + 4;
      local_4c = local_4c + 4;
      local_44 = local_44 + 1;
      local_34 = local_34 + 1;
      local_40 = local_40 + 1;
      local_3c = local_3c + 1;
      local_38 = local_38 + 1;
      local_54 = local_54 + 4;
    } while (local_30 <= *(int *)(gpGlobals + 0x14));
  }
  CVar3 = (CTerrorPlayerResource)CDirector::IsFinale(TheDirector);
  if (CVar3 != this[0xea4]) {
    if (this[0x6c] == (CTerrorPlayerResource)0x0) {
      pCVar1 = *(CBaseEdict **)(this + 0x30);
      if (pCVar1 != (CBaseEdict *)0x0) {
        *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
        iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
        *(undefined2 *)(iVar4 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
    }
    this[0xea4] = CVar3;
  }
  pCVar8 = TheDirector;
  fVar12 = *(float *)(TheDirector + 0x180);
  if (fVar12 <= 0.0) {
    fVar12 = 0.0;
    if (*(float *)(this + 0xe98) != 0.0) goto LAB_009f29a0;
  }
  else {
    lVar11 = (longdouble)CountdownTimer::Now();
    fVar12 = (fVar12 - (float)lVar11) / *(float *)(pCVar8 + 0x17c);
    if (1.0 <= fVar12) {
      fVar12 = 1.0;
    }
    if (fVar12 <= 0.0) {
      fVar12 = 0.0;
    }
    if (fVar12 != *(float *)(this + 0xe98)) {
LAB_009f29a0:
      if (this[0x6c] == (CTerrorPlayerResource)0x0) {
        pCVar1 = *(CBaseEdict **)(this + 0x30);
        if (pCVar1 != (CBaseEdict *)0x0) {
          *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
          iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
          *(undefined2 *)(iVar4 + 2) = 0;
        }
      }
      else {
        this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
      }
      *(float *)(this + 0xe98) = fVar12;
    }
  }
  pCVar8 = TheDirector;
  fVar13 = 0.0;
  fVar12 = *(float *)(TheDirector + 0x18c);
  if (fVar12 <= 0.0) {
    if (*(float *)(this + 0xe9c) == 0.0) goto LAB_009f1ea1;
  }
  else {
    lVar11 = (longdouble)CountdownTimer::Now();
    fVar12 = (fVar12 - (float)lVar11) / *(float *)(pCVar8 + 0x188);
    if (1.0 <= fVar12) {
      fVar12 = 1.0;
    }
    if (fVar12 <= 0.0) {
      fVar12 = fVar13;
    }
    fVar13 = fVar12;
    if (fVar12 == *(float *)(this + 0xe9c)) goto LAB_009f1ea1;
  }
  if (this[0x6c] == (CTerrorPlayerResource)0x0) {
    pCVar1 = *(CBaseEdict **)(this + 0x30);
    if (pCVar1 != (CBaseEdict *)0x0) {
      *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
      iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
      *(undefined2 *)(iVar4 + 2) = 0;
    }
  }
  else {
    this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
  }
  *(float *)(this + 0xe9c) = fVar13;
LAB_009f1ea1:
  pCVar8 = TheDirector;
  iVar4 = *(int *)(TheDirector + 0x398);
  if (iVar4 != *(int *)(this + 0xea0)) {
    if (this[0x6c] == (CTerrorPlayerResource)0x0) {
      pCVar1 = *(CBaseEdict **)(this + 0x30);
      if (pCVar1 != (CBaseEdict *)0x0) {
        *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
        iVar7 = CBaseEdict::GetChangeAccessor(pCVar1);
        *(undefined2 *)(iVar7 + 2) = 0;
        pCVar8 = TheDirector;
      }
    }
    else {
      this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
    }
    *(int *)(this + 0xea0) = iVar4;
  }
  CVar3 = (CTerrorPlayerResource)
          CDirectorSessionManager::IsWaitingForTeamReady
                    (*(CDirectorSessionManager **)(pCVar8 + 0x634));
  if (CVar3 != this[0xea5]) {
    if (this[0x6c] == (CTerrorPlayerResource)0x0) {
      pCVar1 = *(CBaseEdict **)(this + 0x30);
      if (pCVar1 != (CBaseEdict *)0x0) {
        *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
        iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
        *(undefined2 *)(iVar4 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
    }
    this[0xea5] = CVar3;
  }
  iVar4 = CDirectorSessionManager::GetTimeUntilTeamReady
                    (*(CDirectorSessionManager **)(TheDirector + 0x634));
  if (iVar4 != *(int *)(this + 0xea8)) {
    if (this[0x6c] == (CTerrorPlayerResource)0x0) {
      pCVar1 = *(CBaseEdict **)(this + 0x30);
      if (pCVar1 != (CBaseEdict *)0x0) {
        *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
        iVar7 = CBaseEdict::GetChangeAccessor(pCVar1);
        *(undefined2 *)(iVar7 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
    }
    *(int *)(this + 0xea8) = iVar4;
  }
  iVar4 = CDirectorScavengeMode::GetRoundSetupTimeRemaining
                    (*(CDirectorScavengeMode **)(TheDirector + 0x644));
  if (iVar4 != *(int *)(this + 0xeac)) {
    if (this[0x6c] == (CTerrorPlayerResource)0x0) {
      pCVar1 = *(CBaseEdict **)(this + 0x30);
      if (pCVar1 != (CBaseEdict *)0x0) {
        *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
        iVar7 = CBaseEdict::GetChangeAccessor(pCVar1);
        *(undefined2 *)(iVar7 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
    }
    *(int *)(this + 0xeac) = iVar4;
  }
  pCVar8 = TheDirector;
  iVar4 = *(int *)(TheDirector + 0x194);
  if (iVar4 != *(int *)(this + 0xeb0)) {
    if (this[0x6c] == (CTerrorPlayerResource)0x0) {
      pCVar1 = *(CBaseEdict **)(this + 0x30);
      if (pCVar1 != (CBaseEdict *)0x0) {
        *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
        iVar7 = CBaseEdict::GetChangeAccessor(pCVar1);
        *(undefined2 *)(iVar7 + 2) = 0;
        pCVar8 = TheDirector;
      }
    }
    else {
      this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
    }
    *(int *)(this + 0xeb0) = iVar4;
  }
  CVar3 = (CTerrorPlayerResource)CDirector::HasAnySurvivorLeftSafeArea(pCVar8);
  if (CVar3 != this[0xeb4]) {
    if (this[0x6c] == (CTerrorPlayerResource)0x0) {
      pCVar1 = *(CBaseEdict **)(this + 0x30);
      if (pCVar1 != (CBaseEdict *)0x0) {
        *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
        iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
        *(undefined2 *)(iVar4 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
    }
    this[0xeb4] = CVar3;
  }
  pCVar8 = TheDirector;
  CVar3 = *(CTerrorPlayerResource *)(*(int *)(TheDirector + 0x634) + 0x28);
  if (CVar3 != this[0xeb5]) {
    if (this[0x6c] == (CTerrorPlayerResource)0x0) {
      pCVar1 = *(CBaseEdict **)(this + 0x30);
      if (pCVar1 != (CBaseEdict *)0x0) {
        *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
        iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
        *(undefined2 *)(iVar4 + 2) = 0;
        pCVar8 = TheDirector;
      }
    }
    else {
      this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
    }
    this[0xeb5] = CVar3;
  }
  iVar4 = CDirector::GetTotalElapsedMissionTime(pCVar8);
  if (iVar4 != *(int *)(this + 0xeb8)) {
    if (this[0x6c] == (CTerrorPlayerResource)0x0) {
      pCVar1 = *(CBaseEdict **)(this + 0x30);
      if (pCVar1 != (CBaseEdict *)0x0) {
        *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
        iVar7 = CBaseEdict::GetChangeAccessor(pCVar1);
        *(undefined2 *)(iVar7 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
    }
    *(int *)(this + 0xeb8) = iVar4;
  }
  iVar4 = CDirector::GetMissionWipes(TheDirector);
  if (iVar4 != *(int *)(this + 0xebc)) {
    if (this[0x6c] == (CTerrorPlayerResource)0x0) {
      pCVar1 = *(CBaseEdict **)(this + 0x30);
      if (pCVar1 != (CBaseEdict *)0x0) {
        *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
        iVar7 = CBaseEdict::GetChangeAccessor(pCVar1);
        *(undefined2 *)(iVar7 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
    }
    *(int *)(this + 0xebc) = iVar4;
  }
  iVar4 = RandomInt(0x80000000,0x7fffffff);
  fVar12 = (float)iVar4;
  if (fVar12 != *(float *)(this + 0xec0)) {
    if (this[0x6c] == (CTerrorPlayerResource)0x0) {
      pCVar1 = *(CBaseEdict **)(this + 0x30);
      if (pCVar1 != (CBaseEdict *)0x0) {
        *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
        iVar4 = CBaseEdict::GetChangeAccessor(pCVar1);
        *(undefined2 *)(iVar4 + 2) = 0;
      }
      *(float *)(this + 0xec0) = fVar12;
    }
    else {
      this[0x70] = (CTerrorPlayerResource)((byte)this[0x70] | 1);
      *(float *)(this + 0xec0) = fVar12;
    }
    CPlayerResource::UpdatePlayerData((CPlayerResource *)this);
    return;
  }
  CPlayerResource::UpdatePlayerData((CPlayerResource *)this);
  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)