L L4D2node

CEnvFireSensor::Think

0x0069e270 · 436 bytes · __thiscall

_ZN14CEnvFireSensor5ThinkEv.part.23

Decompiled

undefined (1 param)

/* CEnvFireSensor::Think() [clone .part.23] */

void __thiscall CEnvFireSensor::Think(CEnvFireSensor *this)

{
  CFire **ppCVar1;
  CFire *pCVar2;
  CBaseEntity *in_EAX;
  int iVar3;
  CFire **ppCVar4;
  float fVar5;
  float fVar6;
  CFire *local_20c [128];
  
  fVar6 = *(float *)(in_EAX + 0x44c) * 0.25;
  if (fVar6 < 0.1) {
    fVar6 = 0.1;
  }
  CBaseEntity::SetNextThink(in_EAX,fVar6 + *(float *)(gpGlobals + 0xc),(char *)0x0);
  fVar5 = *(float *)(in_EAX + 0x444);
  if (((byte)in_EAX[0x14d] & 8) != 0) {
    CBaseEntity::CalcAbsolutePosition(in_EAX);
  }
  ppCVar4 = local_20c;
  iVar3 = FireSystem_GetFiresInSphere(ppCVar4,0x80,true,(Vector *)(in_EAX + 0x2e0),fVar5);
  if (iVar3 < 1) {
    fVar5 = 0.0;
  }
  else {
    fVar5 = 0.0;
    ppCVar1 = ppCVar4 + iVar3;
    do {
      pCVar2 = *ppCVar4;
      ppCVar4 = ppCVar4 + 1;
      fVar5 = fVar5 + *(float *)(pCVar2 + 0x460);
    } while (ppCVar4 != ppCVar1);
  }
  if (fVar5 < *(float *)(in_EAX + 0x448)) {
    *(undefined4 *)(in_EAX + 0x450) = 0;
    if (in_EAX[0x441] != (CBaseEntity)0x0) {
      in_EAX[0x441] = (CBaseEntity)0x0;
      COutputEvent::FireOutput((COutputEvent *)(in_EAX + 0x46c),in_EAX,in_EAX,0.0);
      return;
    }
  }
  else {
    fVar5 = *(float *)(in_EAX + 0x450);
    *(float *)(in_EAX + 0x450) = fVar6 + fVar5;
    if ((*(float *)(in_EAX + 0x44c) <= fVar6 + fVar5) && (in_EAX[0x441] == (CBaseEntity)0x0)) {
      in_EAX[0x441] = (CBaseEntity)0x1;
      COutputEvent::FireOutput((COutputEvent *)(in_EAX + 0x454),in_EAX,in_EAX,0.0);
      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)