L L4D2node

CEventQueue::HasEventPending

0x0063d350 · 153 bytes · __thiscall

_ZN11CEventQueue15HasEventPendingEP11CBaseEntityPKc

Decompiled

undefined (3 params)

/* CEventQueue::HasEventPending(CBaseEntity*, char const*) */

undefined4 __thiscall
CEventQueue::HasEventPending(CEventQueue *this,CBaseEntity *param_1,char *param_2)

{
  int iVar1;
  uint uVar2;
  size_t sVar3;
  int iVar4;
  undefined *puVar5;
  char *pcVar6;
  
  if (param_1 != (CBaseEntity *)0x0) {
    for (iVar1 = *(int *)(this + 0x30); iVar1 != 0; iVar1 = *(int *)(iVar1 + 0x30)) {
      uVar2 = *(uint *)(iVar1 + 0x18);
      if ((((uVar2 != 0xffffffff) &&
           (puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
          (*(uint *)(puVar5 + 8) == uVar2 >> 0xc)) && (param_1 == *(CBaseEntity **)(puVar5 + 4))) {
        if (param_2 == (char *)0x0) {
          return 1;
        }
        sVar3 = strlen(param_2);
        pcVar6 = *(char **)(iVar1 + 8);
        if (pcVar6 == (char *)0x0) {
          pcVar6 = "";
        }
        iVar4 = V_strncmp(pcVar6,param_2,sVar3);
        if (iVar4 == 0) {
          return 1;
        }
      }
    }
  }
  return 0;
}

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)