L L4D2node

CBasePlayer::GetSplitScreenPlayerSlot

0x007b9410 · 167 bytes · __thiscall

_ZN11CBasePlayer24GetSplitScreenPlayerSlotEv

Decompiled

undefined (1 param)

/* CBasePlayer::GetSplitScreenPlayerSlot() */

undefined4 __thiscall CBasePlayer::GetSplitScreenPlayerSlot(CBasePlayer *this)

{
  uint uVar1;
  int *piVar2;
  int iVar3;
  CBasePlayer *pCVar4;
  undefined *puVar5;
  
  if (this[0x2349] != (CBasePlayer)0x0) {
    uVar1 = *(uint *)(this + 0x234c);
    if (((uVar1 == 0xffffffff) ||
        (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
       (*(uint *)(puVar5 + 8) != uVar1 >> 0xc)) {
      iVar3 = 0;
    }
    else {
      iVar3 = *(int *)(puVar5 + 4);
    }
    if (*(int *)(iVar3 + 0x30) == 0) {
      iVar3 = 0;
    }
    else {
      iVar3 = *(int *)(iVar3 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
    }
    iVar3 = (**(code **)(*engine + 0x1d4))(engine,iVar3,1);
    if (((iVar3 != 0) && (piVar2 = *(int **)(iVar3 + 0xc), piVar2 != (int *)0x0)) &&
       (pCVar4 = (CBasePlayer *)(**(code **)(*piVar2 + 0x18))(piVar2), pCVar4 == this)) {
      return 1;
    }
  }
  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)