L L4D2node

CMolotovProjectile::DetonateThink

0x0054cf60 · 380 bytes · __thiscall

_ZN18CMolotovProjectile13DetonateThinkEv

Decompiled

undefined (1 param)

/* CMolotovProjectile::DetonateThink() */

void __thiscall CMolotovProjectile::DetonateThink(CMolotovProjectile *this)

{
  float fVar1;
  longdouble lVar2;
  
  if (((byte)this[0x14d] & 0x10) != 0) {
    CBaseEntity::CalcAbsoluteVelocity((CBaseEntity *)this);
  }
  if (*(float *)(this + 0x278) * *(float *)(this + 0x278) +
      *(float *)(this + 0x27c) * *(float *)(this + 0x27c) +
      *(float *)(this + 0x274) * *(float *)(this + 0x274) <= 25.0) {
    if (*(float *)(this + 0x1a74) <= 0.0) {
      lVar2 = (longdouble)IntervalTimer::Now();
      fVar1 = (float)lVar2;
      if (fVar1 != *(float *)(this + 0x1a74)) {
        (**(code **)(*(int *)(this + 0x1a70) + 4))(this + 0x1a70,this + 0x1a74);
        *(float *)(this + 0x1a74) = fVar1;
      }
      if (fVar1 <= 0.0) goto LAB_0054cfc2;
    }
    lVar2 = (longdouble)IntervalTimer::Now();
    if (0.5 < (float)lVar2 - *(float *)(this + 0x1a74)) {
                    /* WARNING: Could not recover jumptable at 0x0054d040. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      (**(code **)(*(int *)this + 0x56c))();
      return;
    }
  }
  else if (*(float *)(this + 0x1a74) != -1.0) {
    (**(code **)(*(int *)(this + 0x1a70) + 4))(this + 0x1a70,this + 0x1a74);
    *(undefined4 *)(this + 0x1a74) = 0xbf800000;
  }
LAB_0054cfc2:
  CBaseEntity::SetNextThink((CBaseEntity *)this,*(float *)(gpGlobals + 0xc) + 0.1,(char *)0x0);
  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)