L L4D2node

PlayerCollector::operator()

0x004ee980 · 437 bytes · __thiscall

_ZN15PlayerCollectorclEP11CBasePlayer

Decompiled

undefined (2 params)

/* PlayerCollector::TEMPNAMEPLACEHOLDERVALUE(CBasePlayer*) */

undefined4 __thiscall PlayerCollector::operator()(PlayerCollector *this,CBasePlayer *param_1)

{
  char cVar1;
  int iVar2;
  CTerrorPlayer *local_10;
  
  if ((param_1 == (CBasePlayer *)0x0) ||
     (cVar1 = (**(code **)(*(int *)param_1 + 0x16c))(param_1), cVar1 == '\0')) {
    iVar2 = *(int *)this;
    local_10 = (CTerrorPlayer *)0x0;
  }
  else {
    iVar2 = *(int *)this;
    local_10 = (CTerrorPlayer *)param_1;
  }
  if (iVar2 == -1) {
    cVar1 = (**(code **)(*(int *)local_10 + 0x778))(local_10);
  }
  else {
    iVar2 = CBaseEntity::GetTeamNumber((CBaseEntity *)local_10);
    if (iVar2 != *(int *)this) {
      return 1;
    }
    if (((iVar2 == 3) && (*(int *)(this + 0xc) != 9)) &&
       (iVar2 = (**(code **)(*(int *)local_10 + 0x544))(local_10), iVar2 != *(int *)(this + 0xc))) {
      return 1;
    }
    cVar1 = (**(code **)(*(int *)local_10 + 0x778))(local_10);
  }
  if (((cVar1 != '\0') || (((byte)this[8] & 1) != 0)) &&
     ((cVar1 = (**(code **)(*(int *)local_10 + 0x778))(local_10), cVar1 == '\0' ||
      (((byte)this[8] & 2) != 0)))) {
    cVar1 = (**(code **)(*(int *)local_10 + 300))(local_10);
    if ((cVar1 == '\0') && (((byte)this[4] & 1) != 0)) {
      CUtlVector<CTerrorPlayer*,CUtlMemory<CTerrorPlayer*,int>>::InsertBefore
                ((CUtlVector<CTerrorPlayer*,CUtlMemory<CTerrorPlayer*,int>> *)(this + 0x10),
                 *(int *)(this + 0x1c),&local_10);
    }
    cVar1 = (**(code **)(*(int *)local_10 + 300))(local_10);
    if (((cVar1 != '\0') &&
        (cVar1 = (**(code **)(*(int *)local_10 + 0x558))(local_10), cVar1 == '\0')) &&
       (((byte)this[4] & 2) != 0)) {
      CUtlVector<CTerrorPlayer*,CUtlMemory<CTerrorPlayer*,int>>::InsertBefore
                ((CUtlVector<CTerrorPlayer*,CUtlMemory<CTerrorPlayer*,int>> *)(this + 0x10),
                 *(int *)(this + 0x1c),&local_10);
    }
    cVar1 = (**(code **)(*(int *)local_10 + 300))(local_10);
    if (((cVar1 != '\0') &&
        (cVar1 = (**(code **)(*(int *)local_10 + 0x558))(local_10), cVar1 != '\0')) &&
       (((byte)this[4] & 4) != 0)) {
      CUtlVector<CTerrorPlayer*,CUtlMemory<CTerrorPlayer*,int>>::InsertBefore
                ((CUtlVector<CTerrorPlayer*,CUtlMemory<CTerrorPlayer*,int>> *)(this + 0x10),
                 *(int *)(this + 0x1c),&local_10);
    }
  }
  return 1;
}

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)