L L4D2node

CTerrorPlayer::StartRangeCull

0x009a5f20 · 687 bytes · __thiscall

_ZN13CTerrorPlayer14StartRangeCullEv

Decompiled

undefined (1 param)

/* CTerrorPlayer::StartRangeCull() */

void __thiscall CTerrorPlayer::StartRangeCull(CTerrorPlayer *this)

{
  float fVar1;
  CBaseEdict *pCVar2;
  char cVar3;
  int iVar4;
  longdouble lVar5;
  
  iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
  if ((iVar4 == 3) && (iVar4 = (**(code **)(*(int *)this + 0x544))(this), iVar4 == 8)) {
    return;
  }
  if (this[0x32c4] == (CTerrorPlayer)0x0) {
    if (this[0x6c] == (CTerrorPlayer)0x0) {
      pCVar2 = *(CBaseEdict **)(this + 0x30);
      if (pCVar2 != (CBaseEdict *)0x0) {
        *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
        iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
        *(undefined2 *)(iVar4 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
    }
    this[0x32c4] = (CTerrorPlayer)0x1;
    if (this[0x32c5] != (CTerrorPlayer)0x0) {
      if (this[0x6c] == (CTerrorPlayer)0x0) {
        pCVar2 = *(CBaseEdict **)(this + 0x30);
        if (pCVar2 != (CBaseEdict *)0x0) {
          *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
          iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
          *(undefined2 *)(iVar4 + 2) = 0;
        }
      }
      else {
        this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
      }
      this[0x32c5] = (CTerrorPlayer)0x0;
    }
    iVar4 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
    if ((iVar4 == 3) && (iVar4 = (**(code **)(*(int *)this + 0x544))(this), iVar4 == 8)) {
      fVar1 = *(float *)(ZombieCullTimeout._28_4_ + 0x2c);
      lVar5 = (longdouble)CountdownTimer::Now();
      if ((float)lVar5 + fVar1 != *(float *)(this + 0x32d0)) {
        (**(code **)(*(int *)(this + 13000) + 4))(this + 13000,this + 0x32d0);
        *(float *)(this + 0x32d0) = (float)lVar5 + fVar1;
      }
      if (fVar1 != *(float *)(this + 0x32cc)) {
        (**(code **)(*(int *)(this + 13000) + 4))(this + 13000,this + 0x32cc);
        *(float *)(this + 0x32cc) = fVar1;
      }
    }
    else {
      cVar3 = (**(code **)(*(int *)this + 0x778))(this);
      if (cVar3 == '\0') {
        if (*(float *)(this + 0x32d0) != -1.0) {
          (**(code **)(*(int *)(this + 13000) + 4))(this + 13000,this + 0x32d0);
          *(undefined4 *)(this + 0x32d0) = 0xbf800000;
        }
      }
      else {
        if (this[0x32c5] != (CTerrorPlayer)0x1) {
          if (this[0x6c] == (CTerrorPlayer)0x0) {
            pCVar2 = *(CBaseEdict **)(this + 0x30);
            if (pCVar2 != (CBaseEdict *)0x0) {
              *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
              iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
              *(undefined2 *)(iVar4 + 2) = 0;
            }
          }
          else {
            this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
          }
          this[0x32c5] = (CTerrorPlayer)0x1;
        }
        lVar5 = (longdouble)CountdownTimer::Now();
        if ((float)lVar5 + 0.5 != *(float *)(this + 0x32d0)) {
          (**(code **)(*(int *)(this + 13000) + 4))(this + 13000,this + 0x32d0);
          *(float *)(this + 0x32d0) = (float)lVar5 + 0.5;
        }
        if (*(float *)(this + 0x32cc) != 0.5) {
          (**(code **)(*(int *)(this + 13000) + 4))(this + 13000,this + 0x32cc);
          *(undefined4 *)(this + 0x32cc) = 0x3f000000;
        }
      }
    }
  }
  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)