L L4D2node

CEnvBeam::StrikeThink

0x00683f90 · 314 bytes · __thiscall

_ZN8CEnvBeam11StrikeThinkEv

Decompiled

undefined (1 param)

/* CEnvBeam::StrikeThink() */

void __thiscall CEnvBeam::StrikeThink(CEnvBeam *this)

{
  float fVar1;
  float fVar2;
  CBaseEntity *this_00;
  undefined1 *puVar3;
  longdouble lVar4;
  
  fVar1 = *(float *)(this + 0x4f4);
  if (fVar1 != 0.0) {
    if (((byte)this[0x148] & 4) == 0) {
      CBaseEntity::SetNextThink
                ((CBaseEntity *)this,fVar1 + *(float *)(gpGlobals + 0xc) + *(float *)(this + 0x504),
                 (char *)0x0);
    }
    else {
      fVar2 = *(float *)(gpGlobals + 0xc);
      lVar4 = (longdouble)
              (**(code **)(*random_valve + 4))(random_valve,0,*(undefined4 *)(this + 0x504));
      CBaseEntity::SetNextThink((CBaseEntity *)this,(float)lVar4 + fVar1 + fVar2,(char *)0x0);
    }
  }
  *(undefined4 *)(this + 0x4e4) = 1;
  if (*(int *)(this + 0x4f0) != 0) {
    Strike(this);
    return;
  }
  if (*(char **)(this + 0x4ec) != (char *)0x0) {
    this_00 = (CBaseEntity *)CBeam::RandomTargetname((CBeam *)this,*(char **)(this + 0x4ec));
    if (this_00 == (CBaseEntity *)0x0) {
      puVar3 = &DAT_00d539c2;
      if (*(undefined1 **)(this + 0x4ec) != (undefined1 *)0x0) {
        puVar3 = *(undefined1 **)(this + 0x4ec);
      }
      Msg("env_beam: unknown entity \"%s\"\n",puVar3);
    }
    else {
      if (((byte)this_00[0x14d] & 8) != 0) {
        CBaseEntity::CalcAbsolutePosition(this_00);
      }
      RandomPoint(this,(Vector *)(this_00 + 0x2e0));
    }
    return;
  }
  RandomArea(this);
  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)