L L4D2node

SurvivorAmbushBoomer::ShouldGiveUp

0x0092aaa0 · 243 bytes · __cdecl

_ZNK20SurvivorAmbushBoomer12ShouldGiveUpEP11SurvivorBot

Decompiled

undefined (1 param)

/* SurvivorAmbushBoomer::ShouldGiveUp(SurvivorBot*) const */

SurvivorBot SurvivorAmbushBoomer::ShouldGiveUp(SurvivorBot *param_1)

{
  uint uVar1;
  CBaseEntity *this;
  SurvivorBot SVar2;
  int iVar3;
  undefined *puVar4;
  longdouble extraout_ST0;
  
  SVar2 = param_1[0x68];
  if (SVar2 == (SurvivorBot)0x0) {
    uVar1 = *(uint *)(param_1 + 0x34);
    SVar2 = (SurvivorBot)0x1;
    if ((((uVar1 != 0xffffffff) &&
         (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
        (*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) &&
       (this = *(CBaseEntity **)(puVar4 + 4), this != (CBaseEntity *)0x0)) {
      if ((*(int *)(this + 0x338c) < *(int *)(this + 0x337c) + -1) ||
         ((((iVar3 = CBaseEntity::GetTeamNumber(this), iVar3 != 3 ||
            (iVar3 = (**(code **)(*(int *)this + 0x544))(this), iVar3 != 2)) &&
           ((iVar3 = CBaseEntity::GetTeamNumber(this), iVar3 != 3 ||
            (iVar3 = (**(code **)(*(int *)this + 0x544))(this), iVar3 != 1)))) &&
          ((iVar3 = CBaseEntity::GetTeamNumber(this), iVar3 != 3 ||
           (iVar3 = (**(code **)(*(int *)this + 0x544))(this), iVar3 != 3)))))) {
        CountdownTimer::Now();
        return (SurvivorBot)((float)extraout_ST0 < *(float *)(this + 0x32dc));
      }
      SVar2 = (SurvivorBot)0x1;
    }
  }
  return SVar2;
}

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)