L L4D2node

CL4DGameStats::FireGameEvent

0x008e1be0 · 5625 bytes · __thiscall

_ZN13CL4DGameStats13FireGameEventEP10IGameEvent

Decompiled

undefined (2 params)

/* CL4DGameStats::FireGameEvent(IGameEvent*) */

void __thiscall CL4DGameStats::FireGameEvent(CL4DGameStats *this,IGameEvent *param_1)

{
  float fVar1;
  char cVar2;
  char *pcVar3;
  int iVar4;
  uint uVar5;
  char *pcVar6;
  int *piVar7;
  CBaseEntity *pCVar8;
  CTerrorPlayer *pCVar9;
  CTerrorPlayer *pCVar10;
  int iVar11;
  undefined4 uVar12;
  undefined *puVar13;
  undefined1 uVar14;
  bool bVar15;
  longdouble lVar16;
  float local_54;
  int local_50;
  int local_40;
  float local_3c;
  uint local_38;
  undefined4 local_34;
  int local_30 [8];
  
  pcVar3 = (char *)(**(code **)(*(int *)param_1 + 8))(param_1);
  if ((pcVar3 == "weapon_fire") || (iVar4 = _V_stricmp("weapon_fire",pcVar3), iVar4 == 0)) {
    iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
    if (iVar4 == 0) {
      return;
    }
    pCVar9 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar4);
    if (pCVar9 == (CTerrorPlayer *)0x0) {
      return;
    }
    iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)pCVar9);
    if (iVar4 == 3) {
      return;
    }
    piVar7 = (int *)CTerrorPlayer::GetActiveTerrorWeapon(pCVar9);
    if (piVar7 == (int *)0x0) {
      return;
    }
    cVar2 = (**(code **)(*piVar7 + 0x6b4))(piVar7,0);
    if (cVar2 == '\0') {
      cVar2 = (**(code **)(*piVar7 + 0x6b4))(piVar7,1);
      if (cVar2 != '\0') {
        IncrementWeaponStat(this,pCVar9,0x26,0,1);
        IncrementStatForSurvivor(this,pCVar9,0x26,1);
      }
    }
    else {
      IncrementWeaponStat(this,pCVar9,0x25,0,1);
      IncrementStatForSurvivor(this,pCVar9,0x25,1);
    }
    pcVar3 = (char *)(**(code **)(*piVar7 + 0x538))(piVar7);
    iVar4 = WeaponNameToIDForStats(pCVar9,pcVar3);
    if (iVar4 == -1) {
      return;
    }
    IncrementWeaponStat(this,pCVar9,iVar4,0,1);
    return;
  }
  if ((((pcVar3 == "infected_hurt") || (iVar4 = _V_stricmp(pcVar3,"infected_hurt"), iVar4 == 0)) ||
      (pcVar3 == "player_hurt")) || (iVar4 = _V_stricmp(pcVar3,"player_hurt"), iVar4 == 0)) {
    iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"attacker",0);
    if (iVar4 == 0) {
      return;
    }
    pCVar9 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar4);
    if ((pCVar9 == (CTerrorPlayer *)0x0) ||
       (iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)pCVar9), iVar4 == 3)) {
      if (*pcVar3 != 'p') {
        return;
      }
      iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"dmg_health",0);
      IncrementSpecialZombieBotDamageStats(this,pCVar9,iVar4);
      return;
    }
    uVar5 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"type",0);
    if (*pcVar3 == 'i') {
      iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"amount",0);
      local_54 = (float)iVar4;
    }
    else {
      local_54 = 0.0;
      if (*pcVar3 == 'p') {
        iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"dmg_health",0);
        local_54 = (float)iVar4;
      }
    }
    iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"hitgroup",0);
    bVar15 = iVar4 == 1;
    if ((uVar5 & 2) == 0) {
      if ((uVar5 & 8) == 0) {
        if ((uVar5 & 0x40) == 0) goto LAB_008e217a;
        local_50 = 0x15;
      }
      else {
        local_50 = 0x14;
      }
    }
    else {
      if ((uVar5 & 8) == 0) {
        if ((uVar5 & 0x40) != 0) {
          IncrementWeaponStat(this,pCVar9,0x26,1,1);
          IncrementWeaponStat(this,pCVar9,0x26,2,(int)local_54);
          if (bVar15) {
            IncrementWeaponStat(this,pCVar9,0x26,3,1);
          }
        }
      }
      else {
        IncrementWeaponStat(this,pCVar9,0x25,1,1);
        IncrementWeaponStat(this,pCVar9,0x25,2,(int)local_54);
        if (bVar15) {
          IncrementWeaponStat(this,pCVar9,0x25,3,1);
        }
      }
LAB_008e217a:
      piVar7 = (int *)CTerrorPlayer::GetActiveTerrorWeapon(pCVar9);
      if (piVar7 == (int *)0x0) goto LAB_008e21b0;
      pcVar6 = (char *)(**(code **)(*piVar7 + 0x538))(piVar7);
      local_50 = WeaponNameToIDForStats(pCVar9,pcVar6);
      if (local_50 == -1) goto LAB_008e21b0;
    }
    IncrementWeaponStat(this,pCVar9,local_50,1,1);
    IncrementWeaponStat(this,pCVar9,local_50,2,(int)local_54);
    if (bVar15) {
      IncrementWeaponStat(this,pCVar9,local_50,3,1);
    }
