L L4D2node

FireSystem_StartFire

0x006a1af0 · 898 bytes · __cdecl

_Z20FireSystem_StartFireP14CBaseAnimatingfffiP11CBaseEntity10fireType_e

Decompiled

undefined (7 params)

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

char FireSystem_StartFire
               (CBaseEntity *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_8d;
  undefined4 local_8c;
  undefined4 local_88;
  undefined4 local_80;
  undefined4 local_7c;
  int local_78;
  undefined4 local_74;
  undefined4 local_70;
  undefined4 local_6c;
  undefined4 local_68;
  undefined4 local_64;
  undefined4 local_60;
  CFire *local_5c [19];
  
  local_8c = 0;
  local_88 = 0;
  if (___atan2f_finite == 0) {
    local_78 = 0;
  }
  else {
    (**(code **)(___atan2f_finite + 0x50))
              (___atan2f_finite,&local_8c,0,0,0,0,"/data/src/game/server/fire.cpp",0x1be,
               &FireSystem_StartFire(CBaseAnimating*,float,float,float,int,CBaseEntity*,fireType_e)
                ::tm_fmt,"(%s)%s","Unaccounted","FireSystem_StartFire2");
    local_78 = ___atan2f_finite;
  }
  iVar2 = _DAT_0105db00;
  local_80 = local_8c;
  local_7c = local_88;
                    /* try { // try from 006a1cd6 to 006a1d24 has its CatchHandler @ 006a1ea8 */
  if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
     (iVar5 = ThreadGetCurrentId(), iVar2 == iVar5)) {
    if ((char *)*_DAT_0105d15c != "FireSystem_StartFire2") {
      _DAT_0105d15c =
           (int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc85da7,(char *)0x1,0xbfafa1);
    }
    CVProfNode::EnterScope();
    DAT_0105d158 = '\0';
  }
  if (((byte)param_1[0x14d] & 8) != 0) {
                    /* try { // try from 006a1bc2 to 006a1c43 has its CatchHandler @ 006a1e87 */
    CBaseEntity::CalcAbsolutePosition(param_1);
  }
  local_6c = *(undefined4 *)(param_1 + 0x2e8);
  local_74 = *(undefined4 *)(param_1 + 0x2e0);
  local_70 = *(undefined4 *)(param_1 + 0x2e4);
  local_68 = local_74;
  local_64 = local_70;
  local_60 = local_6c;
  local_8d = FireSystem_CanAddFire((Vector *)&local_68,0x41800000,param_7,param_5);
  if (local_8d == '\0') {
    iVar2 = FireSystem_GetFiresInSphere(local_5c,0x10,true,(Vector *)&local_74,16.0);
    iVar5 = 0;
    if (0 < iVar2) {
      do {
        pCVar3 = local_5c[iVar5];
        if (pCVar3[0x478] != (CFire)0x0) {
                    /* try { // try from 006a1cb6 to 006a1cba has its CatchHandler @ 006a1e87 */
          CFire::AddHeat((float)pCVar3,false);
        }
        iVar5 = iVar5 + 1;
      } while (iVar5 != iVar2);
    }
  }
  else {
                    /* try { // try from 006a1d97 to 006a1e42 has its CatchHandler @ 006a1e87 */
    pCVar3 = (CFire *)CreateEntityByName("env_fire",-1,true);
    if (pCVar3 == (CFire *)0x0) {
      local_8d = '\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_78 != 0) {
    (**(code **)(local_78 + 0x54))(local_78,local_80,local_7c,0,0,0);
  }
  return local_8d;
}

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)