L L4D2node

TerrorNavMesh::WarnIfBadFlow

0x0097b0f0 · 434 bytes · __thiscall

_ZNK13TerrorNavMesh13WarnIfBadFlowEP13CTerrorPlayer

Decompiled

undefined (2 params)

/* TerrorNavMesh::WarnIfBadFlow(CTerrorPlayer*) const */

void __thiscall TerrorNavMesh::WarnIfBadFlow(TerrorNavMesh *this,CTerrorPlayer *param_1)

{
  CTerrorPlayer *pCVar1;
  char cVar2;
  int iVar3;
  KeyValues *this_00;
  char *pcVar4;
  char *pcVar5;
  undefined4 local_40;
  undefined4 local_3c;
  undefined4 local_38;
  undefined4 local_34;
  int local_30 [8];
  
  cVar2 = (**(code **)(*engine + 0x1f8))(engine);
  if (cVar2 == '\0') {
    pcVar4 = *(char **)(gpGlobals + 0x3c);
    if (pcVar4 == (char *)0x0) {
      pcVar4 = "";
    }
    else if (pcVar4 == "credits") {
      return;
    }
    pcVar5 = "credits";
    iVar3 = _V_stricmp(pcVar4,"credits");
    if (((iVar3 != 0) && (*(int *)(developer._28_4_ + 0x30) != 0)) &&
       ((this[0x60c] == (TerrorNavMesh)0x0 ||
        ((this[0x60d] != (TerrorNavMesh)0x0 || (this[0x4e] == (TerrorNavMesh)0x0)))))) {
      local_30[0] = 0;
      local_30[1] = 0;
      local_30[2] = 0;
      local_30[3] = 0;
      local_30[4] = 0;
      local_40 = 0xffffffff;
      local_3c = 2;
      local_38 = 3;
      local_34 = 9;
                    /* try { // try from 0097b1b2 to 0097b208 has its CatchHandler @ 0097b2bb */
      ForEachPlayer<PlayerCollector>((PlayerCollector *)&local_40);
      if (0 < local_30[3]) {
        iVar3 = 0;
        do {
          pCVar1 = *(CTerrorPlayer **)(local_30[0] + iVar3 * 4);
          cVar2 = (**(code **)(*(int *)pCVar1 + 0x778))(pCVar1);
          if ((cVar2 == '\0') && ((pCVar1 == param_1 || (param_1 == (CTerrorPlayer *)0x0)))) {
            this_00 = KeyValues::operator_new((KeyValues *)0x2c,(uint)pcVar5);
                    /* try { // try from 0097b226 to 0097b22a has its CatchHandler @ 0097b2e5 */
            KeyValues::KeyValues(this_00,"data",(IKeyValuesSystem *)0x0,false);
                    /* try { // try from 0097b23e to 0097b269 has its CatchHandler @ 0097b2bb */
            KeyValues::SetString(this_00,"res","Resource/UI/NavErrorMessageBox.res");
            pcVar5 = "message_box";
            (**(code **)(*(int *)pCVar1 + 0x580))(pCVar1,"message_box",1,this_00);
            KeyValues::deleteThis();
          }
          iVar3 = iVar3 + 1;
        } while (iVar3 < local_30[3]);
      }
      local_30[3] = 0;
      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)