LAB_008e21b0:
    if (*pcVar3 != 'p') {
      return;
    }
    iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
    pCVar8 = (CBaseEntity *)UTIL_PlayerByUserId(iVar4);
    IncrementStatForSurvivor(this,(CTerrorPlayer *)pCVar8,0x14,1);
    if (pCVar8 == (CBaseEntity *)0x0) {
      return;
    }
    iVar4 = CBaseEntity::GetTeamNumber(pCVar8);
    if (iVar4 != 2) {
      return;
    }
    IncrementStatForSurvivor(this,pCVar9,8,1);
    IncrementStatForSurvivor(this,pCVar9,7,(int)local_54);
    return;
  }
  if ((pcVar3 == "player_spawn") || (iVar4 = _V_stricmp("player_spawn",pcVar3), iVar4 == 0)) {
    iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
    pCVar8 = (CBaseEntity *)UTIL_PlayerByUserId(iVar4);
    if (pCVar8 == (CBaseEntity *)0x0) {
      return;
    }
    iVar4 = CBaseEntity::GetTeamNumber(pCVar8);
    if (iVar4 != 3) {
      return;
    }
    cVar2 = CTerrorGameRules::HasPlayerControlledZombies();
    if (cVar2 == '\0') {
      return;
    }
    iVar4 = (**(code **)(*(int *)pCVar8 + 0x544))(pCVar8);
    if (8 < iVar4) {
      return;
    }
    *(int *)(this + iVar4 * 4 + 0x40c) = *(int *)(this + iVar4 * 4 + 0x40c) + 1;
    return;
  }
  if ((pcVar3 == "player_now_it") || (iVar4 = _V_stricmp("player_now_it",pcVar3), iVar4 == 0)) {
    cVar2 = (**(code **)(*(int *)param_1 + 0x18))(param_1,"by_boomer",0);
    if (cVar2 == '\0') {
      iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"attacker",0);
      pCVar9 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar4);
      IncrementWeaponStat(this,pCVar9,0x16,4,1);
      return;
    }
    iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
    iVar4 = UTIL_PlayerByUserId(iVar4);
    if (iVar4 == 0) {
      return;
    }
    fVar1 = *(float *)(iVar4 + 0x3260);
    lVar16 = (longdouble)CountdownTimer::Now();
    local_40 = 2;
    local_38 = local_38 & 0xffffff00;
    local_3c = fVar1 - (float)lVar16;
    goto LAB_008e1fc8;
  }
  if ((pcVar3 == "heal_success") || (iVar4 = _V_stricmp("heal_success",pcVar3), iVar4 == 0)) {
    iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
    iVar11 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"subject",0);
    pCVar9 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar4);
    if (pCVar9 == (CTerrorPlayer *)0x0) {
      return;
    }
    if (iVar4 != iVar11) {
      IncrementStatForSurvivor(this,pCVar9,0xb,1);
      return;
    }
    IncrementStatForSurvivor(this,pCVar9,10,1);
    iVar4 = FindOrCreateStatReport(this,pCVar9);
    if (iVar4 == 0) {
      return;
    }
    iVar11 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"health_restored",0);
    *(int *)(iVar4 + 4) = iVar11 + 1 + *(int *)(iVar4 + 4);
    return;
  }
  if ((pcVar3 == "award_earned") || (iVar4 = _V_stricmp("award_earned",pcVar3), iVar4 == 0)) {
    iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"award",0);
    if (iVar4 != 0x43) {
      return;
    }
    iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
    pCVar9 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar4);
    IncrementStatForSurvivor(this,pCVar9,0xf,1);
    return;
  }
  if ((pcVar3 == "weapon_given") || (iVar4 = _V_stricmp("weapon_given",pcVar3), iVar4 == 0)) {
    iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"weapon",0);
    if (iVar4 == 0xf) {
      iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"giver",0);
      pCVar9 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar4);
      IncrementStatForSurvivor(this,pCVar9,0x10,1);
      return;
    }
    if (iVar4 != 0x17) {
      return;
    }
    iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"giver",0);
    pCVar9 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar4);
    IncrementStatForSurvivor(this,pCVar9,0x18,1);
    return;
  }
  if ((pcVar3 == "item_pickup") || (iVar4 = _V_stricmp("item_pickup",pcVar3), iVar4 == 0)) {
    if (*(float *)(gpGlobals + 0xc) - (float)*(int *)(this + 0x74) <= 60.0) {
      return;
    }
    iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
    pCVar9 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar4);
    IncrementStatForSurvivor(this,pCVar9,0x12,1);
    return;
  }
  if ((pcVar3 == "player_incapacitated_start") ||
     (iVar4 = _V_stricmp("player_incapacitated_start",pcVar3), iVar4 == 0)) {
    iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
    piVar7 = (int *)UTIL_PlayerByUserId(iVar4);
    if (piVar7 == (int *)0x0) {
      return;
    }
    uVar5 = piVar7[0xf9a];
    if ((((uVar5 != 0xffffffff) &&
         (puVar13 = g_pEntityList + (uVar5 & 0xfff) * 0x10, puVar13 != (undefined *)0xfffffffc)) &&
        (*(uint *)(puVar13 + 8) == uVar5 >> 0xc)) && (*(int *)(puVar13 + 4) != 0)) {
      *(int *)(this + 0x430) = *(int *)(this + 0x430) + 1;
      return;
    }
    uVar5 = piVar7[0xcf1];
    if (((uVar5 != 0xffffffff) &&
        (puVar13 = g_pEntityList + (uVar5 & 0xfff) * 0x10, puVar13 != (undefined *)0xfffffffc)) &&
       ((*(uint *)(puVar13 + 8) == uVar5 >> 0xc && (*(int *)(puVar13 + 4) != 0)))) {
      *(int *)(this + 0x434) = *(int *)(this + 0x434) + 1;
      return;
    }
    cVar2 = (**(code **)(*piVar7 + 0x550))(piVar7);
    if (cVar2 != '\0') {
      *(int *)(this + 0x43c) = *(int *)(this + 0x43c) + 1;
      return;
    }
    uVar5 = piVar7[0xfb8];
    if (((uVar5 != 0xffffffff) &&
        (puVar13 = g_pEntityList + (uVar5 & 0xfff) * 0x10, puVar13 != (undefined *)0xfffffffc)) &&
       ((*(uint *)(puVar13 + 8) == uVar5 >> 0xc && (*(int *)(puVar13 + 4) != 0)))) {
      *(int *)(this + 0x444) = *(int *)(this + 0x444) + 1;
      return;
    }
    iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"attacker",0);
    pCVar8 = (CBaseEntity *)UTIL_PlayerByUserId(iVar4);
    if (pCVar8 != (CBaseEntity *)0x0) {
      iVar4 = CBaseEntity::GetTeamNumber(pCVar8);
      if (iVar4 != 3) {
        iVar4 = CBaseEntity::GetTeamNumber(pCVar8);
        if (iVar4 != 2) {
          return;
        }
        IncrementStatForSurvivor(this,(CTerrorPlayer *)pCVar8,9,1);
        return;
      }
      iVar4 = (**(code **)(*(int *)pCVar8 + 0x544))(pCVar8);
      if (iVar4 == 8) {
        *(int *)(this + 0x440) = *(int *)(this + 0x440) + 1;
        return;
      }
      iVar4 = (**(code **)(*(int *)pCVar8 + 0x544))(pCVar8);
      if (iVar4 != 4) {
        iVar4 = (**(code **)(*(int *)pCVar8 + 0x544))(pCVar8);
        if (iVar4 != 6) {
          return;
        }
        *(int *)(this + 0x448) = *(int *)(this + 0x448) + 1;
        return;
      }
      *(int *)(this + 0x44c) = *(int *)(this + 0x44c) + 1;
      return;
    }
    iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"attackerentid",0);
    piVar7 = (int *)CBaseEntity::Instance(iVar4);
    if (piVar7 == (int *)0x0) {
      return;
    }
    iVar4 = (**(code **)(*piVar7 + 0x144))(piVar7);
    if (iVar4 == 0) {
      return;
    }
    pCVar8 = (CBaseEntity *)(**(code **)(*piVar7 + 0x144))(piVar7);
    iVar4 = CBaseEntity::GetTeamNumber(pCVar8);
    if (iVar4 != 3) {
      return;
    }
    iVar4 = (**(code **)(*(int *)pCVar8 + 0x544))(pCVar8);
    if (iVar4 != 7) {
      return;
    }
    *(int *)(this + 0x438) = *(int *)(this + 0x438) + 1;
    return;
  }
  if ((pcVar3 == "pounce_stopped") || (iVar4 = _V_stricmp("pounce_stopped",pcVar3), iVar4 == 0)) {
    iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"victim",0);
    iVar4 = UTIL_PlayerByUserId(iVar4);
    if (iVar4 == 0) {
      return;
    }
    iVar11 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
    pCVar8 = (CBaseEntity *)UTIL_PlayerByUserId(iVar11);
    if (pCVar8 == (CBaseEntity *)0x0) {
LAB_008e29b3:
      uVar14 = 0;
    }
    else {
      iVar11 = CBaseEntity::GetTeamNumber(pCVar8);
      cVar2 = IsASurvivorTeam(iVar11);
      if (cVar2 == '\0') goto LAB_008e29b3;
      uVar14 = 1;
    }
    if (*(float *)(iVar4 + 0x3ea0) <= 0.0) {
      local_3c = 99999.9;
    }
    else {
      lVar16 = (longdouble)IntervalTimer::Now();
      local_3c = (float)lVar16 - *(float *)(iVar4 + 0x3ea0);
    }
    local_40 = 0;
  }
  else {
    if ((pcVar3 != "choke_stopped") && (iVar4 = _V_stricmp("choke_stopped",pcVar3), iVar4 != 0)) {
      if ((pcVar3 == "create_panic_event") ||
         (iVar4 = _V_stricmp("create_panic_event",pcVar3), iVar4 == 0)) {
        *(int *)(this + 0x3c8) = *(int *)(this + 0x3c8) + 1;
        return;
      }
      if ((pcVar3 == "witch_harasser_set") ||
         (iVar4 = _V_stricmp("witch_harasser_set",pcVar3), iVar4 == 0)) {
        *(int *)(this + 0x3b0) = *(int *)(this + 0x3b0) + 1;
        return;
      }
      if ((pcVar3 == "revive_success") || (iVar4 = _V_stricmp("revive_success",pcVar3), iVar4 == 0))
      {
        cVar2 = (**(code **)(*(int *)param_1 + 0x18))(param_1,"lastlife",0);
        if (cVar2 == '\0') {
          return;
        }
        iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"subject",0);
        pCVar9 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar4);
        IncrementStatForSurvivor(this,pCVar9,0x11,1);
        return;
      }
      if ((pcVar3 == "survivor_rescued") ||
         (iVar4 = _V_stricmp("survivor_rescued",pcVar3), iVar4 == 0)) {
        *(int *)(this + 0x3d4) = *(int *)(this + 0x3d4) + 1;
        return;
      }
      if ((pcVar3 == "achievement_earned") ||
         (iVar4 = _V_stricmp("achievement_earned",pcVar3), iVar4 == 0)) {
        local_40 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"achievement",0);
        CUtlVector<int,CUtlMemory<int,int>>::InsertBefore
                  ((CUtlVector<int,CUtlMemory<int,int>> *)(this + 0x3f8),*(int *)(this + 0x404),
                   &local_40);
        return;
      }
      if ((pcVar3 == "player_bot_replace") ||
         (iVar4 = _V_stricmp("player_bot_replace",pcVar3), iVar4 == 0)) {
        iVar4 = *(int *)param_1;
        pcVar3 = "player";
LAB_008e2cd1:
        iVar4 = (**(code **)(iVar4 + 0x1c))(param_1,pcVar3,0);
        pCVar9 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar4);
        ResetReport(this,pCVar9);
        return;
      }
      if ((pcVar3 == "bot_player_replace") ||
         (iVar4 = _V_stricmp("bot_player_replace",pcVar3), iVar4 == 0)) {
        iVar4 = *(int *)param_1;
        pcVar3 = "bot";
        goto LAB_008e2cd1;
      }
      if ((pcVar3 == "player_team") || (iVar4 = _V_stricmp("player_team",pcVar3), iVar4 == 0)) {
        iVar4 = *(int *)param_1;
        pcVar3 = "userid";
        goto LAB_008e2cd1;
      }
      if (pcVar3 == "round_end") {
LAB_008e2d36:
        iVar4 = _V_stricmp("mission_lost",pcVar3);
        if (iVar4 == 0) goto LAB_008e2e6a;
      }
      else {
        iVar4 = _V_stricmp("round_end",pcVar3);
        if (iVar4 == 0) {
LAB_008e2d2a:
          if (pcVar3 != "mission_lost") goto LAB_008e2d36;
        }
        else {
          if (pcVar3 == "map_transition") goto LAB_008e2d36;
          iVar4 = _V_stricmp("map_transition",pcVar3);
          if (iVar4 == 0) goto LAB_008e2d2a;
          if (pcVar3 == "finale_vehicle_leaving") goto LAB_008e2d36;
          iVar4 = _V_stricmp("finale_vehicle_leaving",pcVar3);
          if (iVar4 == 0) goto LAB_008e2d2a;
          if (pcVar3 != "mission_lost") {
            iVar4 = _V_stricmp("mission_lost",pcVar3);
            if (iVar4 != 0) {
              if ((pcVar3 != "jockey_ride_end") &&
                 (iVar4 = _V_stricmp("jockey_ride_end",pcVar3), iVar4 != 0)) {
                if ((pcVar3 != "adrenaline_used") &&
                   (iVar4 = _V_stricmp("adrenaline_used",pcVar3), iVar4 != 0)) {
                  if ((pcVar3 != "defibrillator_used") &&
                     (iVar4 = _V_stricmp("defibrillator_used",pcVar3), iVar4 != 0)) {
                    return;
                  }
                  iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
                  pCVar9 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar4);
                  iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"subject",0);
                  pCVar10 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar4);
                  IncrementStatForSurvivor(this,pCVar9,0x19,1);
                  IncrementStatForSurvivor(this,pCVar10,0x1a,1);
                  return;
                }
                iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
                pCVar9 = (CTerrorPlayer *)UTIL_PlayerByUserId(iVar4);
                IncrementStatForSurvivor(this,pCVar9,0x17,1);
                return;
              }
              iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"rescuer",0);
              lVar16 = (longdouble)(**(code **)(*(int *)param_1 + 0x24))(param_1,"ride_length",0);
              local_40 = 3;
              local_38 = CONCAT31(local_38._1_3_,iVar4 != 0);
              local_3c = (float)lVar16;
              goto LAB_008e1fc8;
            }
            goto LAB_008e2d36;
          }
        }
