L L4D2node

InitGameSystems

0x00375781 · 307 bytes · __cdecl

_ZL15InitGameSystemsPFPvPKcPiE.isra.24

Decompiled

undefined (1 param)

/* InitGameSystems(void* (*)(char const*, int*)) [clone .isra.24] */

char InitGameSystems(_func_void_ptr_char_ptr_int_ptr *param_1)

{
  char cVar1;
  IGameSystem *pIVar2;
  CDirector *this;
  PlayerReporter *this_00;
  CAwardPool *this_01;
  Tutor *this_02;
  
  pIVar2 = (IGameSystem *)GameStringSystem();
  IGameSystem::Add(pIVar2);
  pIVar2 = (IGameSystem *)PhysicsGameSystem();
  IGameSystem::Add(pIVar2);
  IGameSystem::Add((IGameSystem *)g_pPrecacheRegister);
  pIVar2 = (IGameSystem *)GameLogSystem();
  IGameSystem::Add(pIVar2);
  pIVar2 = (IGameSystem *)HLTVDirectorSystem();
  IGameSystem::Add(pIVar2);
  pIVar2 = (IGameSystem *)SoundEmitterSystem();
  IGameSystem::Add(pIVar2);
  (**(code **)(*gameeventmanager + 8))(gameeventmanager,"resource/ModEvents.res");
  InstallBotControl();
  cVar1 = IGameSystem::InitAllSystems();
  if ((cVar1 != '\0') && (cVar1 = ModelSoundsCacheInit(), cVar1 != '\0')) {
    InvalidateQueryCache();
    this = malloc(0x64c);
    _V_memset(this,0,0x64c);
                    /* try { // try from 0037583a to 0037583e has its CatchHandler @ 003758ab */
    CDirector::CDirector(this);
    TheDirector = this;
    CDirector::Init(this);
    this_00 = operator_new(0x28);
                    /* try { // try from 0037585e to 00375862 has its CatchHandler @ 003758bb */
    PlayerReporter::PlayerReporter(this_00);
    ThePlayerReporter = this_00;
    this_01 = operator_new(1);
                    /* try { // try from 0037587a to 0037587e has its CatchHandler @ 003758cd */
    CAwardPool::CAwardPool(this_01);
    TheAwardPool = this_01;
    this_02 = (Tutor *)TheTutor();
    Tutor::Reset(this_02);
    TheNavMesh = NavMeshFactory();
    (**(code **)(*gamestatsuploader + 4))(gamestatsuploader);
    return cVar1;
  }
  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)