L L4D2node

CTerrorPlayer::SetPushEntity

0x009ae340 · 319 bytes · __thiscall

_ZN13CTerrorPlayer13SetPushEntityEP11CBaseEntity

Decompiled

undefined (2 params)

/* CTerrorPlayer::SetPushEntity(CBaseEntity*) */

void __thiscall CTerrorPlayer::SetPushEntity(CTerrorPlayer *this,CBaseEntity *param_1)

{
  CBaseEdict *pCVar1;
  undefined *puVar2;
  uint uVar3;
  undefined *puVar4;
  int iVar5;
  int iVar6;
  uint local_20 [4];
  
  CHandle<CBaseEntity>::CHandle((CHandle<CBaseEntity> *)local_20,param_1);
  puVar4 = g_pEntityList;
  if (((local_20[0] == 0xffffffff) ||
      (puVar2 = g_pEntityList + (local_20[0] & 0xfff) * 0x10, puVar2 == (undefined *)0xfffffffc)) ||
     (*(uint *)(puVar2 + 8) != local_20[0] >> 0xc)) {
    iVar5 = 0;
  }
  else {
    iVar5 = *(int *)(puVar2 + 4);
  }
  uVar3 = *(uint *)(this + 0x33ac);
  if (uVar3 != 0xffffffff) {
    puVar2 = g_pEntityList + (uVar3 & 0xfff) * 0x10;
    if ((puVar2 != (undefined *)0xfffffffc) && (*(uint *)(puVar2 + 8) == uVar3 >> 0xc)) {
      iVar6 = *(int *)(puVar2 + 4);
      goto LAB_009ae3b8;
    }
  }
  iVar6 = 0;
LAB_009ae3b8:
  if (iVar5 != iVar6) {
    if (this[0x6c] == (CTerrorPlayer)0x0) {
      pCVar1 = *(CBaseEdict **)(this + 0x30);
      if (pCVar1 != (CBaseEdict *)0x0) {
        *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
        iVar5 = CBaseEdict::GetChangeAccessor(pCVar1);
        *(undefined2 *)(iVar5 + 2) = 0;
        puVar4 = g_pEntityList;
      }
    }
    else {
      this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
    }
    *(uint *)(this + 0x33ac) = local_20[0];
    uVar3 = local_20[0];
  }
  if (((uVar3 != 0xffffffff) &&
      (puVar4 = puVar4 + (uVar3 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
     ((*(uint *)(puVar4 + 8) == uVar3 >> 0xc &&
      ((*(int *)(puVar4 + 4) != 0 && (*(float *)(this + 0x33b0) != 32.0)))))) {
    if (this[0x6c] == (CTerrorPlayer)0x0) {
      pCVar1 = *(CBaseEdict **)(this + 0x30);
      if (pCVar1 != (CBaseEdict *)0x0) {
        *(uint *)pCVar1 = *(uint *)pCVar1 | 0x101;
        iVar5 = CBaseEdict::GetChangeAccessor(pCVar1);
        *(undefined2 *)(iVar5 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CTerrorPlayer)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x33b0) = 0x42000000;
    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)