L L4D2node

CChangeMissionIssue::CanCallVote

0x00a05730 · 308 bytes · __thiscall

_ZN19CChangeMissionIssue11CanCallVoteEiPKcPc

Decompiled

undefined (4 params)

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

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

{
  char cVar1;
  undefined4 uVar2;
  int *piVar3;
  KeyValues *this_00;
  int iVar4;
  
  cVar1 = CBaseTerrorIssue::CanCallVote((CBaseTerrorIssue *)this,param_1,param_2,param_3);
  if (((cVar1 != '\0') && (cVar1 = CTerrorGameRules::IsSurvivalMode(), cVar1 == '\0')) &&
     (uVar2 = CTerrorGameRules::IsScavengeMode(), (char)uVar2 == '\0')) {
    if (*(int *)(sv_vote_issue_change_mission_allowed._28_4_ + 0x30) == 0) {
      V_strncpy(param_3,"Server has disabled that Issue.",0x60);
      return uVar2;
    }
    uVar2 = CBaseTerrorIssue::CanCallVote((CBaseTerrorIssue *)this,param_1,param_2,param_3);
    if ((char)uVar2 != '\0') {
      piVar3 = (int *)(**(code **)(*g_pMatchFramework + 0x28))(g_pMatchFramework);
      this_00 = (KeyValues *)(**(code **)(*piVar3 + 4))(piVar3,0);
      if (this_00 != (KeyValues *)0x0) {
                    /* try { // try from 00a057e5 to 00a0581a has its CatchHandler @ 00a0586f */
        KeyValues::SetString(this_00,"Game/campaign",param_2);
        KeyValues::SetInt(this_00,"Game/chapter",1);
        iVar4 = (**(code **)(*g_pMatchExtL4D + 8))(g_pMatchExtL4D,this_00,0);
        if (iVar4 == 0) {
                    /* try { // try from 00a05866 to 00a0586a has its CatchHandler @ 00a0586f */
          V_strncpy(param_3,"Not a valid mission.",0x60);
          uVar2 = 0;
        }
        KeyValues::deleteThis();
        return uVar2;
      }
    }
  }
  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)