L L4D2node

CFilterEnemy::PassesProximityFilter

0x0069c0f0 · 319 bytes · __thiscall

_ZN12CFilterEnemy21PassesProximityFilterEP11CBaseEntityS1_

Decompiled

undefined (3 params)

/* CFilterEnemy::PassesProximityFilter(CBaseEntity*, CBaseEntity*) */

CFilterEnemy __thiscall
CFilterEnemy::PassesProximityFilter(CFilterEnemy *this,CBaseEntity *param_1,CBaseEntity *param_2)

{
  float fVar1;
  CBaseEntity CVar2;
  CFilterEnemy CVar3;
  CBaseEntity *pCVar4;
  float fVar5;
  float fVar6;
  
  if (*(float *)(this + 0x478) <= 0.0) {
    return (CFilterEnemy)0x1;
  }
  pCVar4 = (CBaseEntity *)(**(code **)(*(int *)param_1 + 0x1a4))(param_1);
  if (((byte)param_2[0x14d] & 8) == 0) {
    CVar2 = param_1[0x14d];
  }
  else {
    CBaseEntity::CalcAbsolutePosition(param_2);
    CVar2 = param_1[0x14d];
  }
  if (((byte)CVar2 & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition(param_1);
  }
  CVar3 = this[0x440];
  fVar6 = *(float *)(this + 0x47c);
  fVar1 = *(float *)(this + 0x478);
  if (fVar6 == 0.0) {
    if (CVar3 == (CFilterEnemy)0x0) {
      fVar6 = fVar1 + fVar1;
    }
    else {
      fVar6 = fVar1 * 0.5;
    }
  }
  fVar5 = fVar1;
  if (fVar1 <= fVar6) {
    fVar5 = fVar6;
    fVar6 = fVar1;
  }
  if (pCVar4 == param_2) {
    if (CVar3 == (CFilterEnemy)0x0) goto LAB_0069c1c1;
  }
  else if (CVar3 != (CFilterEnemy)0x0) goto LAB_0069c1c1;
  fVar5 = fVar6;
LAB_0069c1c1:
  if ((*(float *)(param_1 + 0x2e0) - *(float *)(param_2 + 0x2e0)) *
      (*(float *)(param_1 + 0x2e0) - *(float *)(param_2 + 0x2e0)) +
      (*(float *)(param_1 + 0x2e4) - *(float *)(param_2 + 0x2e4)) *
      (*(float *)(param_1 + 0x2e4) - *(float *)(param_2 + 0x2e4)) +
      (*(float *)(param_1 + 0x2e8) - *(float *)(param_2 + 0x2e8)) *
      (*(float *)(param_1 + 0x2e8) - *(float *)(param_2 + 0x2e8)) <= fVar5 * fVar5) {
    CVar3 = (CFilterEnemy)((byte)CVar3 ^ 1);
  }
  return CVar3;
}

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)