L L4D2node

BoomerVomitOnVictim::Update

0x00a75540 · 881 bytes · __thiscall

_ZN19BoomerVomitOnVictim6UpdateEP6Boomerf

Decompiled

undefined (3 params)

/* BoomerVomitOnVictim::Update(Boomer*, float) */

BoomerVomitOnVictim * __thiscall
BoomerVomitOnVictim::Update(BoomerVomitOnVictim *this,Boomer *param_1,float param_2)

{
  uint uVar1;
  code *pcVar2;
  char cVar3;
  int *piVar4;
  int *piVar5;
  int iVar6;
  undefined4 uVar7;
  undefined *puVar8;
  longdouble lVar9;
  undefined4 local_30;
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  
  uVar1 = *(uint *)(param_1 + 0x34);
  if ((((uVar1 == 0xffffffff) ||
       (puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 == (undefined *)0xfffffffc)) ||
      (*(uint *)(puVar8 + 8) != uVar1 >> 0xc)) ||
     ((piVar5 = *(int **)(puVar8 + 4), piVar5 == (int *)0x0 ||
      (cVar3 = (**(code **)(*piVar5 + 300))(piVar5), cVar3 == '\0')))) {
    *(undefined4 *)this = 3;
    *(undefined4 *)(this + 4) = 0;
    *(char **)(this + 8) = "No victim";
    return this;
  }
  uVar1 = *(uint *)((int)param_2 + 0x30bc);
  if (((uVar1 == 0xffffffff) ||
      ((puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 == (undefined *)0xfffffffc ||
       (*(uint *)(puVar8 + 8) != uVar1 >> 0xc)))) ||
     (piVar5 = *(int **)(puVar8 + 4), piVar5 == (int *)0x0)) {
    *(undefined4 *)this = 3;
    *(undefined4 *)(this + 4) = 0;
    *(char **)(this + 8) = "No vomit ability!";
    return this;
  }
  piVar4 = (int *)(**(code **)(*(int *)param_2 + 0x9b4))(param_2);
  uVar7 = 0;
  uVar1 = *(uint *)(param_1 + 0x34);
  if (uVar1 != 0xffffffff) {
    puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10;
    if ((puVar8 == (undefined *)0xfffffffc) || (*(uint *)(puVar8 + 8) != uVar1 >> 0xc)) {
      uVar7 = 0;
    }
    else {
      uVar7 = *(undefined4 *)(puVar8 + 4);
    }
  }
  (**(code **)(*piVar4 + 0xc4))(piVar4,uVar7,2,0x3f800000,0,"Aiming vomit at victim",1,0x3e800000);
  lVar9 = (longdouble)CountdownTimer::Now();
  if (*(float *)(param_1 + 0x40) <= (float)lVar9) {
    if (param_1[0x44] == (Boomer)0x0) {
      uVar7 = 0;
      uVar1 = *(uint *)(param_1 + 0x34);
      if (((uVar1 != 0xffffffff) &&
          (puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
         (*(uint *)(puVar8 + 8) == uVar1 >> 0xc)) {
        uVar7 = *(undefined4 *)(puVar8 + 4);
      }
      cVar3 = (**(code **)(*(int *)((int)param_2 + 0x4028) + 0x11c))
                        ((int)param_2 + 0x4028,uVar7,*(undefined4 *)(ZombieVomitRange._28_4_ + 0x2c)
                        );
      if (cVar3 == '\0') {
        piVar4 = (int *)(**(code **)(*(int *)param_2 + 0x9bc))(param_2);
        local_30 = 0;
        uVar1 = *(uint *)(param_1 + 0x34);
        if (((uVar1 != 0xffffffff) &&
            (puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
           (*(uint *)(puVar8 + 8) == uVar1 >> 0xc)) {
          local_30 = *(undefined4 *)(puVar8 + 4);
        }
        cVar3 = (**(code **)(*piVar4 + 0xd0))(piVar4,local_30,1,0);
        if (cVar3 != '\0') {
          cVar3 = (**(code **)(*piVar5 + 0x32c))(piVar5);
          if (cVar3 != '\0') {
            piVar5 = (int *)(**(code **)(*(int *)param_2 + 0x9bc))(param_2);
            pcVar2 = *(code **)(*piVar5 + 0xfc);
            iVar6 = (**(code **)(*(int *)param_2 + 0x9b4))(param_2);
            local_28 = *(undefined4 *)(iVar6 + 0x50);
            local_24 = *(undefined4 *)(iVar6 + 0x54);
            local_20 = *(undefined4 *)(iVar6 + 0x58);
                    /* try { // try from 00a75840 to 00a75841 has its CatchHandler @ 00a758d3 */
            cVar3 = (*pcVar2)(piVar5,&local_28,0x3f733333);
            if (cVar3 != '\0') {
              (**(code **)(*(int *)param_2 + 0x938))(param_2,0xbf800000);
              param_1[0x44] = (Boomer)0x1;
            }
          }
          goto LAB_00a75868;
        }
      }
      *(undefined4 *)this = 3;
      *(undefined4 *)(this + 4) = 0;
      *(char **)(this + 8) = "Lost my vomit target";
      return this;
    }
    cVar3 = (**(code **)(*piVar5 + 0x354))(piVar5);
    if (cVar3 == '\0') {
      *(undefined4 *)this = 3;
      *(undefined4 *)(this + 4) = 0;
      *(char **)(this + 8) = "Vomit completed";
      return this;
    }
  }
LAB_00a75868:
  *(undefined4 *)this = 0;
  *(undefined4 *)(this + 4) = 0;
  *(undefined4 *)(this + 8) = 0;
  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)