L L4D2node

CTerrorPlayer::CanBeShoved

0x004f4d50 · 355 bytes · __thiscall

_ZN13CTerrorPlayer11CanBeShovedEv

Decompiled

undefined (1 param)

/* CTerrorPlayer::CanBeShoved() */

undefined4 __thiscall CTerrorPlayer::CanBeShoved(CTerrorPlayer *this)

{
  uint uVar1;
  char cVar2;
  int iVar3;
  undefined *puVar4;
  
  iVar3 = CBaseEntity::GetTeamNumber((CBaseEntity *)this);
  if ((((iVar3 != 3) || (iVar3 = (**(code **)(*(int *)this + 0x544))(this), iVar3 == 0)) &&
      (((((uVar1 = *(uint *)(this + 0x3e68), uVar1 != 0xffffffff &&
          (((puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc &&
            (*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar4 + 4) != 0)))) ||
         ((((uVar1 = *(uint *)(this + 0x3e48), uVar1 != 0xffffffff &&
            (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
           (*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar4 + 4) != 0)))) ||
        (((uVar1 = *(uint *)(this + 0x33c4), uVar1 != 0xffffffff &&
          (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
         ((*(uint *)(puVar4 + 8) == uVar1 >> 0xc &&
          ((*(int *)(puVar4 + 4) != 0 && (this[0x39f1] == (CTerrorPlayer)0x0)))))))) ||
       (cVar2 = (**(code **)(*(int *)this + 0x7e8))(this), cVar2 == '\0')))) &&
     (((cVar2 = IsPlayingDeathAnim(this), cVar2 == '\0' && (this[0x39f1] == (CTerrorPlayer)0x0)) &&
      (cVar2 = IsInvulnerable(this), cVar2 == '\0')))) {
    uVar1 = *(uint *)(this + 0x33a4);
    if (uVar1 == 0xffffffff) {
      return 1;
    }
    puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10;
    if (puVar4 == (undefined *)0xfffffffc) {
      return 1;
    }
    if (*(uint *)(puVar4 + 8) != uVar1 >> 0xc) {
      return 1;
    }
    if (*(int *)(puVar4 + 4) == 0) {
      return 1;
    }
  }
  return 0;
}

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)