L L4D2node

CVoteController::_GLOBAL__sub_I_GetServerClass

0x003da850 · 1163 bytes · __cdecl

Decompiled

undefined (0 params)

/* CVoteController::GetServerClass() */

void CVoteController::_GLOBAL__sub_I_GetServerClass(void)

{
  int iVar1;
  undefined4 *puVar2;
  undefined4 *puVar3;
  undefined4 *puVar4;
  
  puVar2 = (undefined4 *)g_pServerClassHead;
  ::UNSPECIFIED_LOGGING_COLOR._0_1_ = 0;
  ::UNSPECIFIED_LOGGING_COLOR._1_1_ = 0;
  ::UNSPECIFIED_LOGGING_COLOR._2_1_ = 0;
  ::UNSPECIFIED_LOGGING_COLOR._3_1_ = 0;
  ::vec2_origin._0_4_ = 0;
  ::vec2_origin._4_4_ = 0;
  ::vec2_invalid._0_4_ = 0x7f7fffff;
  ::vec2_invalid._4_4_ = 0x7f7fffff;
  ::vec4_origin._0_4_ = 0;
  ::vec4_origin._4_4_ = 0;
  ::vec4_origin._8_4_ = 0;
  ::vec4_origin._12_4_ = 0;
  ::vec4_invalid._0_4_ = 0x7f7fffff;
  ::vec4_invalid._4_4_ = 0x7f7fffff;
  ::vec4_invalid._8_4_ = 0x7f7fffff;
  ::vec4_invalid._12_4_ = 0x7f7fffff;
  g_CVoteController_ClassReg._0_4_ = s_CVoteController_00d4b041;
  g_CVoteController_ClassReg._4_4_ = DT_VoteController::g_SendTable;
  g_CVoteController_ClassReg._16_4_ = 0xffff;
  if ((undefined4 *)g_pServerClassHead == (undefined4 *)0x0) {
    g_pServerClassHead = g_CVoteController_ClassReg;
    g_CVoteController_ClassReg._8_4_ = 0;
  }
  else {
    puVar4 = *(undefined4 **)((int)g_pServerClassHead + 8);
    iVar1 = _V_stricmp(*(char **)g_pServerClassHead,"CVoteController");
    puVar3 = (undefined4 *)g_pServerClassHead;
    if (iVar1 < 1) {
      if (puVar4 != (undefined4 *)0x0) {
        do {
          puVar3 = puVar4;
          iVar1 = _V_stricmp((char *)*puVar3,"CVoteController");
          puVar4 = puVar3;
          if (0 < iVar1) goto LAB_003dacb6;
          puVar4 = (undefined4 *)puVar3[2];
          puVar2 = puVar3;
        } while ((undefined4 *)puVar3[2] != (undefined4 *)0x0);
        puVar4 = (undefined4 *)0x0;
      }
LAB_003dacb6:
      g_CVoteController_ClassReg._8_4_ = puVar4;
      puVar2[2] = g_CVoteController_ClassReg;
    }
    else {
      g_pServerClassHead = g_CVoteController_ClassReg;
      g_CVoteController_ClassReg._8_4_ = puVar3;
    }
  }
  SendTable::SendTable((SendTable *)DT_VoteController::g_SendTable);
  __cxa_atexit(SendTable::~SendTable,DT_VoteController::g_SendTable,&__dso_handle);
  DT_VoteController::g_SendTableInit = ServerClassInit<DT_VoteController::ignored>((ignored *)0x0);
  CVoteController_DataDescInit::g_DataMapHolder =
       DataMapInit<CVoteController>((CVoteController *)0x0);
  vote_controller = &PTR_Create_00d4b6b8;
  puVar2 = (undefined4 *)EntityFactoryDictionary();
  (**(code **)*puVar2)(puVar2,&vote_controller,"vote_controller");
  ConVar::ConVar((ConVar *)sv_vote_timer_duration,"sv_vote_timer_duration","15",2,
                 "How long to allow voting on an issue");
  __cxa_atexit(ConVar::~ConVar,sv_vote_timer_duration,&__dso_handle);
  ConVar::ConVar((ConVar *)sv_vote_command_delay,"sv_vote_command_delay","2",2,
                 "How long after a vote passes until the action happens",false,0.0,true,4.5);
  __cxa_atexit(ConVar::~ConVar,sv_vote_command_delay,&__dso_handle);
  ConVar::ConVar((ConVar *)sv_allow_votes,"sv_allow_votes","1",0,
                 "Allow voting? (Requires mod\'s support first.)");
  __cxa_atexit(ConVar::~ConVar,sv_allow_votes,&__dso_handle);
  ConVar::ConVar((ConVar *)sv_vote_failure_timer,"sv_vote_failure_timer","0",2,
                 "A vote that fails cannot be re-submitted for this long");
  __cxa_atexit(ConVar::~ConVar,sv_vote_failure_timer,&__dso_handle);
  ConVar::ConVar((ConVar *)sv_vote_creation_timer,"sv_vote_creation_timer","180",0x6000,
                 "How often someone can individually call a vote.");
  __cxa_atexit(ConVar::~ConVar,sv_vote_creation_timer,&__dso_handle);
  ConVar::ConVar((ConVar *)sv_vote_show_caller,"sv_vote_show_caller","1",0x6000,
                 "Show the name of the person that called the vote? (1: Yes, 0: No)");
  __cxa_atexit(ConVar::~ConVar,sv_vote_show_caller,&__dso_handle);
  ConVar::ConVar((ConVar *)sv_vote_plr_map_limit,"sv_vote_plr_map_limit","3",0x6000,
                 "Number of failed votes a user can call per map");
  __cxa_atexit(ConVar::~ConVar,sv_vote_plr_map_limit,&__dso_handle);
  ConCommand::ConCommand
            ((ConCommand *)::ListIssues,"listissues",CommandListIssues,
             "List all the issues that can be voted on.",0,(int_____char_const__char *)0x0);
  __cxa_atexit(ConCommand::~ConCommand,::ListIssues,&__dso_handle);
  ConCommand::ConCommand
            ((ConCommand *)callvote_command,"callvote",callvote,"Start a vote on an issue.",0,
             (int_____char_const__char *)0x0);
  __cxa_atexit(ConCommand::~ConCommand,callvote_command,&__dso_handle);
  return;
}

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.



        
        

⚠ This function has no mangled symbol — it may be internal/static. The Linux gamedata field uses @-prefix symbol resolution which requires an exported mangled name. You'll need a Linux byte signature for this one (extract via extract_signature.java).


          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)