L L4D2node

_GLOBAL__sub_I_g_bDedicatedServerBenchmarkMode

0x00098410 · 4585 bytes · unknown

Decompiled

undefined (0 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

void _GLOBAL__sub_I_g_bDedicatedServerBenchmarkMode(void)

{
  int iVar1;
  
  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;
  player_info_s_DataDescInit::g_DataMapHolder = DataMapInit<player_info_s>((player_info_s *)0x0);
  g_HostTimes._80_8_ = 0;
  iVar1 = 0;
  do {
    *(undefined8 *)(g_HostTimes + iVar1 * 8 + 0xa8) = 0;
    iVar1 = iVar1 + 1;
  } while (iVar1 != 7);
  ConVar::ConVar((ConVar *)violence_hblood,"violence_hblood","1",0,"Draw human blood");
  __cxa_atexit(ConVar::~ConVar,violence_hblood,&__dso_handle);
  ConVar::ConVar((ConVar *)violence_hgibs,"violence_hgibs","1",0,"Show human gib entities");
  __cxa_atexit(ConVar::~ConVar,violence_hgibs,&__dso_handle);
  ConVar::ConVar((ConVar *)violence_ablood,"violence_ablood","1",0,"Draw alien blood");
  __cxa_atexit(ConVar::~ConVar,violence_ablood,&__dso_handle);
  ConVar::ConVar((ConVar *)violence_agibs,"violence_agibs","1",0,"Show alien gib entities");
  __cxa_atexit(ConVar::~ConVar,violence_agibs,&__dso_handle);
  ConVar::ConVar((ConVar *)closecaption,"closecaption","0",0x1000280,"Enable close captioning.");
  __cxa_atexit(ConVar::~ConVar,closecaption,&__dso_handle);
  ConCommand::ConCommand
            ((ConCommand *)snd_restart,"snd_restart",Snd_Restart_f,"Restart sound system.",0,
             (int_____char_const__char *)0x0);
  __cxa_atexit(ConCommand::~ConCommand,snd_restart,&__dso_handle);
  ConVar::ConVar((ConVar *)mem_test_quiet,"mem_test_quiet","0",0,
                 "Don\'t print stats when memtesting");
  __cxa_atexit(ConVar::~ConVar,mem_test_quiet,&__dso_handle);
  ConVar::ConVar((ConVar *)mem_test_each_frame,"mem_test_each_frame","0",0,
                 "Run heap check at end of every frame\n");
  __cxa_atexit(ConVar::~ConVar,mem_test_each_frame,&__dso_handle);
  ConCommand::ConCommand
            ((ConCommand *)mem_dump_command,"mem_dump",mem_dump,"Dump memory stats to text file.",0,
             (int_____char_const__char *)0x0);
  __cxa_atexit(ConCommand::~ConCommand,mem_dump_command,&__dso_handle);
  ConCommand::ConCommand
            ((ConCommand *)mem_compact_command,"mem_compact",mem_compact,"",0,
             (int_____char_const__char *)0x0);
  __cxa_atexit(ConCommand::~ConCommand,mem_compact_command,&__dso_handle);
  ConCommand::ConCommand
            ((ConCommand *)mem_incremental_compact_command,"mem_incremental_compact",
             mem_incremental_compact,"",0,(int_____char_const__char *)0x0);
  __cxa_atexit(ConCommand::~ConCommand,mem_incremental_compact_command,&__dso_handle);
  ConCommand::ConCommand
            ((ConCommand *)mem_eat_command,"mem_eat",mem_eat,"",0,(int_____char_const__char *)0x0);
  __cxa_atexit(ConCommand::~ConCommand,mem_eat_command,&__dso_handle);
  ConVar::ConVar((ConVar *)mem_incremental_compact_rate,"mem_incremental_compact_rate",".5",0x4000,
                 "Rate at which to attempt internal heap compation");
  __cxa_atexit(ConVar::~ConVar,mem_incremental_compact_rate,&__dso_handle);
  ConCommand::ConCommand
            ((ConCommand *)mem_test_command,"mem_test",mem_test,"",0,(int_____char_const__char *)0x0
            );
  __cxa_atexit(ConCommand::~ConCommand,mem_test_command,&__dso_handle);
  ConVar::ConVar((ConVar *)mem_test_every_n_seconds,"mem_test_every_n_seconds","0",0,
                 "Run heap check at a specified interval\n");
  __cxa_atexit(ConVar::~ConVar,mem_test_every_n_seconds,&__dso_handle);
  ConVar::ConVar((ConVar *)singlestep,"singlestep","0",0x4000,
                 "Run engine in single step mode ( set next to 1 to advance a frame )");
  __cxa_atexit(ConVar::~ConVar,singlestep,&__dso_handle);
  ConVar::ConVar((ConVar *)next,"next","0",0x4000,
                 "Set to 1 to advance to next frame ( when singlestep == 1 )");
  __cxa_atexit(ConVar::~ConVar,next,&__dso_handle);
  ConVar::ConVar((ConVar *)host_showcachemiss,"host_showcachemiss","0",0,
                 "Print a debug message when the client or server cache is missed.");
  __cxa_atexit(ConVar::~ConVar,host_showcachemiss,&__dso_handle);
  ConVar::ConVar((ConVar *)mem_dumpstats,"mem_dumpstats","0",0,
                 "Dump current and max heap usage info to console at end of frame ( set to 2 for continuous output )\n"
                );
  __cxa_atexit(ConVar::~ConVar,mem_dumpstats,&__dso_handle);
  ConVar::ConVar((ConVar *)host_ShowIPCCallCount,"host_ShowIPCCallCount","0",0,
                 "Print # of IPC calls this number of times per second. If set to -1, the # of IPC calls is shown every frame."
                );
  __cxa_atexit(ConVar::~ConVar,host_ShowIPCCallCount,&__dso_handle);
  ConVar::ConVar((ConVar *)vprof_server_spike_threshold,"vprof_server_spike_threshold","999.0",0);
  __cxa_atexit(ConVar::~ConVar,vprof_server_spike_threshold,&__dso_handle);
  ConVar::ConVar((ConVar *)vprof_server_thread,"vprof_server_thread","0",0);
  __cxa_atexit(ConVar::~ConVar,vprof_server_thread,&__dso_handle);
  ConVar::ConVar((ConVar *)telemetry_pause,"telemetry_pause","0",0,"Pause Telemetry",
                 OnChangeTelemetryPause);
  __cxa_atexit(ConVar::~ConVar,telemetry_pause,&__dso_handle);
  ConVar::ConVar((ConVar *)telemetry_resume,"telemetry_resume","0",0,"Resume Telemetry",
                 OnChangeTelemetryResume);
  __cxa_atexit(ConVar::~ConVar,telemetry_resume,&__dso_handle);
  ConVar::ConVar((ConVar *)telemetry_filtervalue,"telemetry_filtervalue","500",0,
                 "Set Telemetry ZoneFilterVal (MicroSeconds)",OnChangeTelemetryZoneFilterVal);
  __cxa_atexit(ConVar::~ConVar,telemetry_filtervalue,&__dso_handle);
  ConVar::ConVar((ConVar *)telemetry_framecount,"telemetry_framecount","0",0,
                 "Set Telemetry count of frames to capture",OnChangeTelemetryFrameCount);
  __cxa_atexit(ConVar::~ConVar,telemetry_framecount,&__dso_handle);
  ConVar::ConVar((ConVar *)telemetry_level,"telemetry_level","0",0,
                 "Set Telemetry profile level: 0 being off. Hight bit set for mask: 0x8#######",
                 OnChangeTelemetryLevel);
  __cxa_atexit(ConVar::~ConVar,telemetry_level,&__dso_handle);
  ConVar::ConVar((ConVar *)telemetry_server,"telemetry_server","localhost",0,"Set Telemetry server",
                 OnChangeTelemetryServer);
  __cxa_atexit(ConVar::~ConVar,telemetry_server,&__dso_handle);
  ConVar::ConVar((ConVar *)telemetry_demostart,"telemetry_demostart","0",0,
                 "When playing demo, start telemetry on tick #",OnChangeTelemetryDemoStart);
  __cxa_atexit(ConVar::~ConVar,telemetry_demostart,&__dso_handle);
  ConVar::ConVar((ConVar *)telemetry_demoend,"telemetry_demoend","0",0,
                 "When playing demo, stop telemetry on tick #",OnChangeTelemetryDemoEnd);
  __cxa_atexit(ConVar::~ConVar,telemetry_demoend,&__dso_handle);
  g_MainThreadId = ThreadGetCurrentId();
  host_state = 0;
  DAT_003a172c = 0;
  DAT_003a1730 = 0;
  DAT_003a1734 = 1;
  _DAT_003a1738 = 1;
  ConVar::ConVar((ConVar *)host_thread_mode,"host_thread_mode","0",2,
                 "Run the host in threaded mode, (0 == off, 1 == if multicore, 2 == force)");
  __cxa_atexit(ConVar::~ConVar,host_thread_mode,&__dso_handle);
  ConVar::ConVar((ConVar *)host_threaded_sound,"host_threaded_sound","0",0,
                 "Run the sound on a thread (independent of mix)");
  __cxa_atexit(ConVar::~ConVar,host_threaded_sound,&__dso_handle);
  ConVar::ConVar((ConVar *)threadpool_affinity,"threadpool_affinity","1",0,"Enable setting affinity"
                 ,false,0.0,false,0.0,OnChangeThreadAffinity);
  __cxa_atexit(ConVar::~ConVar,threadpool_affinity,&__dso_handle);
  CThreadEvent::CThreadEvent((CThreadEvent *)g_ReleaseThreadReservation,true);
  __cxa_atexit(CThreadEvent::~CThreadEvent,g_ReleaseThreadReservation,&__dso_handle);
  g_NumReservedThreads = 0;
  ConVar::ConVar((ConVar *)threadpool_reserve,"threadpool_reserve","0",0,
                 "Consume the specified number of threads in the thread pool",false,0.0,false,0.0,
                 OnChangeThreadReserve);
  __cxa_atexit(ConVar::~ConVar,threadpool_reserve,&__dso_handle);
  ConCommand::ConCommand
            ((ConCommand *)threadpool_cycle_reserve_command,"threadpool_cycle_reserve",
             threadpool_cycle_reserve,"Cycles threadpool reservation by powers of 2",0,
             (int_____char_const__char *)0x0);
  __cxa_atexit(ConCommand::~ConCommand,threadpool_cycle_reserve_command,&__dso_handle);
  ConCommand::ConCommand
            ((ConCommand *)thread_test_tslist_command,"thread_test_tslist",thread_test_tslist,"",0,
             (int_____char_const__char *)0x0);
  __cxa_atexit(ConCommand::~ConCommand,thread_test_tslist_command,&__dso_handle);
  ConCommand::ConCommand
            ((ConCommand *)thread_test_tsqueue_command,"thread_test_tsqueue",thread_test_tsqueue,"",
             0,(int_____char_const__char *)0x0);
  __cxa_atexit(ConCommand::~ConCommand,thread_test_tsqueue_command,&__dso_handle);
  ConCommand::ConCommand
            ((ConCommand *)threadpool_run_tests_command,"threadpool_run_tests",threadpool_run_tests,
             "",0,(int_____char_const__char *)0x0);
  __cxa_atexit(ConCommand::~ConCommand,threadpool_run_tests_command,&__dso_handle);
  host_parms = 0;
  DAT_003a1540 = 0;
  DAT_003a1544 = 0;
  DAT_003a1548 = 0;
  ConVar::ConVar((ConVar *)host_profile,"host_profile","0",0);
  __cxa_atexit(ConVar::~ConVar,host_profile,&__dso_handle);
  ConVar::ConVar((ConVar *)skill,"skill","1",0x80,"Game skill level (1-3).",true,1.0,true,3.0);
  __cxa_atexit(ConVar::~ConVar,skill,&__dso_handle);
  ConVar::ConVar((ConVar *)host_timescale,"host_timescale","1.0",0x6000,
                 "Prescale the clock by this amount.");
  __cxa_atexit(ConVar::~ConVar,host_timescale,&__dso_handle);
  ConVar::ConVar((ConVar *)host_limitlocal,"host_limitlocal","0",0,
                 "Apply cl_cmdrate and cl_updaterate to loopback connection");
  __cxa_atexit(ConVar::~ConVar,host_limitlocal,&__dso_handle);
  ConVar::ConVar((ConVar *)host_framerate,"host_framerate","0",0x80000,
                 "Set to lock per-frame time elapse.");
  __cxa_atexit(ConVar::~ConVar,host_framerate,&__dso_handle);
  ConVar::ConVar((ConVar *)host_speeds,"host_speeds","0",0,"Show general system running times.");
  __cxa_atexit(ConVar::~ConVar,host_speeds,&__dso_handle);
  ConVar::ConVar((ConVar *)developer,"developer","0",0,"Set developer message level");
  __cxa_atexit(ConVar::~ConVar,developer,&__dso_handle);
  ConVar::ConVar((ConVar *)deathmatch,"deathmatch","0",0x100,"Running a deathmatch server.");
  __cxa_atexit(ConVar::~ConVar,deathmatch,&__dso_handle);
  ConVar::ConVar((ConVar *)coop,"coop","0",0x100,"Cooperative play.");
  __cxa_atexit(ConVar::~ConVar,coop,&__dso_handle);
  ConVar::ConVar((ConVar *)r_ForceRestore,"r_ForceRestore","0",0);
  __cxa_atexit(ConVar::~ConVar,r_ForceRestore,&__dso_handle);
  ConVar::ConVar((ConVar *)vcr_verbose,"vcr_verbose","0",0,"Write extra information into .vcr file."
                );
  __cxa_atexit(ConVar::~ConVar,vcr_verbose,&__dso_handle);
  ConCommand::ConCommand
            ((ConCommand *)display_elapsedtime_command,"display_elapsedtime",display_elapsedtime,
             "Displays how much time has elapsed since the game started",0x4000,
             (int_____char_const__char *)0x0);
  __cxa_atexit(ConCommand::~ConCommand,display_elapsedtime_command,&__dso_handle);
  ConCommand::ConCommand
            ((ConCommand *)recompute_speed,"recompute_speed",Host_RecomputeSpeed_f,
             "Recomputes clock speed (for debugging purposes).",0x4000,
             (int_____char_const__char *)0x0);
  __cxa_atexit(ConCommand::~ConCommand,recompute_speed,&__dso_handle);
  ConCommand::ConCommand
            ((ConCommand *)dti_flush,"dti_flush",DTI_Flush_f,
             "Write out the datatable instrumentation files (you must run with -dti for this to work)."
             ,0,(int_____char_const__char *)0x0);
  __cxa_atexit(ConCommand::~ConCommand,dti_flush,&__dso_handle);
  ConVar::ConVar((ConVar *)mem_periodicdumps,"mem_periodicdumps","0",0,
                 "Write periodic memstats dumps every n seconds.");
  __cxa_atexit(ConVar::~ConVar,mem_periodicdumps,&__dso_handle);
  ConCommand::ConCommand
            ((ConCommand *)host_runofftime_command,"host_runofftime",host_runofftime,
             "Run off some time without rendering/updating sounds\n",0,
             (int_____char_const__char *)0x0);
  __cxa_atexit(ConCommand::~ConCommand,host_runofftime_command,&__dso_handle);
  ConVar::ConVar((ConVar *)host_Sleep,"host_sleep","0",0x4000,
                 "Force the host to sleep a certain number of milliseconds each frame.");
  __cxa_atexit(ConVar::~ConVar,host_Sleep,&__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)