L L4D2node

CTerrorPlayerAnimState::HandleActivity_TongueAttacked

0x00511ee0 · 539 bytes · __thiscall

_ZN22CTerrorPlayerAnimState29HandleActivity_TongueAttackedEv

Decompiled

undefined (1 param)

/* CTerrorPlayerAnimState::HandleActivity_TongueAttacked() */

undefined4 __thiscall
CTerrorPlayerAnimState::HandleActivity_TongueAttacked(CTerrorPlayerAnimState *this)

{
  CBaseEntity *this_00;
  uint uVar1;
  char cVar2;
  int iVar3;
  undefined *puVar4;
  longdouble lVar5;
  
  if (this[0x162] != (CTerrorPlayerAnimState)0x0) {
    this_00 = *(CBaseEntity **)(this + 0x118);
    uVar1 = *(uint *)(this_00 + 0x33c4);
    if ((((uVar1 != 0xffffffff) &&
         (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
        (*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar4 + 4) != 0)) {
      iVar3 = CBaseEntity::GetGroundEntity(this_00);
      if (iVar3 == 0) {
        iVar3 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
        if ((iVar3 == 0x307) && (*(float *)(*(int *)(this + 0x118) + 0x490) <= 0.99)) {
          return 0x307;
        }
        (**(code **)(*(int *)this + 0x38))(this);
        return 0x307;
      }
      iVar3 = *(int *)(this + 0x118);
      if (*(char *)(iVar3 + 0x33dd) == '\0') {
        uVar1 = *(uint *)(iVar3 + 0x33c4);
        if ((((uVar1 != 0xffffffff) &&
             (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc))
            && (*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) &&
           (((*(int *)(puVar4 + 4) != 0 && (*(char *)(iVar3 + 0x33e4) != '\0')) &&
            (lVar5 = (longdouble)IntervalTimer::Now(),
            1.0 < (float)lVar5 - *(float *)(iVar3 + 0x33cc))))) {
          iVar3 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
          if ((iVar3 == 0x30b) && (*(float *)(*(int *)(this + 0x118) + 0x490) <= 0.99)) {
            return 0x30b;
          }
          (**(code **)(*(int *)this + 0x38))(this);
          return 0x30b;
        }
        iVar3 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
        if ((iVar3 == 0x3be) && (*(float *)(*(int *)(this + 0x118) + 0x490) <= 0.99)) {
          return 0x3be;
        }
        (**(code **)(*(int *)this + 0x38))(this);
        return 0x3be;
      }
      iVar3 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
      if ((iVar3 == 0x30f) && (*(float *)(*(int *)(this + 0x118) + 0x490) <= 0.99)) {
        return 0x30f;
      }
      (**(code **)(*(int *)this + 0x38))(this);
      return 0x30f;
    }
    this[0x162] = (CTerrorPlayerAnimState)0x0;
    cVar2 = (**(code **)(*(int *)this_00 + 0x7e8))(this_00);
    if (cVar2 != '\0') {
      (**(code **)(*(int *)this + 0x38))(this);
      return 0x305;
    }
  }
  return 0xffffffff;
}

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)