L L4D2node

MapEntity_GetNumKeysInEntity

0x00468f50 · 109 bytes · __cdecl

_Z28MapEntity_GetNumKeysInEntityPKc

Decompiled

undefined (1 param)

/* MapEntity_GetNumKeysInEntity(char const*) */

int MapEntity_GetNumKeysInEntity(char *param_1)

{
  char *pcVar1;
  int iVar2;
  int in_GS_OFFSET;
  char local_810 [2048];
  int local_10;
  
  iVar2 = 0;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_1 != (char *)0x0) {
    do {
      pcVar1 = (char *)MapEntity_ParseToken(param_1,local_810);
      if (local_810[0] == '}') break;
      iVar2 = iVar2 + 1;
      param_1 = (char *)MapEntity_ParseToken(pcVar1,local_810);
    } while (param_1 != (char *)0x0);
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

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)