L L4D2node

SurvivorLegsStayClose::OnNavAreaChanged

0x0095bd90 · 369 bytes · __thiscall

_ZN21SurvivorLegsStayClose16OnNavAreaChangedEP11SurvivorBotP8CNavAreaS3_

Decompiled

undefined (4 params)

/* SurvivorLegsStayClose::OnNavAreaChanged(SurvivorBot*, CNavArea*, CNavArea*) */

SurvivorLegsStayClose * __thiscall
SurvivorLegsStayClose::OnNavAreaChanged
          (SurvivorLegsStayClose *this,SurvivorBot *param_1,CNavArea *param_2,CNavArea *param_3)

{
  char cVar1;
  undefined4 uVar2;
  longdouble lVar3;
  float fVar4;
  
  if (param_3 != (CNavArea *)0x0) {
    if ((*(uint *)(param_3 + 300) & 0x880) == 0) {
      cVar1 = INextBot::IsDebugging((INextBot *)(param_2 + 0x4028),1);
      fVar4 = *(float *)(param_1 + 0x38);
      if ((cVar1 != '\0') && (0.0 < fVar4)) {
        uVar2 = (**(code **)(*(int *)param_2 + 0x9b8))(param_2);
        DevMsg("%3.2f: %s left a checkpoint\n",(double)*(float *)(gpGlobals + 0xc),uVar2);
        fVar4 = *(float *)(param_1 + 0x38);
      }
      if (fVar4 != -1.0) {
        (**(code **)(*(int *)(param_1 + 0x34) + 4))(param_1 + 0x34,param_1 + 0x38);
        *(undefined4 *)(param_1 + 0x38) = 0xbf800000;
      }
    }
    else if (*(float *)(param_1 + 0x38) <= 0.0) {
      lVar3 = (longdouble)IntervalTimer::Now();
      if ((float)lVar3 != *(float *)(param_1 + 0x38)) {
        (**(code **)(*(int *)(param_1 + 0x34) + 4))(param_1 + 0x34,param_1 + 0x38);
        *(float *)(param_1 + 0x38) = (float)lVar3;
      }
      cVar1 = INextBot::IsDebugging((INextBot *)(param_2 + 0x4028),1);
      if (cVar1 != '\0') {
        uVar2 = (**(code **)(*(int *)param_2 + 0x9b8))(param_2);
        DevMsg("%3.2f: %s entered a checkpoint\n",(double)*(float *)(gpGlobals + 0xc),uVar2);
      }
    }
  }
  *(undefined4 *)this = 0;
  *(undefined4 *)(this + 4) = 0;
  *(undefined4 *)(this + 8) = 0;
  *(undefined4 *)(this + 0xc) = 1;
  return this;
}

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)