L L4D2node

RecognizedActor::UpdateVisible

0x0094a910 · 774 bytes · __thiscall

_ZN15RecognizedActor13UpdateVisibleEv

Decompiled

undefined (1 param)

/* RecognizedActor::UpdateVisible() */

void __thiscall RecognizedActor::UpdateVisible(RecognizedActor *this)

{
  float fVar1;
  float fVar2;
  uint uVar3;
  code *pcVar4;
  char cVar5;
  int iVar6;
  float *pfVar7;
  undefined4 uVar8;
  undefined4 *puVar9;
  undefined *puVar10;
  int *piVar11;
  int *piVar12;
  CBaseEntity *this_00;
  longdouble lVar13;
  float local_28;
  float local_24;
  float local_20;
  
  piVar12 = (int *)&stack0xffffffc4;
  uVar3 = *(uint *)this;
  if ((((uVar3 != 0xffffffff) &&
       (puVar10 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar10 + 8) == uVar3 >> 0xc)) &&
     (*(CBaseEntity **)(puVar10 + 4) != (CBaseEntity *)0x0)) {
    iVar6 = CBaseEntity::GetGroundEntity(*(CBaseEntity **)(puVar10 + 4));
    if (iVar6 != 0) {
      uVar3 = *(uint *)this;
      piVar11 = (int *)0x0;
      if (((uVar3 != 0xffffffff) &&
          (puVar10 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc)) &&
         (*(uint *)(puVar10 + 8) == uVar3 >> 0xc)) {
        piVar11 = *(int **)(puVar10 + 4);
      }
      (**(code **)(*piVar11 + 0x234))();
      uVar3 = *(uint *)this;
      piVar11 = (int *)0x0;
      piVar12 = (int *)&stack0xffffffc0;
      if (((uVar3 != 0xffffffff) &&
          (puVar10 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc)) &&
         (*(uint *)(puVar10 + 8) == uVar3 >> 0xc)) {
        piVar11 = *(int **)(puVar10 + 4);
      }
      pfVar7 = (float *)(**(code **)(*piVar11 + 0x288))();
      puVar10 = g_pEntityList;
      piVar11 = (int *)0x0;
      fVar1 = pfVar7[2];
      fVar2 = *pfVar7;
      uVar3 = *(uint *)this;
      *(float *)(this + 8) = (local_24 + pfVar7[1]) * 0.5;
      *(float *)(this + 0xc) = (local_20 + fVar1) * 0.5;
      *(float *)(this + 4) = (local_28 + fVar2) * 0.5;
      if (((uVar3 != 0xffffffff) &&
          (puVar10 = puVar10 + (uVar3 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc)) &&
         (*(uint *)(puVar10 + 8) == uVar3 >> 0xc)) {
        piVar11 = *(int **)(puVar10 + 4);
      }
      cVar5 = (**(code **)(*piVar11 + 0x16c))();
      if (cVar5 != '\0') {
        uVar3 = *(uint *)this;
        if (((uVar3 == 0xffffffff) ||
            (puVar10 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar10 == (undefined *)0xfffffffc))
           || ((*(uint *)(puVar10 + 8) != uVar3 >> 0xc ||
               ((this_00 = *(CBaseEntity **)(puVar10 + 4), this_00 == (CBaseEntity *)0x0 ||
                (cVar5 = (**(code **)(*(int *)this_00 + 0x16c))(), cVar5 == '\0')))))) {
          this_00 = (CBaseEntity *)0x0;
        }
        iVar6 = CBaseEntity::GetTeamNumber(this_00);
        if (((iVar6 == 3) && (iVar6 = (**(code **)(*(int *)this_00 + 0x544))(), iVar6 == 3)) &&
           ((this_00[0x1a90] != (CBaseEntity)0x0 ||
            ((((uVar3 = *(uint *)(this_00 + 0x3e64), uVar3 != 0xffffffff &&
               (puVar10 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc
               )) && (*(uint *)(puVar10 + 8) == uVar3 >> 0xc)) && (*(int *)(puVar10 + 4) != 0))))))
        {
          uVar3 = *(uint *)this;
          piVar11 = (int *)0x0;
          if (((uVar3 != 0xffffffff) &&
              (puVar10 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc)
              ) && (*(uint *)(puVar10 + 8) == uVar3 >> 0xc)) {
            piVar11 = *(int **)(puVar10 + 4);
          }
          puVar9 = (undefined4 *)(**(code **)(*piVar11 + 0x288))();
          *(undefined4 *)(this + 4) = *puVar9;
          *(undefined4 *)(this + 8) = puVar9[1];
          *(undefined4 *)(this + 0xc) = puVar9[2];
        }
      }
      uVar3 = *(uint *)this;
      piVar11 = (int *)0x0;
      if (((uVar3 != 0xffffffff) &&
          (puVar10 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar10 != (undefined *)0xfffffffc)) &&
         (*(uint *)(puVar10 + 8) == uVar3 >> 0xc)) {
        piVar11 = *(int **)(puVar10 + 4);
      }
      uVar8 = (**(code **)(*piVar11 + 0x52c))();
      *(undefined4 *)(this + 0x10) = uVar8;
    }
    *piVar12 = (int)(this + 0x14);
    piVar12[-1] = 0x94aae7;
    lVar13 = (longdouble)IntervalTimer::Now();
    if ((float)lVar13 != *(float *)(this + 0x18)) {
      iVar6 = *(int *)(this + 0x14);
      *piVar12 = (int)(this + 0x14);
      piVar12[1] = (int)(this + 0x18);
      pcVar4 = *(code **)(iVar6 + 4);
      piVar12[-1] = 0x94ab05;
      (*pcVar4)();
      *(float *)(this + 0x18) = (float)lVar13;
    }
    this[0x28] = (RecognizedActor)0x1;
    return;
  }
  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)