L L4D2node

ChargerReturnToNavMesh::Update

0x00a889a0 · 277 bytes · __thiscall

_ZN22ChargerReturnToNavMesh6UpdateEP7Chargerf

Decompiled

undefined (3 params)

/* ChargerReturnToNavMesh::Update(Charger*, float) */

ChargerReturnToNavMesh * __thiscall
ChargerReturnToNavMesh::Update(ChargerReturnToNavMesh *this,Charger *param_1,float param_2)

{
  char cVar1;
  CNavArea *this_00;
  int *piVar2;
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  
  this_00 = (CNavArea *)(**(code **)(*(int *)param_2 + 0x52c))(param_2);
  if (this_00 != (CNavArea *)0x0) {
    if ((*(byte *)((int)param_2 + 0x14d) & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_2);
    }
    cVar1 = CNavArea::Contains(this_00,(Vector *)((int)param_2 + 0x2e0));
    if (cVar1 != '\0') {
      *(undefined4 *)this = 3;
      *(undefined4 *)(this + 4) = 0;
      *(undefined4 *)(this + 8) = 0;
      return this;
    }
    local_28 = *(undefined4 *)(this_00 + 0x2c);
    local_24 = *(undefined4 *)(this_00 + 0x30);
    local_20 = *(undefined4 *)(this_00 + 0x34);
    piVar2 = (int *)(**(code **)(*(int *)param_2 + 0x9b4))(param_2);
    (**(code **)(*piVar2 + 0xc0))(piVar2,&local_28,2,0,0,0,1,0x3e800000);
    piVar2 = (int *)(**(code **)(*(int *)param_2 + 0x9b0))(param_2);
    (**(code **)(*piVar2 + 0xb4))(piVar2,&local_28,0x3f800000);
  }
  *(undefined4 *)this = 0;
  *(undefined4 *)(this + 4) = 0;
  *(undefined4 *)(this + 8) = 0;
  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)