L L4D2node

FireSystem_StartFire

0x006a1760 · 836 bytes · __cdecl

_Z20FireSystem_StartFireRK6VectorfffiP11CBaseEntity10fireType_e

Decompiled

undefined (7 params)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* FireSystem_StartFire(Vector const&, float, float, float, int, CBaseEntity*, fireType_e) */

char FireSystem_StartFire
               (Vector *param_1,float param_2,float param_3,float param_4,int param_5,int *param_6,
               int param_7)

{
  CBaseEdict *this;
  char cVar1;
  int iVar2;
  CFire *pCVar3;
  undefined4 *puVar4;
  int iVar5;
  uint uVar6;
  char local_7d;
  undefined4 local_7c;
  undefined4 local_78;
  undefined4 local_74;
  undefined4 local_70;
  int local_6c;
  undefined4 local_68;
  undefined4 local_64;
  undefined4 local_60;
  CFire *local_5c [19];
  
  local_7c = 0;
  local_78 = 0;
  if (___atan2f_finite == 0) {
    local_6c = 0;
  }
  else {
    (**(code **)(___atan2f_finite + 0x50))
              (___atan2f_finite,&local_7c,0,0,0,0,"/data/src/game/server/fire.cpp",0x18e,
               &FireSystem_StartFire(Vector_const&,float,float,float,int,CBaseEntity*,fireType_e)::
                tm_fmt,"(%s)%s","Unaccounted","FireSystem_StartFire1");
    local_6c = ___atan2f_finite;
  }
  iVar2 = _DAT_0105db00;
  local_74 = local_7c;
  local_70 = local_78;
                    /* try { // try from 006a190e to 006a195c has its CatchHandler @ 006a1ae8 */
  if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
     (iVar5 = ThreadGetCurrentId(), iVar2 == iVar5)) {
    if ((char *)*_DAT_0105d15c != "FireSystem_StartFire1") {
      _DAT_0105d15c =
           (int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc85d91,(char *)0x1,0xbfafa1);
    }
    CVProfNode::EnterScope();
    DAT_0105d158 = '\0';
  }
  local_68 = *(undefined4 *)param_1;
  local_64 = *(undefined4 *)(param_1 + 4);
  local_60 = *(undefined4 *)(param_1 + 8);
                    /* try { // try from 006a1844 to 006a187a has its CatchHandler @ 006a1ac7 */
  local_7d = FireSystem_CanAddFire((Vector *)&local_68,0x41800000,param_7,param_5);
  if (local_7d == '\0') {
    iVar2 = FireSystem_GetFiresInSphere(local_5c,0x10,true,param_1,16.0);
    iVar5 = 0;
    if (0 < iVar2) {
      do {
        pCVar3 = local_5c[iVar5];
        if (pCVar3[0x478] != (CFire)0x0) {
                    /* try { // try from 006a18eb to 006a18ef has its CatchHandler @ 006a1ac7 */
          CFire::AddHeat((float)pCVar3,false);
        }
        iVar5 = iVar5 + 1;
      } while (iVar5 != iVar2);
    }
  }
  else {
                    /* try { // try from 006a19cf to 006a1a7a has its CatchHandler @ 006a1ac7 */
    pCVar3 = (CFire *)CreateEntityByName("env_fire",-1,true);
    if (pCVar3 == (CFire *)0x0) {
      local_7d = '\0';
    }
    else {
      uVar6 = *(uint *)(pCVar3 + 0x148) | 0x80;
      if (*(uint *)(pCVar3 + 0x148) != uVar6) {
        if (pCVar3[0x6c] == (CFire)0x0) {
          this = *(CBaseEdict **)(pCVar3 + 0x30);
          if (this != (CBaseEdict *)0x0) {
            *(uint *)this = *(uint *)this | 0x101;
            iVar2 = CBaseEdict::GetChangeAccessor(this);
            *(undefined2 *)(iVar2 + 2) = 0;
          }
        }
        else {
          pCVar3[0x70] = (CFire)((byte)pCVar3[0x70] | 1);
        }
        *(uint *)(pCVar3 + 0x148) = uVar6;
      }
      (**(code **)(*(int *)pCVar3 + 100))(pCVar3);
      CFire::Init(pCVar3,(Vector *)&local_68,param_2,param_3,param_4,param_5,param_7);
      CFire::Start(pCVar3);
      if (param_6 == (int *)0x0) {
        *(undefined4 *)(pCVar3 + 0x444) = 0xffffffff;
      }
      else {
        puVar4 = (undefined4 *)(**(code **)(*param_6 + 0xc))(param_6);
        *(undefined4 *)(pCVar3 + 0x444) = *puVar4;
      }
    }
  }
  iVar2 = _DAT_0105db00;
  if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
     (iVar5 = ThreadGetCurrentId(), iVar2 == iVar5)) {
    cVar1 = CVProfNode::ExitScope();
    if (cVar1 != '\0') {
      _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
    }
    DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
  }
  if (local_6c != 0) {
    (**(code **)(local_6c + 0x54))(local_6c,local_74,local_70,0,0,0);
  }
  return local_7d;
}

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)