L L4D2node

CBaseIssue::CountPotentialVoters

0x00b3f3a0 · 125 bytes · __cdecl

_ZN10CBaseIssue20CountPotentialVotersEv

Decompiled

undefined (0 params)

/* CBaseIssue::CountPotentialVoters() */

int CBaseIssue::CountPotentialVoters(void)

{
  char cVar1;
  CBaseEntity *this;
  int iVar2;
  int iVar3;
  int iVar4;
  
  iVar4 = 0;
  iVar3 = 1;
  do {
    this = (CBaseEntity *)UTIL_PlayerByIndex(iVar3);
    if (((this != (CBaseEntity *)0x0) && (*(int *)(this + 0x1f6c) != 2)) &&
       (cVar1 = (**(code **)(*(int *)this + 0x778))(this), cVar1 == '\0')) {
      iVar2 = CBaseEntity::GetTeamNumber(this);
      if (iVar2 == 1) {
        iVar2 = 2;
      }
      if ((*(int *)(g_voteController + 0x444) == -1) ||
         (iVar2 == *(int *)(g_voteController + 0x444))) {
        iVar4 = iVar4 + 1;
      }
    }
    iVar3 = iVar3 + 1;
  } while (iVar3 != 0x21);
  return iVar4;
}

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)