L L4D2node

PathFollower::IsDiscontinuityAhead

0x00762850 · 223 bytes · __thiscall

_ZNK12PathFollower20IsDiscontinuityAheadEP8INextBotN4Path11SegmentTypeEf

Decompiled

undefined (4 params)

/* PathFollower::IsDiscontinuityAhead(INextBot*, Path::SegmentType, float) const */

undefined4 __thiscall
PathFollower::IsDiscontinuityAhead(PathFollower *this,int *param_1,int param_3,float param_4)

{
  int iVar1;
  int *piVar2;
  float *pfVar3;
  float fVar4;
  float fVar5;
  float fVar6;
  
  if (*(int *)(this + 0x4758) != 0) {
    iVar1 = (**(code **)(*(int *)this + 0x5c))(this,*(int *)(this + 0x4758));
    if ((iVar1 != 0) && (*(int *)(iVar1 + 0x18) == param_3)) {
      return 1;
    }
    piVar2 = (int *)(**(code **)(*param_1 + 0xc0))(param_1);
    pfVar3 = (float *)(**(code **)(*piVar2 + 300))(piVar2);
    iVar1 = *(int *)(this + 0x4758);
    fVar6 = *(float *)(iVar1 + 8) - *pfVar3;
    fVar4 = *(float *)(iVar1 + 0xc) - pfVar3[1];
    fVar5 = *(float *)(iVar1 + 0x10) - pfVar3[2];
    fVar4 = SQRT(fVar4 * fVar4 + fVar6 * fVar6 + fVar5 * fVar5);
    do {
      if (param_4 <= fVar4) {
        return 0;
      }
      if (param_3 == *(int *)(iVar1 + 0x18)) {
        return 1;
      }
      fVar4 = fVar4 + *(float *)(iVar1 + 0x28);
      iVar1 = (**(code **)(*(int *)this + 0x58))(this,iVar1);
    } while (iVar1 != 0);
  }
  return 0;
}

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)