L L4D2node

SplitScreenConVarRef::SplitScreenConVarRef

0x00b6b3e0 · 208 bytes · __thiscall

_ZN20SplitScreenConVarRefC1EP7IConVar

Decompiled

undefined (2 params)

/* SplitScreenConVarRef::SplitScreenConVarRef(IConVar*) */

void __thiscall
SplitScreenConVarRef::SplitScreenConVarRef(SplitScreenConVarRef *this,IConVar *param_1)

{
  int iVar1;
  IConVar *pIVar2;
  undefined4 uVar3;
  undefined1 *puVar4;
  int iVar5;
  int in_GS_OFFSET;
  char local_120 [256];
  int local_20;
  
  iVar5 = 1;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  pIVar2 = (IConVar *)(s_EmptyConVar + 0x18);
  if (param_1 != (IConVar *)0x0) {
    pIVar2 = param_1;
  }
  *(IConVar **)this = pIVar2;
  *(IConVar **)(this + 4) = pIVar2 + -0x18;
  do {
    iVar1 = iVar5 * 8;
    uVar3 = *(undefined4 *)(this + iVar5 * 8 + 4);
    iVar5 = iVar5 + 1;
    *(undefined4 *)this = *(undefined4 *)(this + iVar1);
    *(undefined4 *)(this + 4) = uVar3;
    uVar3 = (**(code **)(*(int *)param_1 + 0x10))(param_1);
    V_snprintf(local_120,0x100,"%s%d",uVar3,iVar5);
    if (g_pCVar == (int *)0x0) {
      puVar4 = s_EmptyConVar;
LAB_00b6b470:
      puVar4 = puVar4 + 0x18;
      *(undefined1 **)this = puVar4;
    }
    else {
      puVar4 = (undefined1 *)(**(code **)(*g_pCVar + 0x30))(g_pCVar,local_120);
      if (puVar4 != (undefined1 *)0x0) goto LAB_00b6b470;
      *(undefined4 *)this = 0x1045498;
      puVar4 = (undefined1 *)0x1045498;
    }
    *(undefined1 **)(this + 4) = puVar4 + -0x18;
    if (iVar5 == 4) {
      if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
        return;
      }
                    /* WARNING: Subroutine does not return */
      __stack_chk_fail();
    }
  } while( true );
}

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)