L L4D2node

CTerrorGameMovement::CanBeStuck

0x004f9690 · 717 bytes · __thiscall

_ZN19CTerrorGameMovement10CanBeStuckEv

Decompiled

undefined (1 param)

/* CTerrorGameMovement::CanBeStuck() */

uint __thiscall CTerrorGameMovement::CanBeStuck(CTerrorGameMovement *this)

{
  int *piVar1;
  CTerrorPlayer *this_00;
  uint uVar2;
  char cVar3;
  int iVar4;
  undefined4 uVar5;
  uint uVar6;
  undefined *puVar7;
  
  uVar6 = 1;
  piVar1 = *(int **)(this + 0x810);
  if (piVar1 != (int *)0x0) {
    uVar6 = (**(code **)(*piVar1 + 0x7e8))(piVar1);
    if ((char)uVar6 != '\0') {
      return 0;
    }
    this_00 = *(CTerrorPlayer **)(this + 0x810);
    if (((((this_00[0x39f1] == (CTerrorPlayer)0x0) &&
          (((((uVar2 = *(uint *)(this_00 + 0x3e68), uVar2 == 0xffffffff ||
              (puVar7 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc))
             || (*(uint *)(puVar7 + 8) != uVar2 >> 0xc)) || (*(int *)(puVar7 + 4) == 0)) &&
           (((uVar2 = *(uint *)(this_00 + 0x3e64), uVar2 == 0xffffffff ||
             (puVar7 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc))
            || ((*(uint *)(puVar7 + 8) != uVar2 >> 0xc || (*(int *)(puVar7 + 4) == 0)))))))) &&
         ((((uVar2 = *(uint *)(this_00 + 0x3ee0), uVar2 == 0xffffffff ||
            (puVar7 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
           ((*(uint *)(puVar7 + 8) != uVar2 >> 0xc || (*(int *)(puVar7 + 4) == 0)))) &&
          ((((uVar2 = *(uint *)(this_00 + 0x3edc), uVar2 == 0xffffffff ||
             (puVar7 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc))
            || (*(uint *)(puVar7 + 8) != uVar2 >> 0xc)) || (*(int *)(puVar7 + 4) == 0)))))) &&
        ((((uVar2 = *(uint *)(this_00 + 0x3e48), uVar2 == 0xffffffff ||
           (puVar7 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
          ((*(uint *)(puVar7 + 8) != uVar2 >> 0xc || (*(int *)(puVar7 + 4) == 0)))) &&
         ((((uVar2 = *(uint *)(this_00 + 0x3e44), uVar2 == 0xffffffff ||
            (puVar7 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
           (*(uint *)(puVar7 + 8) != uVar2 >> 0xc)) || (*(int *)(puVar7 + 4) == 0)))))) &&
       (((((uVar2 = *(uint *)(this_00 + 0x33c4), uVar2 == 0xffffffff ||
           (puVar7 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
          (*(uint *)(puVar7 + 8) != uVar2 >> 0xc)) || (*(int *)(puVar7 + 4) == 0)) &&
        ((((uVar2 = *(uint *)(this_00 + 0x33c0), uVar2 == 0xffffffff ||
           (puVar7 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
          ((*(uint *)(puVar7 + 8) != uVar2 >> 0xc || (*(int *)(puVar7 + 4) == 0)))) &&
         (cVar3 = CTerrorPlayer::IsGettingUp(this_00), cVar3 == '\0')))))) {
      iVar4 = CMultiPlayerAnimState::GetMainActivity
                        (*(CMultiPlayerAnimState **)(*(int *)(this + 0x810) + 0x2910));
      if (iVar4 == 0x2cf) {
        uVar6 = 1;
      }
      else {
        uVar5 = CMultiPlayerAnimState::GetMainActivity
                          (*(CMultiPlayerAnimState **)(*(int *)(this + 0x810) + 0x2910));
        cVar3 = CTerrorPlayer::IsMotionControlledXY(*(CTerrorPlayer **)(this + 0x810),uVar5);
        if (cVar3 == '\0') {
          uVar5 = CMultiPlayerAnimState::GetMainActivity
                            (*(CMultiPlayerAnimState **)(*(int *)(this + 0x810) + 0x2910));
          uVar6 = CTerrorPlayer::IsMotionControlledZ(*(CTerrorPlayer **)(this + 0x810),uVar5);
          uVar6 = uVar6 ^ 1;
        }
      }
    }
  }
  return uVar6;
}

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)