L L4D2node

Commentary_IsCommentaryEntity

0x00649750 · 140 bytes · __cdecl

_Z29Commentary_IsCommentaryEntityP11CBaseEntity

Decompiled

undefined (1 param)

/* Commentary_IsCommentaryEntity(CBaseEntity*) */

bool Commentary_IsCommentaryEntity(CBaseEntity *param_1)

{
  uint uVar1;
  int iVar2;
  undefined *puVar3;
  
  if (g_CommentarySystem._80_4_ != 0) {
    iVar2 = 0;
    do {
      uVar1 = *(uint *)(g_CommentarySystem._68_4_ + iVar2 * 4);
      if (((uVar1 == 0xffffffff) ||
          (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 == (undefined *)0xfffffffc)) ||
         (*(uint *)(puVar3 + 8) != uVar1 >> 0xc)) {
        if (param_1 == (CBaseEntity *)0x0) {
          return true;
        }
      }
      else if (param_1 == *(CBaseEntity **)(puVar3 + 4)) {
        return true;
      }
      iVar2 = iVar2 + 1;
    } while (iVar2 != g_CommentarySystem._80_4_);
  }
  return *(char **)(param_1 + 0x154) == "commentary_semaphore";
}

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)