L L4D2node

CVoteController::SteamUserCanCallVote

0x00b3fe70 · 151 bytes · __thiscall

_ZN15CVoteController20SteamUserCanCallVoteEi

Decompiled

undefined (2 params)

/* CVoteController::SteamUserCanCallVote(int) */

undefined1 __thiscall CVoteController::SteamUserCanCallVote(CVoteController *this,int param_1)

{
  char cVar1;
  int iVar2;
  int *piVar3;
  
  if (((param_1 != 0) && (cVar1 = CDirector::IsSinglePlayerGame(), cVar1 == '\0')) &&
     (0 < *(int *)(this + 0x568))) {
    iVar2 = 0;
    piVar3 = *(int **)(this + 0x55c);
    do {
      if ((*piVar3 == param_1) &&
         ((*gpGlobals - (float)piVar3[1] < *(float *)(sv_vote_creation_timer._28_4_ + 0x2c) ||
          (*(int *)(sv_vote_plr_map_limit._28_4_ + 0x30) <= piVar3[3])))) {
        return 0;
      }
      iVar2 = iVar2 + 1;
      piVar3 = piVar3 + 6;
    } while (iVar2 != *(int *)(this + 0x568));
  }
  return 1;
}

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)