L L4D2node

SurvivorTeamSituation::GetFriendVisibilityInfo

0x00966280 · 177 bytes · __thiscall

_ZNK21SurvivorTeamSituation23GetFriendVisibilityInfoEP13CTerrorPlayer

Decompiled

undefined (2 params)

/* SurvivorTeamSituation::GetFriendVisibilityInfo(CTerrorPlayer*) const */

SurvivorTeamSituation * __thiscall
SurvivorTeamSituation::GetFriendVisibilityInfo(SurvivorTeamSituation *this,CTerrorPlayer *param_1)

{
  uint uVar1;
  SurvivorTeamSituation *pSVar2;
  int iVar3;
  int iVar4;
  undefined *puVar5;
  int iVar6;
  
  if ((param_1 != (CTerrorPlayer *)0x0) && (0 < *(int *)(this + 0xd6f8))) {
    pSVar2 = this + 0xd6d4;
    iVar3 = 0;
    do {
      uVar1 = *(uint *)pSVar2;
      if ((((uVar1 != 0xffffffff) &&
           (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
          (*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar5 + 4) != 0)) {
        iVar6 = *(int *)(*(int *)(puVar5 + 4) + 0x30);
        if (iVar6 == 0) {
          iVar6 = 0;
        }
        else {
          iVar6 = iVar6 - *(int *)(gpGlobals + 0x58) >> 4;
        }
        if (*(int *)(param_1 + 0x30) == 0) {
          iVar4 = 0;
        }
        else {
          iVar4 = *(int *)(param_1 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
        }
        if (iVar6 == iVar4) {
          return pSVar2;
        }
      }
      iVar3 = iVar3 + 1;
      pSVar2 = pSVar2 + 0xc;
    } while (iVar3 != *(int *)(this + 0xd6f8));
  }
  return (SurvivorTeamSituation *)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)