L L4D2node

SurvivorLegsMoveToVantagePoint::Update

0x00961930 · 360 bytes · __thiscall

_ZN30SurvivorLegsMoveToVantagePoint6UpdateEP11SurvivorBotf

Decompiled

undefined (3 params)

/* SurvivorLegsMoveToVantagePoint::Update(SurvivorBot*, float) */

SurvivorLegsMoveToVantagePoint * __thiscall
SurvivorLegsMoveToVantagePoint::Update
          (SurvivorLegsMoveToVantagePoint *this,SurvivorBot *param_1,float param_2)

{
  uint uVar1;
  char cVar2;
  int *piVar3;
  undefined *puVar4;
  undefined4 uVar5;
  
  uVar1 = *(uint *)(param_1 + 0x34);
  if ((((uVar1 == 0xffffffff) ||
       (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
      (*(uint *)(puVar4 + 8) != uVar1 >> 0xc)) ||
     ((piVar3 = *(int **)(puVar4 + 4), piVar3 == (int *)0x0 ||
      (cVar2 = (**(code **)(*piVar3 + 300))(piVar3), cVar2 == '\0')))) {
    *(undefined4 *)this = 3;
    *(undefined4 *)(this + 4) = 0;
    *(char **)(this + 8) = "Subject is dead or gone";
    return this;
  }
  piVar3 = (int *)(**(code **)(*(int *)param_2 + 0x9ac))(param_2);
  uVar1 = *(uint *)(param_1 + 0x34);
  uVar5 = 0;
  if ((uVar1 != 0xffffffff) &&
     ((puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc &&
      (*(uint *)(puVar4 + 8) == uVar1 >> 0xc)))) {
    uVar5 = *(undefined4 *)(puVar4 + 4);
  }
  cVar2 = (**(code **)(*piVar3 + 0xd0))(piVar3,uVar5,1,0);
  if (cVar2 == '\0') {
    cVar2 = UpdatePath((SurvivorLegsMoveToVantagePoint *)param_1,(SurvivorBot *)param_2);
    if (cVar2 != '\0') {
      PathFollower::Update((PathFollower *)(param_1 + 0x38),(INextBot *)((int)param_2 + 0x4028));
      *(undefined4 *)this = 0;
      *(undefined4 *)(this + 4) = 0;
      *(undefined4 *)(this + 8) = 0;
      return this;
    }
    *(undefined4 *)this = 3;
    *(undefined4 *)(this + 4) = 0;
    *(char **)(this + 8) = "I can\'t reach any vantage point";
    return this;
  }
  *(undefined4 *)this = 3;
  *(undefined4 *)(this + 4) = 0;
  *(char **)(this + 8) = "Our subject is visible from here";
  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)