L L4D2node

CFuncElevator::GetDestinationFloor

0x006bd5b0 · 107 bytes · __thiscall

_ZNK13CFuncElevator19GetDestinationFloorEv

Decompiled

undefined (1 param)

/* CFuncElevator::GetDestinationFloor() const */

void __thiscall CFuncElevator::GetDestinationFloor(CFuncElevator *this)

{
  int iVar1;
  int iVar2;
  
  if (*(float *)(this + 0x500) != 0.0) {
    if (0 < *(int *)(this + 0x54c)) {
      iVar2 = 0;
      iVar1 = 0;
      do {
        if (ABS(*(float *)(this + 0x4f8) - *(float *)(*(int *)(this + 0x540) + iVar2)) < 0.5) {
          return;
        }
        iVar1 = iVar1 + 1;
        iVar2 = iVar2 + 0xc;
      } while (iVar1 != *(int *)(this + 0x54c));
    }
  }
  GetCurrentFloor(this);
  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)