L L4D2node

SurvivorElevatorRide::Update

0x00921090 · 256 bytes · __thiscall

_ZN20SurvivorElevatorRide6UpdateEP11SurvivorBotf

Decompiled

undefined (3 params)

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

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

{
  char cVar1;
  int iVar2;
  int local_28;
  undefined4 local_24;
  undefined4 local_20;
  
  iVar2 = CTerrorPlayer::GetMovingPlatform((CTerrorPlayer *)param_2);
  if (iVar2 == 0) {
    *(undefined4 *)this = 3;
    *(undefined4 *)(this + 4) = 0;
    *(char **)(this + 8) = "No longer on an elevator";
    return this;
  }
  cVar1 = CTerrorPlayer::IsOnMovingPlatformInMotion((CTerrorPlayer *)param_2);
  if (cVar1 != '\0') {
    SurvivorBot::SaveFriendsInImmediateTrouble((Action *)&local_28);
    if (((2 < local_28 - 1U) &&
        (SurvivorBot::UseHealingItems((Action *)&local_28), 2 < local_28 - 1U)) &&
       (SurvivorBot::RescueImmobilizedFriends((Action *)&local_28), 2 < local_28 - 1U)) {
      *(undefined4 *)this = 0;
      *(undefined4 *)(this + 4) = 0;
      *(undefined4 *)(this + 8) = 0;
      return this;
    }
    *(int *)this = local_28;
    *(undefined4 *)(this + 4) = local_24;
    *(undefined4 *)(this + 8) = local_20;
    return this;
  }
  *(undefined4 *)this = 3;
  *(undefined4 *)(this + 4) = 0;
  *(char **)(this + 8) = "The elevator stopped at its destination";
  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)