L L4D2node

CVEngineServer::GetNumSplitScreenUsersAttachedToEdict

0x0022cd60 · 97 bytes · __thiscall

_ZN14CVEngineServer37GetNumSplitScreenUsersAttachedToEdictEi

Decompiled

undefined (2 params)

/* CVEngineServer::GetNumSplitScreenUsersAttachedToEdict(int) */

int __thiscall
CVEngineServer::GetNumSplitScreenUsersAttachedToEdict(CVEngineServer *this,int param_1)

{
  int *piVar1;
  char cVar2;
  int iVar3;
  int iVar4;
  
  iVar4 = 0;
  if ((0 < param_1) && (param_1 <= DAT_003b8080)) {
    piVar1 = *(int **)(DAT_003b8074 + -4 + param_1 * 4);
    cVar2 = (**(code **)(*piVar1 + 0x94))(piVar1);
    if ((cVar2 == '\0') && (1 < DAT_003a1734)) {
      iVar4 = 0;
      iVar3 = 1;
      do {
        iVar4 = (iVar4 + 1) - (uint)(piVar1[iVar3 + 6] == 0);
        iVar3 = iVar3 + 1;
      } while (iVar3 != DAT_003a1734);
    }
  }
  return iVar4;
}

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)