L L4D2node

Vocalizer::UpdateEndOfMap

0x00a09510 · 533 bytes · __thiscall

_ZN9Vocalizer14UpdateEndOfMapEP13TerrorNavArea

Decompiled

undefined (2 params)

/* Vocalizer::UpdateEndOfMap(TerrorNavArea*) */

void __thiscall Vocalizer::UpdateEndOfMap(Vocalizer *this,TerrorNavArea *param_1)

{
  uint uVar1;
  int iVar2;
  int iVar3;
  code *pcVar4;
  char cVar5;
  char cVar6;
  int iVar7;
  char *pcVar8;
  int *piVar9;
  int *piVar10;
  int *piVar11;
  int iVar12;
  longdouble lVar13;
  float fVar14;
  int aiStackY_54 [2];
  undefined4 local_48;
  undefined1 local_28 [24];
  
  piVar9 = (int *)&stack0xffffffb4;
  if (((((this[0x121] == (Vocalizer)0x0) && (*(int *)(this + 0x124) == 0)) &&
       (cVar5 = (**(code **)(**(int **)this + 300))(), cVar5 != '\0')) &&
      ((iVar7 = CBaseEntity::GetTeamNumber(*(CBaseEntity **)this),
       cVar5 = s_bAnyoneHasSaidCheckpointLine, iVar7 == 2 &&
       (*(char *)(*(int *)this + 0x39e4) != '\0')))) && (param_1 != (TerrorNavArea *)0x0)) {
    uVar1 = *(uint *)(param_1 + 300);
    if ((uVar1 & 0x800) == 0) {
      fVar14 = *(float *)(param_1 + 0x154);
    }
    else {
      fVar14 = *(float *)(param_1 + 0x154);
      if (fVar14 < *(float *)(TheNavMesh + 0x5f8)) {
        return;
      }
    }
    if ((fVar14 <= 1000.0) || ((uVar1 & 0x840) == 0)) {
      local_48 = 0;
      lVar13 = (longdouble)CTerrorPlayer::GetFlowDistance();
      iVar7 = *(int *)this;
      if (0 < *(int *)(iVar7 + 0x30f4)) {
        iVar12 = 0;
        piVar11 = (int *)&stack0xffffffb4;
        do {
          iVar2 = *(int *)(*(int *)(iVar7 + 0x30e8) + iVar12 * 4);
          fVar14 = *(float *)(iVar2 + 0x154);
          piVar10 = piVar11;
          if ((((1000.0 < fVar14) && ((*(uint *)(iVar2 + 300) & 0x840) != 0)) &&
              (((*(uint *)(iVar2 + 300) & 0x800) == 0 || (*(float *)(TheNavMesh + 0x5f8) <= fVar14))
              )) && (fVar14 < (float)lVar13 + 1000.0)) {
            piVar9 = *(int **)this;
            iVar3 = *piVar9;
            piVar11[1] = iVar2 + 0x2c;
            *piVar11 = (int)piVar9;
            pcVar4 = *(code **)(iVar3 + 0x428);
            piVar11[-1] = 0xa096ac;
            cVar5 = (*pcVar4)();
            if (cVar5 != '\0') {
              piVar9 = *(int **)this;
              iVar3 = *piVar9;
              *piVar11 = (int)local_28;
              piVar11[1] = (int)piVar9;
              pcVar4 = *(code **)(iVar3 + 0x234);
              piVar11[-1] = 0xa096c7;
              (*pcVar4)();
              piVar9 = piVar11 + -1;
              piVar10 = piVar11 + -1;
              piVar11[-1] = iVar2;
              *piVar11 = (int)local_28;
                    /* try { // try from 00a096d4 to 00a096d8 has its CatchHandler @ 00a09731 */
              piVar11[-2] = 0xa096d9;
              cVar6 = TerrorNavArea::IsPartiallyVisible
                                ((TerrorNavArea *)piVar11[-1],(Vector *)*piVar11);
              cVar5 = s_bAnyoneHasSaidCheckpointLine;
              if (cVar6 != '\0') {
                pcVar8 = "PlayerNearFinale";
                if ((*(byte *)(iVar2 + 300) & 0x40) == 0) {
                  pcVar8 = "PlayerNearCheckpoint";
                }
                *(char **)(this + 0x124) = pcVar8;
                goto joined_r0x00a09702;
              }
            }
          }
          iVar12 = iVar12 + 1;
          piVar11 = piVar10;
        } while (iVar12 < *(int *)(iVar7 + 0x30f4));
      }
    }
    else {
      pcVar8 = "PlayerNearCheckpoint";
      if ((uVar1 & 0x40) != 0) {
        pcVar8 = "PlayerNearFinale";
      }
      *(char **)(this + 0x124) = pcVar8;
joined_r0x00a09702:
      if (cVar5 == '\0') {
        piVar9[3] = 0;
        piVar9[2] = 3;
        piVar9[1] = (int)pcVar8;
        *piVar9 = (int)this;
        piVar9[-1] = 0xa09724;
        cVar5 = Say();
        if (cVar5 == '\0') {
          return;
        }
      }
      s_bAnyoneHasSaidCheckpointLine = '\x01';
      *(undefined4 *)(this + 0x124) = 0;
      this[0x121] = (Vocalizer)0x1;
    }
  }
  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)