L L4D2node

SurvivorBot::IsBehind

0x00938850 · 166 bytes · __thiscall

_ZNK11SurvivorBot8IsBehindEP13CTerrorPlayer

Decompiled

undefined (2 params)

/* SurvivorBot::IsBehind(CTerrorPlayer*) const */

bool __thiscall SurvivorBot::IsBehind(SurvivorBot *this,CTerrorPlayer *param_1)

{
  bool bVar1;
  int iVar2;
  int iVar3;
  
  iVar2 = (**(code **)(*(int *)this + 0x52c))(this);
  iVar3 = (**(code **)(*(int *)param_1 + 0x52c))(param_1);
  if (iVar2 == 0 || iVar3 == 0) {
    return false;
  }
  if (iVar2 != iVar3) {
    if (*(float *)(iVar2 + 0x154) < *(float *)(iVar3 + 0x154)) {
      bVar1 = true;
    }
    else {
      bVar1 = false;
      if (*(float *)(iVar2 + 0x154) == *(float *)(iVar3 + 0x154)) goto LAB_009388a5;
    }
    return bVar1;
  }
LAB_009388a5:
  if (*(int *)(this + 0x30) == 0) {
    iVar2 = 0;
  }
  else {
    iVar2 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
  }
  if (*(int *)(param_1 + 0x30) == 0) {
    iVar3 = 0;
  }
  else {
    iVar3 = *(int *)(param_1 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
  }
  return iVar2 < iVar3;
}

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)