L L4D2node

CBaseTerrorIssue::CanCallVote

0x00a05450 · 236 bytes · __thiscall

_ZN16CBaseTerrorIssue11CanCallVoteEiPKcPc

Decompiled

undefined (4 params)

/* CBaseTerrorIssue::CanCallVote(int, char const*, char*) */

undefined4 __thiscall
CBaseTerrorIssue::CanCallVote(CBaseTerrorIssue *this,int param_1,char *param_2,char *param_3)

{
  char cVar1;
  undefined4 uVar2;
  int iVar3;
  
  uVar2 = CBaseIssue::CanCallVote((CBaseIssue *)this,param_1,param_2,param_3);
  if ((char)uVar2 != '\0') {
    iVar3 = CountTransitioningPlayers();
    if (iVar3 < 1) {
      cVar1 = (**(code **)(*(int *)this + 0x3c))(this);
      if ((cVar1 == '\0') ||
         ((cVar1 = CDirector::HasAnySurvivorLeftSafeArea(TheDirector), cVar1 == '\0' &&
          (cVar1 = CDirector::IsMissionStartMap(TheDirector), cVar1 != '\0')))) {
        cVar1 = CDirector::IsFinaleEscapeInProgress(TheDirector);
        if ((cVar1 == '\0') && (cVar1 = CDirector::IsFinaleWon(TheDirector), cVar1 == '\0')) {
          return uVar2;
        }
      }
      else {
        V_strncpy(param_3,"You can only vote on that before people leave the starting spawn area.",
                  0x60);
      }
    }
    else {
      iVar3 = UTIL_PlayerByIndex(param_1);
      if (iVar3 != 0) {
        CVoteController::SendVoteFailedMessage(g_voteController,iVar3,1);
        return 0;
      }
    }
  }
  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)