L L4D2node

CNavLadder::ConnectTo

0x007326b0 · 183 bytes · __thiscall

_ZN10CNavLadder9ConnectToEP8CNavArea

Decompiled

undefined (2 params)

/* CNavLadder::ConnectTo(CNavArea*) */

void __thiscall CNavLadder::ConnectTo(CNavLadder *this,CNavArea *param_1)

{
  uint uVar1;
  uint uVar2;
  
  if (*(float *)(param_1 + 0x34) <= (*(float *)(this + 0x18) + *(float *)(this + 0xc)) * 0.5) {
    *(CNavArea **)(this + 0x34) = param_1;
    return;
  }
  if (ABS(*(float *)(param_1 + 0x30) - *(float *)(this + 8)) <
      ABS(*(float *)(param_1 + 0x2c) - *(float *)(this + 4))) {
    uVar2 = *(uint *)(this + 0x3c);
    uVar1 = (uint)(*(float *)(param_1 + 0x2c) - *(float *)(this + 4) <= 0.0) * 2 + 1;
    if (uVar2 == uVar1) goto LAB_00732757;
  }
  else {
    uVar2 = *(uint *)(this + 0x3c);
    uVar1 = (uint)(0.0 < *(float *)(param_1 + 0x30) - *(float *)(this + 8)) * 2;
    if (uVar2 == uVar1) {
LAB_00732757:
      *(CNavArea **)(this + 0x30) = param_1;
      return;
    }
  }
  if (uVar2 < 4) {
    if (uVar1 == *(uint *)(CSWTCH_1176 + uVar2 * 4)) {
LAB_00732768:
      *(CNavArea **)(this + 0x24) = param_1;
      return;
    }
    if (uVar1 == *(uint *)(CSWTCH_1178 + uVar2 * 4)) {
      *(CNavArea **)(this + 0x28) = param_1;
      return;
    }
  }
  else if (uVar1 == 0) goto LAB_00732768;
  *(CNavArea **)(this + 0x2c) = param_1;
  return;
}

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)