L L4D2node

CCSPlayer::GetNextObserverSearchStartPoint

0x00660740 · 232 bytes · __thiscall

_ZN9CCSPlayer31GetNextObserverSearchStartPointEb

Decompiled

undefined (2 params)

/* CCSPlayer::GetNextObserverSearchStartPoint(bool) */

int __thiscall CCSPlayer::GetNextObserverSearchStartPoint(CCSPlayer *this,bool param_1)

{
  uint uVar1;
  int *piVar2;
  char cVar3;
  int iVar4;
  undefined *puVar5;
  
  uVar1 = *(uint *)(this + 0x1d7c);
  if ((((uVar1 != 0xffffffff) &&
       (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) &&
     (piVar2 = *(int **)(puVar5 + 4), piVar2 != (int *)0x0)) {
    cVar3 = (**(code **)(*piVar2 + 300))(piVar2);
    if (cVar3 == '\0') {
      uVar1 = *(uint *)(this + 0x1d7c);
      if (((uVar1 != 0xffffffff) &&
          (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
         ((*(uint *)(puVar5 + 8) == uVar1 >> 0xc &&
          (piVar2 = *(int **)(puVar5 + 4), piVar2 != (int *)0x0)))) {
        cVar3 = (**(code **)(*piVar2 + 0x16c))(piVar2);
        if (cVar3 != '\0') {
          iVar4 = (**(code **)(*piVar2 + 0x654))(piVar2);
          if (iVar4 != 0) {
            iVar4 = (**(code **)(*piVar2 + 0x654))(piVar2);
            if (*(int *)(iVar4 + 0x30) == 0) {
              iVar4 = 0;
            }
            else {
              iVar4 = *(int *)(iVar4 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
            }
            return iVar4;
          }
        }
      }
    }
  }
  iVar4 = CBasePlayer::GetNextObserverSearchStartPoint((CBasePlayer *)this,param_1);
  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)