LAB_008e2e6a:
        *(int *)(this + 0x3dc) = *(int *)(this + 0x3dc) + 1;
      }
      local_30[0] = 0;
      local_30[1] = 0;
      local_30[2] = 0;
      local_30[3] = 0;
      local_30[4] = 0;
      local_40 = 2;
      local_3c = 4.2039e-45;
      local_38 = 3;
      local_34 = 9;
                    /* try { // try from 008e2d93 to 008e2e59 has its CatchHandler @ 008e31b1 */
      ForEachTerrorPlayer<PlayerCollector>((PlayerCollector *)&local_40);
      iVar4 = 0;
      if (0 < local_30[3]) {
        do {
          SendClientWeaponStats(this,*(CTerrorPlayer **)(local_30[0] + iVar4 * 4));
          iVar4 = iVar4 + 1;
        } while (iVar4 < local_30[3]);
      }
      if (((pcVar3 != "round_end") && (iVar4 = _V_stricmp("round_end",pcVar3), iVar4 != 0)) ||
         (g_pGameRules == (CTerrorGameRules *)0x0)) goto LAB_008e2e5a;
      iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"reason",0);
      cVar2 = CTerrorGameRules::IsVersusMode();
      if (cVar2 == '\0') {
        cVar2 = CTerrorGameRules::IsScavengeMode();
        if ((cVar2 != '\0') && ((iVar4 == 0xc || (iVar4 == 9)))) {
          if (g_pGameRules[0x491] == (CTerrorGameRules)0x0) {
                    /* try { // try from 008e31d7 to 008e3213 has its CatchHandler @ 008e31b1 */
            uVar12 = CTerrorGameRules::GetScavengeTeamScore(g_pGameRules,2,-1);
            goto LAB_008e31dc;
          }
          iVar11 = CTerrorGameRules::GetScavengeTeamScore(g_pGameRules,2,-1);
          *(int *)(this + 0x4dc) = iVar11;
          if (iVar11 < *(int *)(this + 0x4d8)) {
            *(int *)(this + 0x4d0) = *(int *)(this + 0x4d0) + 1;
          }
          else if (*(int *)(this + 0x4d8) < iVar11) {
            *(int *)(this + 0x4d4) = *(int *)(this + 0x4d4) + 1;
          }
          else {
            *(int *)(this + 0x4e0) = *(int *)(this + 0x4e0) + 1;
          }
          AddCompetitiveStats(this);
          AddSurvivorStats(this,true);
          if (iVar4 == 0xc) {
            SpoofMapTransitionAndSendStats(this);
            (**(code **)(*(int *)this + 0x1c))(this);
          }
        }
      }
      else if (iVar4 == 5) {
        if (g_pGameRules[0x491] == (CTerrorGameRules)0x0) {
          iVar11 = CTerrorGameRules::GetVersusTeamFor(g_pGameRules,2);
          uVar12 = CTerrorGameRules::GetTeamScore(g_pGameRules,iVar11,false);
LAB_008e31dc:
          *(undefined4 *)(this + 0x4d8) = uVar12;
        }
        else {
                    /* try { // try from 008e3096 to 008e31ab has its CatchHandler @ 008e31b1 */
          iVar11 = CTerrorGameRules::GetVersusTeamFor(g_pGameRules,2);
          uVar12 = CTerrorGameRules::GetTeamScore(g_pGameRules,iVar11,false);
          *(undefined4 *)(this + 0x4dc) = uVar12;
        }
      }
      else if (iVar4 == 6) {
        if (*(int *)(this + 0x4dc) < *(int *)(this + 0x4d8)) {
          *(int *)(this + 0x4d0) = *(int *)(this + 0x4d0) + 1;
        }
        else if (*(int *)(this + 0x4d8) < *(int *)(this + 0x4dc)) {
          *(int *)(this + 0x4d4) = *(int *)(this + 0x4d4) + 1;
        }
        else {
          *(int *)(this + 0x4e0) = *(int *)(this + 0x4e0) + 1;
        }
        AddSurvivorStats(this,true);
      }
      cVar2 = CTerrorGameRules::HasPlayerControlledZombies();
      if ((cVar2 != '\0') && ((iVar4 == 8 || (iVar4 == 0xd)))) {
        this[0x70] = (CL4DGameStats)0x1;
        CSteamWorksGameStatsUploader::SetExitStatus(steamGameStats,7);
        SpoofMapTransitionAndSendStats(this);
      }
