L L4D2node

CSelfDestruct::UpdateAbility

0x004dac50 · 228 bytes · __thiscall

_ZN13CSelfDestruct13UpdateAbilityEv

Decompiled

undefined (1 param)

/* CSelfDestruct::UpdateAbility() */

void __thiscall CSelfDestruct::UpdateAbility(CSelfDestruct *this)

{
  uint uVar1;
  undefined4 *puVar2;
  undefined *puVar3;
  CBaseEntity *this_00;
  longdouble lVar4;
  undefined4 local_6c;
  undefined4 local_68;
  undefined4 local_64;
  undefined4 local_3c;
  undefined4 local_38;
  undefined4 local_30;
  undefined4 local_24;
  
  this_00 = (CBaseEntity *)0x0;
  uVar1 = *(uint *)(this + 0x44c);
  if (((uVar1 != 0xffffffff) &&
      (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar3 + 8) == uVar1 >> 0xc)) {
    this_00 = *(CBaseEntity **)(puVar3 + 4);
  }
  if (this[0x45d] != (CSelfDestruct)0x0) {
    lVar4 = (longdouble)CountdownTimer::Now();
    if (*(float *)(this + 0x468) <= (float)lVar4) {
      CTakeDamageInfo::CTakeDamageInfo((CTakeDamageInfo *)&local_6c);
      local_30 = 0x447a0000;
      if (this_00 == (CBaseEntity *)0x0) {
        local_38 = 0xffffffff;
        local_3c = 0xffffffff;
      }
      else {
        puVar2 = (undefined4 *)(**(code **)(*(int *)this_00 + 0xc))(this_00);
        local_38 = *puVar2;
        puVar2 = (undefined4 *)(**(code **)(*(int *)this_00 + 0xc))(this_00);
        local_3c = *puVar2;
      }
      local_24 = 0;
      local_6c = 0;
      local_68 = 0;
      local_64 = 0x3f800000;
      CBaseEntity::TakeDamage(this_00,(CTakeDamageInfo *)&local_6c);
      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)