L L4D2node

CBasePlayer::SetupVisibility

0x007a6330 · 293 bytes · __cdecl

_ZN11CBasePlayer15SetupVisibilityEP11CBaseEntityPhi

Decompiled

undefined (3 params)

/* CBasePlayer::SetupVisibility(CBaseEntity*, unsigned char*, int) */

void CBasePlayer::SetupVisibility(CBaseEntity *param_1,uchar *param_2,int param_3)

{
  code *pcVar1;
  char cVar2;
  int iVar3;
  int *piVar4;
  int **ppiVar5;
  int *local_40;
  undefined4 *local_3c;
  CBaseEntity *local_38;
  undefined4 local_24;
  undefined4 local_20;
  undefined4 local_1c;
  undefined4 local_18;
  undefined4 local_14;
  undefined4 local_10;
  
  ppiVar5 = &local_3c;
  if ((param_2 == (uchar *)0x0) || (*(int *)(VisForce._28_4_ + 0x30) != 0)) {
    local_3c = &local_18;
    local_38 = param_1;
    local_40 = (int *)0x7a63c2;
    (**(code **)(*(int *)param_1 + 0x234))();
    local_3c = &local_24;
    ppiVar5 = &local_40;
    local_24 = local_18;
    local_20 = local_14;
    local_1c = local_10;
    local_40 = engine;
    (**(code **)(*engine + 0xf0))();
  }
  pcVar1 = *(code **)(*engine + 0x1d4);
  if (*(int *)(param_1 + 0x30) == 0) {
    iVar3 = 0;
  }
  else {
    iVar3 = *(int *)(param_1 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
  }
  ppiVar5[2] = (int *)0x1;
  ppiVar5[1] = (int *)iVar3;
  *ppiVar5 = engine;
  ppiVar5[-1] = (int *)0x7a6383;
  iVar3 = (*pcVar1)();
  if ((iVar3 != 0) && (piVar4 = *(int **)(iVar3 + 0xc), piVar4 != (int *)0x0)) {
    iVar3 = *piVar4;
    *ppiVar5 = piVar4;
    pcVar1 = *(code **)(iVar3 + 0x18);
    ppiVar5[-1] = (int *)0x7a6396;
    piVar4 = (int *)(*pcVar1)();
    if (piVar4 != (int *)0x0) {
      iVar3 = *piVar4;
      *ppiVar5 = piVar4;
      pcVar1 = *(code **)(iVar3 + 0x16c);
      ppiVar5[-1] = (int *)0x7a63a7;
      cVar2 = (*pcVar1)();
      if (cVar2 != '\0') {
        iVar3 = *piVar4;
        ppiVar5[1] = piVar4;
        *ppiVar5 = &local_18;
        pcVar1 = *(code **)(iVar3 + 0x234);
        ppiVar5[-1] = (int *)0x7a6412;
        (*pcVar1)();
        local_24 = local_18;
        local_20 = local_14;
        local_1c = local_10;
        iVar3 = *engine;
        *ppiVar5 = &local_24;
        ppiVar5[-1] = engine;
        pcVar1 = *(code **)(iVar3 + 0xf0);
        ppiVar5[-2] = (int *)0x7a644a;
        (*pcVar1)();
        return;
      }
    }
  }
  return;
}

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)