LAB_008e2e5a:
      CUtlVector<CTerrorPlayer*,CUtlMemory<CTerrorPlayer*,int>>::~CUtlVector
                ((CUtlVector<CTerrorPlayer*,CUtlMemory<CTerrorPlayer*,int>> *)local_30);
      return;
    }
    iVar4 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"victim",0);
    iVar4 = UTIL_PlayerByUserId(iVar4);
    if (iVar4 == 0) {
      return;
    }
    iVar11 = (**(code **)(*(int *)param_1 + 0x1c))(param_1,"userid",0);
    pCVar8 = (CBaseEntity *)UTIL_PlayerByUserId(iVar11);
    if (pCVar8 == (CBaseEntity *)0x0) {
LAB_008e2a49:
      uVar14 = 0;
    }
    else {
      iVar11 = CBaseEntity::GetTeamNumber(pCVar8);
      cVar2 = IsASurvivorTeam(iVar11);
      if (cVar2 == '\0') goto LAB_008e2a49;
      uVar14 = 1;
    }
    if (*(float *)(iVar4 + 0x33f8) <= 0.0) {
      local_3c = 99999.9;
    }
    else {
      lVar16 = (longdouble)IntervalTimer::Now();
      local_3c = (float)lVar16 - *(float *)(iVar4 + 0x33f8);
    }
    local_40 = 1;
  }
  local_38 = CONCAT31(local_38._1_3_,uVar14);
LAB_008e1fc8:
  CUtlVector<L4D_ChokePounce_Stat_Data,CUtlMemory<L4D_ChokePounce_Stat_Data,int>>::InsertBefore
            ((CUtlVector<L4D_ChokePounce_Stat_Data,CUtlMemory<L4D_ChokePounce_Stat_Data,int>> *)
             (this + 0x488),*(int *)(this + 0x494),(L4D_ChokePounce_Stat_Data *)&local_40);
  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)