L L4D2node

SurvivorReplacement::Save

0x009ee790 · 3563 bytes · __thiscall

_ZN19SurvivorReplacement4SaveEP13CTerrorPlayer

Decompiled

undefined (2 params)

/* SurvivorReplacement::Save(CTerrorPlayer*) */

void __thiscall SurvivorReplacement::Save(SurvivorReplacement *this,CTerrorPlayer *param_1)

{
  uint uVar1;
  CBaseEdict *pCVar2;
  SurvivorReplacement SVar3;
  undefined4 uVar4;
  int *piVar5;
  undefined4 *puVar6;
  int iVar7;
  undefined *puVar8;
  undefined *puVar9;
  int iVar10;
  longdouble lVar11;
  undefined *local_44;
  undefined *local_40;
  CBaseCombatWeapon *local_38;
  CTerrorPlayer *local_34;
  int local_30 [8];
  
  local_30[0] = 0;
  local_30[1] = 0;
  local_30[2] = 0;
  local_30[3] = 0;
  local_30[4] = 0;
  local_34 = param_1;
                    /* try { // try from 009ee7cb to 009ef564 has its CatchHandler @ 009ef57b */
  ForEachTerrorPlayer<ObserverCollector>((ObserverCollector *)&local_34);
  iVar7 = local_30[3];
  *(undefined4 *)(this + 0x220) = 0;
  if (local_30[3] != 0) {
    CUtlVector<CTerrorPlayer*,CUtlMemory<CTerrorPlayer*,int>>::GrowVector
              ((CUtlVector<CTerrorPlayer*,CUtlMemory<CTerrorPlayer*,int>> *)(this + 0x214),
               local_30[3]);
    CUtlVector<CTerrorPlayer*,CUtlMemory<CTerrorPlayer*,int>>::ShiftElementsRight
              ((CUtlVector<CTerrorPlayer*,CUtlMemory<CTerrorPlayer*,int>> *)(this + 0x214),0,iVar7);
    if (0 < iVar7) {
      iVar10 = 0;
      do {
        *(undefined4 *)(*(int *)(this + 0x214) + iVar10 * 4) =
             *(undefined4 *)(local_30[0] + iVar10 * 4);
        iVar10 = iVar10 + 1;
      } while (iVar10 != iVar7);
    }
  }
  *(undefined4 *)this = *(undefined4 *)(param_1 + 0x2ba0);
  if (((byte)param_1[0x14d] & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_1);
  }
  *(undefined4 *)(this + 4) = *(undefined4 *)(param_1 + 0x2e0);
  *(undefined4 *)(this + 8) = *(undefined4 *)(param_1 + 0x2e4);
  *(undefined4 *)(this + 0xc) = *(undefined4 *)(param_1 + 0x2e8);
  if (((byte)param_1[0x14d] & 0x10) != 0) {
    CBaseEntity::CalcAbsoluteVelocity((CBaseEntity *)param_1);
  }
  *(undefined4 *)(this + 0x10) = *(undefined4 *)(param_1 + 0x274);
  *(undefined4 *)(this + 0x14) = *(undefined4 *)(param_1 + 0x278);
  *(undefined4 *)(this + 0x18) = *(undefined4 *)(param_1 + 0x27c);
  if (((byte)param_1[0x14d] & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_1);
  }
  *(undefined4 *)(this + 0x1c) = *(undefined4 *)(param_1 + 0x37c);
  *(undefined4 *)(this + 0x20) = *(undefined4 *)(param_1 + 0x380);
  *(undefined4 *)(this + 0x24) = *(undefined4 *)(param_1 + 900);
  *(uint *)(this + 0x38) = (uint)(byte)param_1[0x186];
  *(undefined4 *)(this + 0x3c) = *(undefined4 *)(param_1 + 0x2000);
  *(undefined4 *)(this + 0x40) = *(undefined4 *)(param_1 + 0x2004);
  *(undefined4 *)(this + 0x44) = *(undefined4 *)(param_1 + 0x2008);
  this[0x48] = *(SurvivorReplacement *)(param_1 + 0x1ac8);
  this[0x4a] = *(SurvivorReplacement *)(param_1 + 0x1a90);
  this[0x4b] = *(SurvivorReplacement *)(param_1 + 0x1a91);
  this[0x4c] = (SurvivorReplacement)((byte)(*(uint *)(param_1 + 0x150) >> 1) & 1);
  this[0x4d] = *(SurvivorReplacement *)(param_1 + 0x39e4);
  this[0x4e] = *(SurvivorReplacement *)(param_1 + 0x3e41);
  uVar4 = CMultiPlayerAnimState::GetMainActivity(*(CMultiPlayerAnimState **)(param_1 + 0x2910));
  *(undefined4 *)(this + 0x50) = uVar4;
  uVar4 = CTerrorPlayerAnimState::GetCustomSequence(*(CTerrorPlayerAnimState **)(param_1 + 0x2910));
  *(undefined4 *)(this + 0x54) = uVar4;
  *(undefined4 *)(this + 0x58) = *(undefined4 *)(param_1 + 0x490);
  *(undefined4 *)(this + 0x28) = *(undefined4 *)(param_1 + 0x100);
  lVar11 = (longdouble)(**(code **)(*(int *)param_1 + 0x7e4))(param_1);
  *(float *)(this + 0x2c) = (float)lVar11;
  *(undefined4 *)(this + 0x30) = *(undefined4 *)(param_1 + 0x2e54);
  SVar3 = (SurvivorReplacement)(**(code **)(*(int *)param_1 + 300))(param_1);
  this[0x34] = SVar3;
  this[0x35] = *(SurvivorReplacement *)(param_1 + 0x32fc);
  *(undefined4 *)(this + 0xf4) = *(undefined4 *)(param_1 + 0x3f90);
  *(undefined4 *)(this + 0xf8) = *(undefined4 *)(param_1 + 0x3f94);
  *(undefined4 *)(this + 0xfc) = *(undefined4 *)(param_1 + 0x3f98);
  this[0x100] = *(SurvivorReplacement *)(param_1 + 0x3f9c);
  piVar5 = (int *)CBasePlayer::GetElevator((CBasePlayer *)param_1);
  if (piVar5 == (int *)0x0) {
    *(undefined4 *)(this + 0x228) = 0xffffffff;
  }
  else {
    puVar6 = (undefined4 *)(**(code **)(*piVar5 + 0xc))(piVar5);
    *(undefined4 *)(this + 0x228) = *puVar6;
  }
  puVar9 = g_pEntityList;
  uVar1 = *(uint *)(param_1 + 0x3fa0);
  *(uint *)(this + 0x104) = uVar1;
  if ((((uVar1 != 0xffffffff) &&
       (puVar9 = puVar9 + (uVar1 & 0xfff) * 0x10, puVar9 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar9 + 8) == uVar1 >> 0xc)) &&
     (piVar5 = *(int **)(puVar9 + 4), piVar5 != (int *)0x0)) {
    (**(code **)(*piVar5 + 0x98))(piVar5,0,0xffffffff);
  }
  iVar7 = CTerrorPlayer::GetActiveTerrorWeapon(param_1);
  *(int *)(this + 0x5c) = iVar7;
  if (iVar7 != 0) {
    this[0x49] = (SurvivorReplacement)((byte)(*(uint *)(iVar7 + 0xd4) >> 5) & 1);
  }
  iVar7 = 1;
  do {
    local_38 = (CBaseCombatWeapon *)CTerrorPlayer::GetTerrorWeapon(param_1,iVar7);
    if (local_38 != (CBaseCombatWeapon *)0x0) {
      CBaseCombatCharacter::Weapon_Detach((CBaseCombatCharacter *)param_1,local_38);
      CUtlVector<CTerrorWeapon*,CUtlMemory<CTerrorWeapon*,int>>::InsertBefore
                ((CUtlVector<CTerrorWeapon*,CUtlMemory<CTerrorWeapon*,int>> *)(this + 0x60),
                 *(int *)(this + 0x6c),(CTerrorWeapon **)&local_38);
    }
    iVar7 = iVar7 + 1;
  } while (iVar7 != 0x38);
  iVar7 = 0;
  do {
    uVar4 = CBaseCombatCharacter::GetAmmoCount((CBaseCombatCharacter *)param_1,iVar7);
    *(undefined4 *)(this + iVar7 * 4 + 0x74) = uVar4;
    iVar7 = iVar7 + 1;
  } while (iVar7 != 0x20);
  piVar5 = (int *)CBasePlayer::GetViewModel((CBasePlayer *)param_1,0);
  if (piVar5 != (int *)0x0) {
    (**(code **)(*piVar5 + 0x3bc))(piVar5,0x20);
  }
  uVar4 = 0;
  this[0x108] = *(SurvivorReplacement *)(param_1 + 0x2d94);
  puVar9 = g_pEntityList;
  uVar1 = *(uint *)(param_1 + 0x2e24);
  local_40 = g_pEntityList;
  if (((uVar1 != 0xffffffff) &&
      (puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar8 + 8) == uVar1 >> 0xc)) {
    uVar4 = *(undefined4 *)(puVar8 + 4);
  }
  *(undefined4 *)(this + 0x10c) = uVar4;
  local_44 = puVar9 + 4;
  if ((local_44 == (undefined *)0x0) || (*(int *)(puVar9 + 8) != 0)) {
    iVar7 = 0;
  }
  else {
    iVar7 = *(int *)(puVar9 + 4);
  }
  uVar1 = *(uint *)(param_1 + 0x2e24);
  if (((uVar1 == 0xffffffff) ||
      (puVar9 = puVar9 + (uVar1 & 0xfff) * 0x10, puVar9 == (undefined *)0xfffffffc)) ||
     (*(uint *)(puVar9 + 8) != uVar1 >> 0xc)) {
    iVar10 = 0;
  }
  else {
    iVar10 = *(int *)(puVar9 + 4);
  }
  if (iVar7 != iVar10) {
    if (param_1[0x6c] == (CTerrorPlayer)0x0) {
      pCVar2 = *(CBaseEdict **)(param_1 + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar7 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar7 + 2) = 0;
        local_40 = g_pEntityList;
        local_44 = g_pEntityList + 4;
      }
    }
    else {
      param_1[0x70] = (CTerrorPlayer)((byte)param_1[0x70] | 1);
    }
    *(undefined4 *)(param_1 + 0x2e24) = 0;
  }
  uVar4 = 0;
  *(undefined4 *)(this + 0x110) = *(undefined4 *)(param_1 + 0x2e38);
  *(undefined4 *)(this + 0x114) = *(undefined4 *)(param_1 + 0x2e3c);
  *(undefined4 *)(this + 0x118) = *(undefined4 *)(param_1 + 0x2e40);
  *(undefined4 *)(this + 0x11c) = *(undefined4 *)(param_1 + 0x2e44);
  *(undefined4 *)(this + 0x120) = *(undefined4 *)(param_1 + 0x2e48);
  *(undefined4 *)(this + 0x124) = *(undefined4 *)(param_1 + 0x2e4c);
  *(undefined4 *)(this + 0x128) = *(undefined4 *)(param_1 + 0x2e54);
  this[300] = *(SurvivorReplacement *)(param_1 + 0x2e58);
  *(undefined4 *)(this + 0x130) = *(undefined4 *)(param_1 + 0x39e8);
  *(undefined4 *)(this + 0x134) = *(undefined4 *)(param_1 + 0x39ec);
  this[0x138] = *(SurvivorReplacement *)(param_1 + 0x39f0);
  this[0x139] = *(SurvivorReplacement *)(param_1 + 0x39f1);
  this[0x13a] = *(SurvivorReplacement *)(param_1 + 0x39f2);
  *(undefined4 *)(this + 0x140) = *(undefined4 *)(param_1 + 0x39f8);
  *(undefined4 *)(this + 0x144) = *(undefined4 *)(param_1 + 0x39fc);
  *(undefined4 *)(this + 0x148) = *(undefined4 *)(param_1 + 0x3a00);
  *(undefined4 *)(this + 0x14c) = *(undefined4 *)(param_1 + 0x3a04);
  *(undefined4 *)(this + 0x150) = *(undefined4 *)(param_1 + 0x3a08);
  *(undefined4 *)(this + 0x154) = *(undefined4 *)(param_1 + 0x3a0c);
  *(undefined4 *)(this + 0x158) = *(undefined4 *)(param_1 + 0x3a10);
  *(undefined4 *)(this + 0x15c) = *(undefined4 *)(param_1 + 0x3a14);
  *(undefined4 *)(this + 0x160) = *(undefined4 *)(param_1 + 0x3a18);
  *(undefined4 *)(this + 0x164) = *(undefined4 *)(param_1 + 0x3a1c);
  *(undefined4 *)(this + 0x168) = *(undefined4 *)(param_1 + 0x3a20);
  *(undefined4 *)(this + 0x16c) = *(undefined4 *)(param_1 + 0x3a24);
  *(undefined4 *)(this + 0x170) = *(undefined4 *)(param_1 + 0x3a28);
  this[0x174] = *(SurvivorReplacement *)(param_1 + 0x3a2c);
  *(undefined4 *)(this + 0x178) = *(undefined4 *)(param_1 + 0x3a30);
  *(undefined4 *)(this + 0x17c) = *(undefined4 *)(param_1 + 0x3a34);
  *(undefined4 *)(this + 0x180) = *(undefined4 *)(param_1 + 0x3a38);
  *(undefined4 *)(this + 0x184) = *(undefined4 *)(param_1 + 0x3a3c);
  *(undefined4 *)(this + 0x188) = *(undefined4 *)(param_1 + 0x3a40);
  *(undefined4 *)(this + 0x18c) = *(undefined4 *)(param_1 + 0x3a44);
  *(undefined4 *)(this + 400) = *(undefined4 *)(param_1 + 0x3a48);
  *(undefined4 *)(this + 0x194) = *(undefined4 *)(param_1 + 0x3a4c);
  *(undefined4 *)(this + 0x198) = *(undefined4 *)(param_1 + 0x3a50);
  *(undefined4 *)(this + 0x19c) = *(undefined4 *)(param_1 + 0x3a54);
  *(undefined4 *)(this + 0x1a0) = *(undefined4 *)(param_1 + 0x3a58);
  *(undefined4 *)(this + 0x1a4) = *(undefined4 *)(param_1 + 0x3a5c);
  *(undefined4 *)(this + 0x1a8) = *(undefined4 *)(param_1 + 0x3a60);
  *(undefined4 *)(this + 0x1b4) = *(undefined4 *)(param_1 + 0x3260);
  *(undefined4 *)(this + 0x1b0) = *(undefined4 *)(param_1 + 0x325c);
  this[0x1b8] = *(SurvivorReplacement *)(param_1 + 0x3268);
  this[0x1b9] = *(SurvivorReplacement *)(param_1 + 0x3269);
  this[0x1ba] = *(SurvivorReplacement *)(param_1 + 0x326a);
  *(undefined4 *)(this + 0x1bc) = *(undefined4 *)(param_1 + 0x3f18);
  uVar1 = *(uint *)(param_1 + 0x3e68);
  if (((uVar1 != 0xffffffff) &&
      (puVar9 = local_40 + (uVar1 & 0xfff) * 0x10, puVar9 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar9 + 8) == uVar1 >> 0xc)) {
    uVar4 = *(undefined4 *)(puVar9 + 4);
  }
  *(undefined4 *)(this + 0x1c0) = uVar4;
  if ((local_44 == (undefined *)0x0) || (*(int *)(local_40 + 8) != 0)) {
    iVar7 = 0;
  }
  else {
    iVar7 = *(int *)(local_40 + 4);
  }
  uVar1 = *(uint *)(param_1 + 0x3e68);
  if (((uVar1 == 0xffffffff) ||
      (puVar9 = local_40 + (uVar1 & 0xfff) * 0x10, puVar9 == (undefined *)0xfffffffc)) ||
     (*(uint *)(puVar9 + 8) != uVar1 >> 0xc)) {
    iVar10 = 0;
  }
  else {
    iVar10 = *(int *)(puVar9 + 4);
  }
  if (iVar7 != iVar10) {
    if (param_1[0x6c] == (CTerrorPlayer)0x0) {
      pCVar2 = *(CBaseEdict **)(param_1 + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar7 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar7 + 2) = 0;
        local_40 = g_pEntityList;
        local_44 = g_pEntityList + 4;
      }
    }
    else {
      param_1[0x70] = (CTerrorPlayer)((byte)param_1[0x70] | 1);
    }
    *(undefined4 *)(param_1 + 0x3e68) = 0;
  }
  uVar4 = 0;
  *(undefined4 *)(this + 0x1c8) = *(undefined4 *)(param_1 + 0x3ea0);
  uVar1 = *(uint *)(param_1 + 0x3e48);
  if (((uVar1 != 0xffffffff) &&
      (puVar9 = local_40 + (uVar1 & 0xfff) * 0x10, puVar9 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar9 + 8) == uVar1 >> 0xc)) {
    uVar4 = *(undefined4 *)(puVar9 + 4);
  }
  *(undefined4 *)(this + 0x1cc) = uVar4;
  if ((local_44 == (undefined *)0x0) || (*(int *)(local_40 + 8) != 0)) {
    iVar7 = 0;
  }
  else {
    iVar7 = *(int *)(local_40 + 4);
  }
  uVar1 = *(uint *)(param_1 + 0x3e48);
  if (((uVar1 == 0xffffffff) ||
      (puVar9 = local_40 + (uVar1 & 0xfff) * 0x10, puVar9 == (undefined *)0xfffffffc)) ||
     (*(uint *)(puVar9 + 8) != uVar1 >> 0xc)) {
    iVar10 = 0;
  }
  else {
    iVar10 = *(int *)(puVar9 + 4);
  }
  if (iVar7 != iVar10) {
    if (param_1[0x6c] == (CTerrorPlayer)0x0) {
      pCVar2 = *(CBaseEdict **)(param_1 + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar7 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar7 + 2) = 0;
        local_40 = g_pEntityList;
        local_44 = g_pEntityList + 4;
      }
    }
    else {
      param_1[0x70] = (CTerrorPlayer)((byte)param_1[0x70] | 1);
    }
    *(undefined4 *)(param_1 + 0x3e48) = 0;
  }
  uVar1 = *(uint *)(param_1 + 0x3e54);
  uVar4 = 0;
  if (((uVar1 != 0xffffffff) &&
      (puVar9 = local_40 + (uVar1 & 0xfff) * 0x10, puVar9 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar9 + 8) == uVar1 >> 0xc)) {
    uVar4 = *(undefined4 *)(puVar9 + 4);
  }
  *(undefined4 *)(this + 0x1d0) = uVar4;
  uVar4 = 0;
  *(undefined4 *)(param_1 + 0x3e54) = 0xffffffff;
  uVar1 = *(uint *)(param_1 + 0x2a4c);
  if (((uVar1 != 0xffffffff) &&
      (puVar9 = local_40 + (uVar1 & 0xfff) * 0x10, puVar9 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar9 + 8) == uVar1 >> 0xc)) {
    uVar4 = *(undefined4 *)(puVar9 + 4);
  }
  *(undefined4 *)(this + 0x1d4) = uVar4;
  if ((local_44 == (undefined *)0x0) || (*(int *)(local_40 + 8) != 0)) {
    iVar7 = 0;
  }
  else {
    iVar7 = *(int *)(local_40 + 4);
  }
  uVar1 = *(uint *)(param_1 + 0x2a4c);
  if (((uVar1 == 0xffffffff) ||
      (puVar9 = local_40 + (uVar1 & 0xfff) * 0x10, puVar9 == (undefined *)0xfffffffc)) ||
     (*(uint *)(puVar9 + 8) != uVar1 >> 0xc)) {
    iVar10 = 0;
  }
  else {
    iVar10 = *(int *)(puVar9 + 4);
  }
  if (iVar7 != iVar10) {
    if (param_1[0x6c] == (CTerrorPlayer)0x0) {
      pCVar2 = *(CBaseEdict **)(param_1 + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar7 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar7 + 2) = 0;
        local_40 = g_pEntityList;
        local_44 = g_pEntityList + 4;
      }
    }
    else {
      param_1[0x70] = (CTerrorPlayer)((byte)param_1[0x70] | 1);
    }
    *(undefined4 *)(param_1 + 0x2a4c) = 0;
  }
  uVar1 = *(uint *)(param_1 + 0x33c4);
  uVar4 = 0;
  if (((uVar1 != 0xffffffff) &&
      (puVar9 = local_40 + (uVar1 & 0xfff) * 0x10, puVar9 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar9 + 8) == uVar1 >> 0xc)) {
    uVar4 = *(undefined4 *)(puVar9 + 4);
  }
  *(undefined4 *)(this + 0x1d8) = uVar4;
  if ((local_44 == (undefined *)0x0) || (*(int *)(local_40 + 8) != 0)) {
    iVar7 = 0;
  }
  else {
    iVar7 = *(int *)(local_40 + 4);
  }
  uVar1 = *(uint *)(param_1 + 0x33c4);
  if (((uVar1 == 0xffffffff) ||
      (puVar9 = local_40 + (uVar1 & 0xfff) * 0x10, puVar9 == (undefined *)0xfffffffc)) ||
     (*(uint *)(puVar9 + 8) != uVar1 >> 0xc)) {
    iVar10 = 0;
  }
  else {
    iVar10 = *(int *)(puVar9 + 4);
  }
  if (iVar7 != iVar10) {
    if (param_1[0x6c] == (CTerrorPlayer)0x0) {
      pCVar2 = *(CBaseEdict **)(param_1 + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar7 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar7 + 2) = 0;
        local_40 = g_pEntityList;
      }
    }
    else {
      param_1[0x70] = (CTerrorPlayer)((byte)param_1[0x70] | 1);
    }
    *(undefined4 *)(param_1 + 0x33c4) = 0;
  }
  uVar4 = 0;
  *(undefined4 *)(this + 0x1e0) = *(undefined4 *)(param_1 + 0x33cc);
  this[0x1e4] = *(SurvivorReplacement *)(param_1 + 0x33dc);
  this[0x1e5] = *(SurvivorReplacement *)(param_1 + 0x33dd);
  this[0x1e6] = *(SurvivorReplacement *)(param_1 + 0x33e4);
  *(undefined4 *)(this + 0x1e8) = *(undefined4 *)(param_1 + 0x33e0);
  *(undefined4 *)(this + 500) = *(undefined4 *)(param_1 + 0x33f0);
  *(undefined4 *)(this + 0x1f0) = *(undefined4 *)(param_1 + 0x33ec);
  *(undefined4 *)(this + 0x1fc) = *(undefined4 *)(param_1 + 0x33f8);
  uVar1 = *(uint *)(param_1 + 0x3ee0);
  if (((uVar1 != 0xffffffff) &&
      (puVar9 = local_40 + (uVar1 & 0xfff) * 0x10, puVar9 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar9 + 8) == uVar1 >> 0xc)) {
    uVar4 = *(undefined4 *)(puVar9 + 4);
  }
  *(undefined4 *)(this + 0x204) = uVar4;
  uVar1 = *(uint *)(param_1 + 0x3ee0);
  if (((uVar1 != 0xffffffff) &&
      (puVar9 = local_40 + (uVar1 & 0xfff) * 0x10, puVar9 != (undefined *)0xfffffffc)) &&
     ((*(uint *)(puVar9 + 8) == uVar1 >> 0xc && (*(int *)(puVar9 + 4) != 0)))) {
    if (param_1[0x6c] == (CTerrorPlayer)0x0) {
      pCVar2 = *(CBaseEdict **)(param_1 + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar7 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar7 + 2) = 0;
        local_40 = g_pEntityList;
      }
    }
    else {
      param_1[0x70] = (CTerrorPlayer)((byte)param_1[0x70] | 1);
    }
    *(undefined4 *)(param_1 + 0x3ee0) = 0xffffffff;
  }
  if (*(int *)(param_1 + 0x3110) != 0) {
    this[0x200] = *(SurvivorReplacement *)(*(int *)(param_1 + 0x3110) + 0x120);
  }
  uVar1 = *(uint *)(param_1 + 0x2088);
  if ((((uVar1 == 0xffffffff) ||
       (puVar9 = local_40 + (uVar1 & 0xfff) * 0x10, puVar9 == (undefined *)0xfffffffc)) ||
      (*(uint *)(puVar9 + 8) != uVar1 >> 0xc)) ||
     (piVar5 = *(int **)(puVar9 + 4), piVar5 == (int *)0x0)) {
    *(undefined4 *)(this + 0x20c) = 0xffffffff;
  }
  else {
    puVar6 = (undefined4 *)(**(code **)(*piVar5 + 0xc))(piVar5);
    *(undefined4 *)(this + 0x20c) = *puVar6;
    local_40 = g_pEntityList;
  }
  uVar1 = *(uint *)(param_1 + 0x33a4);
  if (((uVar1 == 0xffffffff) ||
      (local_40 = local_40 + (uVar1 & 0xfff) * 0x10, local_40 == (undefined *)0xfffffffc)) ||
     ((*(uint *)(local_40 + 8) != uVar1 >> 0xc ||
      (piVar5 = *(int **)(local_40 + 4), piVar5 == (int *)0x0)))) {
    *(undefined4 *)(this + 0x210) = 0xffffffff;
  }
  else {
    puVar6 = (undefined4 *)(**(code **)(*piVar5 + 0xc))(piVar5);
    *(undefined4 *)(this + 0x210) = *puVar6;
  }
  CTerrorPlayer::SetPlayerPositionEntity(param_1,(CSurvivorPosition *)0x0);
  uVar1 = *(uint *)(this + 0x210);
  if (((uVar1 != 0xffffffff) &&
      (puVar9 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar9 != (undefined *)0xfffffffc)) &&
     ((*(uint *)(puVar9 + 8) == uVar1 >> 0xc && (param_1 == *(CTerrorPlayer **)(puVar9 + 4))))) {
    *(undefined4 *)(this + 0x210) = 0xffffffff;
  }
  local_30[3] = 0;
  *(undefined4 *)(this + 0x208) = *(undefined4 *)(param_1 + 0x1f7c);
  CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)local_30);
  local_30[4] = local_30[0];
  CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)local_30);
  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)