L L4D2node

CDirectorChallengeMode::ShouldPlayBossMusic

0x008a0210 · 351 bytes · __thiscall

_ZNK22CDirectorChallengeMode19ShouldPlayBossMusicEPb

Decompiled

undefined (2 params)

/* CDirectorChallengeMode::ShouldPlayBossMusic(bool*) const */

CDirectorChallengeMode __thiscall
CDirectorChallengeMode::ShouldPlayBossMusic(CDirectorChallengeMode *this,bool *param_1)

{
  CDirectorChallengeMode CVar1;
  int iVar2;
  int iVar3;
  void *local_34 [2];
  undefined2 local_2c;
  ushort local_2a;
  void *local_28;
  undefined4 local_24;
  undefined2 local_20;
  ushort local_1e;
  
  CVar1 = this[1];
  if (CVar1 != (CDirectorChallengeMode)0x0) {
    iVar3 = (**(code **)(*g_pScriptVM + 0x48))
                      (g_pScriptVM,"ShouldPlayBossMusic",*(undefined4 *)(TheDirector + 0x4b8),0);
    (**(code **)(*g_pScriptVM + 0x4c))(g_pScriptVM,iVar3);
    iVar2 = TheDirector;
    if (iVar3 != 0) {
      local_2c = 0;
      local_1e = 0;
      local_2a = 0;
      local_34[0] = (void *)0x0;
      local_24 = 0;
      local_20 = 5;
      local_28 = *(void **)(*(int *)(TheDirector + 0x638) + 0xe8);
                    /* try { // try from 008a02e2 to 008a033a has its CatchHandler @ 008a036f */
      iVar3 = (**(code **)(*g_pScriptVM + 0x48))
                        (g_pScriptVM,"ShouldPlayBossMusic",*(undefined4 *)(TheDirector + 0x4b8),0);
      if (iVar3 != 0) {
        (**(code **)(*g_pScriptVM + 0x50))
                  (g_pScriptVM,iVar3,&local_28,1,local_34,*(undefined4 *)(iVar2 + 0x4b8),1);
        (**(code **)(*g_pScriptVM + 0x4c))(g_pScriptVM,iVar3);
      }
      if ((local_1e & 1) != 0) {
        free(local_28);
      }
      *param_1 = local_34[0]._0_1_;
      if ((local_2a & 1) == 0) {
        return CVar1;
      }
      free(local_34[0]);
      return CVar1;
    }
  }
  return (CDirectorChallengeMode)0x0;
}

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)