L L4D2node

CFuncTrackChange::UpdateAutoTargets

0x00b0a3b0 · 301 bytes · __thiscall

_ZN16CFuncTrackChange17UpdateAutoTargetsEi

Decompiled

undefined (2 params)

/* CFuncTrackChange::UpdateAutoTargets(int) */

void __thiscall CFuncTrackChange::UpdateAutoTargets(CFuncTrackChange *this,int param_1)

{
  char cVar1;
  CBaseEdict *pCVar2;
  int iVar3;
  int iVar4;
  uint uVar5;
  
  iVar4 = *(int *)(this + 0x4ec);
  if (iVar4 == 0) {
    return;
  }
  iVar3 = *(int *)(this + 0x4f0);
  if (iVar3 == 0) {
    return;
  }
  uVar5 = *(uint *)(iVar4 + 0x148);
  if (param_1 == 0) {
    if (uVar5 != (uVar5 & 0xfffffffe)) {
      if (*(char *)(iVar4 + 0x6c) == '\0') {
        pCVar2 = *(CBaseEdict **)(iVar4 + 0x30);
        if (pCVar2 != (CBaseEdict *)0x0) {
          *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
          iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
          *(undefined2 *)(iVar3 + 2) = 0;
        }
      }
      else {
        *(byte *)(iVar4 + 0x70) = *(byte *)(iVar4 + 0x70) | 1;
      }
      *(uint *)(iVar4 + 0x148) = uVar5 & 0xfffffffe;
      iVar3 = *(int *)(this + 0x4f0);
    }
  }
  else {
    if (uVar5 != (uVar5 | 1)) {
      if (*(char *)(iVar4 + 0x6c) == '\0') {
        pCVar2 = *(CBaseEdict **)(iVar4 + 0x30);
        if (pCVar2 != (CBaseEdict *)0x0) {
          *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
          iVar3 = CBaseEdict::GetChangeAccessor(pCVar2);
          *(undefined2 *)(iVar3 + 2) = 0;
        }
      }
      else {
        *(byte *)(iVar4 + 0x70) = *(byte *)(iVar4 + 0x70) | 1;
      }
      *(uint *)(iVar4 + 0x148) = uVar5 | 1;
      iVar3 = *(int *)(this + 0x4f0);
    }
    if (param_1 == 1) {
      uVar5 = *(uint *)(iVar3 + 0x148) & 0xfffffffe;
      if (*(uint *)(iVar3 + 0x148) == uVar5) {
        return;
      }
      cVar1 = *(char *)(iVar3 + 0x6c);
      goto joined_r0x00b0a4c7;
    }
  }
  uVar5 = *(uint *)(iVar3 + 0x148) | 1;
  if (*(uint *)(iVar3 + 0x148) == uVar5) {
    return;
  }
  cVar1 = *(char *)(iVar3 + 0x6c);
joined_r0x00b0a4c7:
  if (cVar1 == '\0') {
    pCVar2 = *(CBaseEdict **)(iVar3 + 0x30);
    if (pCVar2 != (CBaseEdict *)0x0) {
      *(uint *)pCVar2 = *(uint *)pCVar2 | 0x101;
      iVar4 = CBaseEdict::GetChangeAccessor(pCVar2);
      *(undefined2 *)(iVar4 + 2) = 0;
    }
  }
  else {
    *(byte *)(iVar3 + 0x70) = *(byte *)(iVar3 + 0x70) | 1;
  }
  *(uint *)(iVar3 + 0x148) = uVar5;
  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)