L L4D2node

CInferno::StartBurning

0x008c8da0 · 1019 bytes · __thiscall

_ZN8CInferno12StartBurningERK6VectorS2_S2_i

Decompiled

undefined (5 params)

/* CInferno::StartBurning(Vector const&, Vector const&, Vector const&, int) */

void __thiscall
CInferno::StartBurning(CInferno *this,Vector *param_1,Vector *param_2,Vector *param_3,int param_4)

{
  float fVar1;
  float fVar2;
  float fVar3;
  float fVar4;
  float fVar5;
  float fVar6;
  undefined4 *puVar7;
  uint uVar8;
  undefined4 uVar9;
  char cVar10;
  int iVar11;
  undefined4 uVar12;
  undefined *puVar13;
  longdouble lVar14;
  float fVar15;
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  
  if ((((*(int *)(this + 0xa44) == 1) && (uVar8 = *(uint *)(this + 0x180), uVar8 != 0xffffffff)) &&
      (puVar13 = g_pEntityList + (uVar8 & 0xfff) * 0x10, puVar13 != (undefined *)0xfffffffc)) &&
     ((*(uint *)(puVar13 + 8) == uVar8 >> 0xc && (*(int *)(puVar13 + 4) != 0)))) {
    *(undefined4 *)(this + 0xba4) = 2;
  }
  uVar12 = InfernoSurfaceOffset._28_4_;
  *(float *)(this + 0xb8c) =
       *(float *)(InfernoSurfaceOffset._28_4_ + 0x2c) * *(float *)param_2 + *(float *)param_1;
  uVar9 = InfernoVelocityNormalFactor._28_4_;
  *(float *)(this + 0xb90) =
       *(float *)(uVar12 + 0x2c) * *(float *)(param_2 + 4) + *(float *)(param_1 + 4);
  *(undefined4 *)(this + 0xb94) = *(undefined4 *)(param_1 + 8);
  fVar1 = *(float *)(param_2 + 4);
  fVar2 = *(float *)param_2;
  fVar3 = *(float *)(param_3 + 4);
  fVar4 = *(float *)(param_2 + 8);
  fVar5 = *(float *)(param_3 + 8);
  fVar15 = fVar1 * fVar3 + *(float *)param_3 * fVar2 + fVar4 * fVar5;
  fVar6 = *(float *)(uVar9 + 0x2c);
  *(float *)(this + 0xb80) = (*(float *)param_3 - fVar15 * fVar2) - fVar2 * fVar6 * fVar15;
  *(float *)(this + 0xb84) = (fVar3 - fVar15 * fVar1) - fVar1 * fVar6 * fVar15;
  *(float *)(this + 0xb88) = (fVar5 - fVar15 * fVar4) - fVar4 * fVar6 * fVar15;
  VectorAngles(param_3,(QAngle *)&local_28);
  iVar11 = (**(code **)(*(int *)this + 0x334))(this);
  if (iVar11 != 0) {
    uVar12 = (**(code **)(*(int *)this + 0x334))(this);
    DispatchParticleEffect
              (uVar12,*(undefined4 *)param_1,*(undefined4 *)(param_1 + 4),
               *(undefined4 *)(param_1 + 8),local_28,local_24,local_20,0,0,0xffffffff);
  }
  if (*(int *)(InfernoDebug._28_4_ + 0x30) != 0) {
    NDebugOverlay::Sphere(param_1,*(float *)(this + 0xb48) * 0.5,0,0xff,0,true,10.0);
    NDebugOverlay::Sphere
              ((Vector *)(this + 0xb8c),*(float *)(this + 0xb48) * 0.5,0xff,0xff,0,true,10.0);
  }
  cVar10 = CreateFire(this,(Vector *)(this + 0xb8c),param_2,(FireInfo *)0x0,param_4);
  if (cVar10 != '\0') {
    iVar11 = *(int *)(this + 0xa44);
    if (iVar11 == 1) {
      CBaseEntity::EmitSound((CBaseEntity *)this,"SpitterZombie.Acid",0.0,(float *)0x0);
    }
    else if (iVar11 == 2) {
      CBaseEntity::EmitSound((CBaseEntity *)this,"FireworksCrate.Start",0.0,(float *)0x0);
    }
    else if (iVar11 == 0) {
      CBaseEntity::EmitSound((CBaseEntity *)this,"Inferno.Start",0.0,(float *)0x0);
      CBaseEntity::EmitSound((CBaseEntity *)this,"Inferno.StartSweeten",0.0,(float *)0x0);
      CBaseEntity::EmitSound((CBaseEntity *)this,"Inferno.Loop",0.0,(float *)0x0);
    }
    puVar7 = *(undefined4 **)(this + 0xa48);
    *(undefined4 *)(this + 0xb8c) = *puVar7;
    *(undefined4 *)(this + 0xb90) = puVar7[1];
    *(undefined4 *)(this + 0xb94) = puVar7[2];
    CBaseEntity::SetAbsOrigin((CBaseEntity *)this,(Vector *)(this + 0xb8c));
  }
  lVar14 = (longdouble)IntervalTimer::Now();
  if ((float)lVar14 != *(float *)(this + 0xb9c)) {
    (**(code **)(*(int *)(this + 0xb98) + 4))(this + 0xb98,this + 0xb9c);
    *(float *)(this + 0xb9c) = (float)lVar14;
  }
  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)