L L4D2node

CRagdollBoogie::ZapThink

0x00803e20 · 630 bytes · __thiscall

_ZN14CRagdollBoogie8ZapThinkEv

Decompiled

undefined (1 param)

/* CRagdollBoogie::ZapThink() */

void __thiscall CRagdollBoogie::ZapThink(CRagdollBoogie *this)

{
  uint uVar1;
  CBaseAnimating *this_00;
  int iVar2;
  undefined *puVar3;
  int *piVar4;
  undefined1 local_84 [8];
  undefined4 local_7c;
  undefined4 local_78;
  undefined4 local_74;
  undefined4 local_70;
  undefined4 local_6c;
  undefined4 local_68;
  undefined4 local_64;
  undefined4 local_60;
  undefined4 local_5c;
  undefined4 local_58;
  undefined4 local_54;
  undefined4 local_50;
  undefined4 local_4c;
  int local_48;
  undefined4 local_44;
  undefined4 local_40;
  undefined4 local_3c;
  undefined4 local_38;
  undefined2 local_34;
  undefined4 local_30;
  undefined4 local_2c;
  undefined4 local_28;
  undefined1 local_24;
  undefined1 local_23;
  
  uVar1 = *(uint *)(this + 0x188);
  if ((((uVar1 != 0xffffffff) &&
       (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar3 + 8) == uVar1 >> 0xc)) &&
     ((piVar4 = *(int **)(puVar3 + 4), piVar4 != (int *)0x0 &&
      (this_00 = (CBaseAnimating *)(**(code **)(*piVar4 + 0xf0))(piVar4),
      this_00 != (CBaseAnimating *)0x0)))) {
    piVar4 = *(int **)(this_00 + 0x13e0);
    if (piVar4 == (int *)0x0) {
      iVar2 = CBaseEntity::GetModel((CBaseEntity *)this_00);
      if (iVar2 == 0) {
        piVar4 = *(int **)(this_00 + 0x13e0);
      }
      else {
        CBaseAnimating::LockStudioHdr(this_00);
        piVar4 = *(int **)(this_00 + 0x13e0);
      }
      if (piVar4 == (int *)0x0) {
        return;
      }
    }
    if ((*piVar4 != 0) &&
       (iVar2 = CBaseAnimating::GetHitboxSet(this_00),
       *(int *)(*piVar4 + iVar2 * 0xc + *(int *)(*piVar4 + 0xb0) + 4) != 0)) {
      if (*(int *)(this + 0x44c) == 0) {
        iVar2 = 0;
        local_7c = 0;
        local_34 = 0;
        uVar1 = *(uint *)(this + 0x188);
        local_78 = 0;
        local_74 = 0;
        local_70 = 0;
        local_6c = 0;
        local_68 = 0;
        local_64 = 0;
        local_60 = 0;
        local_5c = 0;
        local_58 = 0;
        local_54 = 0;
        local_50 = 0;
        local_4c = 0;
        local_38 = 0;
        local_3c = 0;
        local_30 = 0;
        local_2c = 0;
        local_28 = 0;
        local_24 = 0;
        local_23 = 0;
        if ((uVar1 != 0xffffffff) &&
           (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) {
          if (*(uint *)(puVar3 + 8) == uVar1 >> 0xc) {
            iVar2 = *(int *)(puVar3 + 4);
          }
          else {
            iVar2 = 0;
          }
        }
        local_48 = 0;
        if (*(int *)(iVar2 + 0x30) != 0) {
          local_48 = *(int *)(iVar2 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
        }
        local_40 = 0x40800000;
        local_44 = 0x40000000;
        if (((byte)this[0x14a] & 2) != 0) {
          local_44 = 0x3f800000;
        }
        DispatchEffect("TeslaHitboxes",(CEffectData *)&local_7c);
      }
      (**(code **)(*random_valve + 4))(random_valve,0x3dcccccd,0x3e99999a);
      CBaseEntity::ThinkSet((_func_void *)local_84,(float)this,(char *)ZapThink);
      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)