L L4D2node

SmokerTongueVictim::Update

0x00aca500 · 573 bytes · __thiscall

_ZN18SmokerTongueVictim6UpdateEP6Smokerf

Decompiled

undefined (3 params)

/* SmokerTongueVictim::Update(Smoker*, float) */

SmokerTongueVictim * __thiscall
SmokerTongueVictim::Update(SmokerTongueVictim *this,Smoker *param_1,float param_2)

{
  uint uVar1;
  int *piVar2;
  char cVar3;
  int *piVar4;
  undefined4 uVar5;
  undefined *puVar6;
  longdouble lVar7;
  
  uVar1 = *(uint *)(param_1 + 0x34);
  if ((((uVar1 == 0xffffffff) ||
       (puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 == (undefined *)0xfffffffc)) ||
      (*(uint *)(puVar6 + 8) != uVar1 >> 0xc)) ||
     ((piVar2 = *(int **)(puVar6 + 4), piVar2 == (int *)0x0 ||
      (cVar3 = (**(code **)(*piVar2 + 300))(piVar2), 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) &&
      ((puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc &&
       (*(uint *)(puVar6 + 8) == uVar1 >> 0xc)))) &&
     (piVar2 = *(int **)(puVar6 + 4), piVar2 != (int *)0x0)) {
    piVar4 = (int *)(**(code **)(*(int *)param_2 + 0x9b4))(param_2);
    uVar5 = 0;
    uVar1 = *(uint *)(param_1 + 0x34);
    if (uVar1 != 0xffffffff) {
      puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10;
      if ((puVar6 == (undefined *)0xfffffffc) || (*(uint *)(puVar6 + 8) != uVar1 >> 0xc)) {
        uVar5 = 0;
      }
      else {
        uVar5 = *(undefined4 *)(puVar6 + 4);
      }
    }
    (**(code **)(*piVar4 + 0xc4))(piVar4,uVar5,2,0x3f800000,0,"Aiming at victim",1,0x3e800000);
    lVar7 = (longdouble)CountdownTimer::Now();
    if (*(float *)(param_1 + 0x40) <= (float)lVar7) {
      if (param_1[0x44] == (Smoker)0x0) {
        cVar3 = (**(code **)(*piVar2 + 0x33c))(piVar2);
        if (cVar3 == '\0') {
          *(undefined4 *)this = 3;
          *(undefined4 *)(this + 4) = 0;
          *(char **)(this + 8) = "Lost my target";
          return this;
        }
        cVar3 = (**(code **)(*piVar2 + 0x32c))(piVar2);
        if ((cVar3 != '\0') && (cVar3 = (**(code **)(*piVar2 + 0x33c))(piVar2), cVar3 != '\0')) {
          (**(code **)(*(int *)param_2 + 0x938))(param_2,0xbf800000);
          param_1[0x44] = (Smoker)0x1;
        }
      }
      else {
        cVar3 = (**(code **)(*piVar2 + 0x354))(piVar2);
        if (cVar3 == '\0') {
          *(undefined4 *)this = 3;
          *(undefined4 *)(this + 4) = 0;
          *(char **)(this + 8) = "Tongue completed";
          return this;
        }
      }
    }
    *(undefined4 *)this = 0;
    *(undefined4 *)(this + 4) = 0;
    *(undefined4 *)(this + 8) = 0;
    return this;
  }
  *(undefined4 *)this = 3;
  *(undefined4 *)(this + 4) = 0;
  *(char **)(this + 8) = "No ability!";
  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)