L L4D2node

NextBotManager::OnCharacterVomitedUpon

0x007590a0 · 279 bytes · __thiscall

_ZN14NextBotManager22OnCharacterVomitedUponEP20CBaseCombatCharacter

Decompiled

undefined (2 params)

/* NextBotManager::OnCharacterVomitedUpon(CBaseCombatCharacter*) */

void __thiscall
NextBotManager::OnCharacterVomitedUpon(NextBotManager *this,CBaseCombatCharacter *param_1)

{
  char cVar1;
  uint uVar2;
  int iVar3;
  int iVar4;
  longdouble lVar5;
  CBaseCombatCharacter *local_28;
  int local_24;
  undefined4 local_20;
  
  iVar3 = 0;
  if (param_1 != (CBaseCombatCharacter *)0x0) {
    local_28 = param_1;
    uVar2 = (uint)*(ushort *)(this + 0x10);
    local_24 = 0;
    local_20 = *(undefined4 *)(ZombieNoticeItRange._28_4_ + 0x2c);
    if (uVar2 != 0xffff) {
      iVar4 = *(int *)(this + 4);
      do {
        cVar1 = NextBotAttackTheIT::operator()
                          ((NextBotAttackTheIT *)&local_28,*(INextBot **)(iVar4 + uVar2 * 8));
        iVar3 = local_24;
        if (cVar1 == '\0') break;
        iVar4 = *(int *)(this + 4);
        uVar2 = (uint)*(ushort *)(iVar4 + 6 + uVar2 * 8);
      } while (uVar2 != 0xffff);
    }
  }
  lVar5 = (longdouble)
          CDirector::GetScriptValue
                    (TheDirector,"MobMaxSize",
                     *(float *)(DirectorPrivate_DirectorMobMaxSize._28_4_ + 0x2c));
  iVar4 = (int)lVar5;
  if ((**(int **)(TheDirector + 0x638) - 2U < 3) || (**(char **)(TheDirector + 0x648) != '\0')) {
    iVar4 = CDirector::GetScriptValue(TheDirector,"BileMobSize",iVar4);
  }
  UTIL_LogPrintf("(MOB) %d wanderers grabbed for an IT mob of desired size %d.\n",iVar3,iVar4);
  if (iVar3 < iVar4) {
    ZombieManager::SpawnITMob(TheZombieManager,iVar4 - iVar3);
  }
  CDirector::OnMobRushStart(TheDirector);
  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)