L L4D2node

CResponseSystem::TokenWaiting

0x005bead0 · 180 bytes · __thiscall

_ZN15CResponseSystem12TokenWaitingEv

Decompiled

undefined (1 param)

/* CResponseSystem::TokenWaiting() */

bool __thiscall CResponseSystem::TokenWaiting(CResponseSystem *this)

{
  uint uVar1;
  char cVar2;
  int iVar3;
  bool bVar4;
  char *pcVar5;
  
  if (0 < *(int *)(this + 0x3d8c)) {
    pcVar5 = *(char **)(*(int *)(this + 0x3d80) + 8);
    if (pcVar5 == (char *)0x0) {
      Error("AI_ResponseSystem:  Unxpected TokenWaiting() with NULL buffer in %s",
            *(undefined4 *)(*(int *)(this + 0x3d80) + 4));
      return false;
    }
    cVar2 = *pcVar5;
    bVar4 = cVar2 != '\0' && cVar2 != '\n';
    if (cVar2 == '\0' || cVar2 == '\n') {
      return bVar4;
    }
    do {
      if (cVar2 == '/') {
        return pcVar5[1] != '/';
      }
      uVar1 = (int)cVar2 - 9;
      if (0x17 < uVar1) {
        return bVar4;
      }
      if ((1 << ((byte)uVar1 & 0x1f) & 0x80001fU) == 0) {
        return bVar4;
      }
      iVar3 = isalnum((int)cVar2);
      if (iVar3 != 0) {
        return bVar4;
      }
      pcVar5 = pcVar5 + 1;
      cVar2 = *pcVar5;
    } while (cVar2 != '\n' && cVar2 != '\0');
  }
  return false;
}

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)